The vibe of XSL-T at ASTC 2017
I’m attending the Technical Communicators Conference 2017, the annual conference of the Australian Society for Technical Communication (ASTC). This post is a live blog of a session at the conference. In other words, I’m writing as the presenter speaks. Any mistakes are mine, and all credit goes to the presenter.
Tony Self presented a session called The Vibe of XSL-T. Tony’s plan is to show us where XSL fits in the XML universe, and then where XSL-T fits in and where it’s useful. He demonstrated, by asking the audience, that most of us were using XML to store at least some of our content. Another of Tony’s goals is to discuss the level of expertise we need, to use XSL-T.
What is XML?
XML is a format for storing information.
XML tags are generally semantic, which means a human being can generally understand its purpose by reading it. Unfortunately, some designers of XML documents don’t necessarily follow that best practice.
Tony edited a
.pptx file (a PowerPoint presentation) in a text editor, and demonstrated that you can change the content of a presentation by editing the XML as a text format. Understanding that Office documents are essentially XML underneath gives you some power.
The help format known as
.chm is also an XML-based format. Internet Explorer, which has been able to render XML for years, can therefore render the content.
XML is a common way of storing information. A useful ramification is that you can write reports based on the XML.
XML is more like a family of languages rather than a specific language. It’s a set of rules for creating a language. Most XML languages are semantic in nature, in that they define concepts such as dogs, breeds, height, weight, and so on. There are standards for creating XML languages, and strict validation rules to enforce them. The rules are stored in a DTD (document type definition) or an XSD (schema definition). XML is Internet-friendly. The XSD, XSL, and XML files can all be stored in different location.
The rules and standard patterns mean that all tools that understand XML can also understand all forms of XML. For example, editors, browsers, VCRs.
What is XSL?
There are a few types of XSL:
- XSL-T: transforms a document from one format to another, where the format is some form of text-based content. XSL-T determines how the data is arranged, which data is omitted, and so on.
- XSL-FO: transforms a document to some type of page-oriented medium, such as PDF. For example, you can convert a file to Apache-FOP and then PDF, using a process controlled by Ant.
- XPath: finds information in an XML document. You use it to navigate through elements and attributes in an XML document, and retrieve the part of the document that matches your search criteria.
More about XML
XML is beautifully organised, making it simple to use. Most of the XML standards are still in version 1, a testament to the care taken with the original design.
Tony walked us through some examples of XML, and of using XSL-T to transform a document into an HTML page.
Thank you Tony for a good overview of XML technology.