XSLT Introduction
XSLT is a language for transforming XML documents into XHTML documents or other XML documents.
XPath is a language for navigating in XML documents.
Prerequisites
Before you continue, you should have a basic understanding of the following:
- HTML / XHTML
- XML / XML Namespaces
- XPath
If you want to learn these topics first, please visit ourhomepageto access these tutorials.
What is XSLT?
- XSLT stands for XSL Transformations
- XSLT is the most important part of XSL
- XSLT can transform one XML document into another XML document
- XSLT uses XPath to navigate in XML documents
- XSLT is a W3C standard
XSLT = XSL Transformations
XSLT is the most important part of XSL.
XSLT is used to transform one XML document into another XML document, or into other types of documents that can be recognized by browsers, such as HTML and XHTML. Typically, XSLT does this by converting each XML element into an (X)HTML element.
With XSLT, you can add elements and attributes to the output file, or remove elements and attributes from the output file. You can also rearrange and sort elements, perform tests and decide which elements to hide or display, and so on.
A common way to describe the transformation process is,XSLT transforms an XML source tree into an XML result tree。
XSLT uses XPath
XSLT uses XPath to find information in an XML document. XPath is used to navigate through elements and attributes in XML documents.
If you want to learn XPath first, please visit ourXPath Tutorial。
How does it work?
During the transformation process, XSLT uses XPath to define parts of the source document that can match one or more predefined templates. Once a match is found, XSLT converts the matching part of the source document into the result document.
XSLT is a W3C standard
XSLT was established as a W3C standard on November 16, 1999.
For more information about W3C's XSLT activities, please visit ourW3C Tutorial。
Other Extensions