About XML and XSL
XML is a meta-language. That is, it is a language used to create other markup languages. XML provides a basic structure and a set of rules to which any markup language must adhere. XML is based on three basic building blocks:
elements
attributes
values
Elements describe or contain a piece of information and form the basis of all XML documents. Elements take the form of tags, as in HTML. Attributes are pieces of descriptive information that appear within an elements opening tag. An attribute consists of an attribute name and a corresponding value, separated by an equal symbol (=). The values of an attribute appear to the right of the equal symbol and must appear within quotes.
Together, a group of elements, attributes, and values make up an XML document.
XML allows users to create elements, attributes and values. There are no fixed elements as in HTML. In HTML <table> means only information grouped together in rows and columns. In XML, an element with the name <table> could refer to an HTML type table, or a piece of furniture, or whatever the author would like. In order to bring order to these seemingly randomly-named elements, XML needs a document that explains what each of these building blocks mean. The document that defines these building blocks is called an XSL style sheet. A rough comparison can be made to Custom Style Sheets, used in HTML.
ePublisher uses two different aspects of XSL to generate an output:
XSLT:
XSLT describes how to transform a source document from one markup language to another.
XPath:
XPath is used by XSLT to select parts of XML to process and perform calculations.
An XSLT processor executes a stylesheet to give the user a particular result. In the transformation process, XPath defines parts of the source document for XSLT to match against one or more predefined templates. When a match is found, XSLT will transform the matching part of the source document into the result document.
Was this helpful?
Last modified date: 08/16/2017