| • Science | • People | • Locations | • Timeline |
To transform in this context means to apply an XSLT stylesheet to an incoming XML document and create a result tree. The result tree may be produced in XML, XHTML, HTML or any text-based format including plain text, tab- and comma-separated values, RTF and TeX. It may comprise text and markup from the XSLT stylesheet combined with parts of the incoming XML selected using XPath query-strings.
The language is declarative, i.e. an XSLT stylesheet consists of a collection of template rules which define the transformations to be performed. These template rules can be applied recursively.
The XSLT processor checks which template rules can be applied and executes the associated transformations based on a sequence of priorities.
An XSLT stylesheet is itself an XML document as the example below shows
STX is intended as a high-speed, low memory consumption alternative to XSLT.Example XSLT Stylesheet:
The following host names are currently in use at
| Host name | URL | Used by |
|---|
Example of incoming XML for above stylesheet:
Output XHTML that this would produce:
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">The following host names are currently in use at sun.com
| Host name | URL | Used by |
|---|---|---|
| www | http://www.sun.com | World Wide Web site |
| java | http://java.sun.com | Java info |
The following host names are currently in use at w3.org
| Host name | URL | Used by |
|---|---|---|
| www | http://www.w3.org | World Wide Web site |
| validator | http://validator.w3.org | web developers who want to get it right |