1 XSLT: The XML transformation languageBy Ragageethika
2 Contents What is XSLT XSL Vs HTML XSL Elements XSL TransformationsDemos
3 What is XSLT The World Wide Web Consortium (W3C) started to develop XSL because there was a need for an XML-based Style sheet Language. XSLT = XSL Transformations and is the most important part of XSL. XSLT is used to transform an XML document into another XML document, or another type of document that is recognized by a browser, like HTML. Normally XSLT does this by transforming each XML element into an HTML element. A common way to describe the transformation process is to say that XSLT transforms an XML source-tree into an XML result-tree.
4 XSL Vs HTML XSL stands for Extensible Style sheet Language.CSS is TML Style Sheets HTML uses predefined tags and the meaning of the tags are XSL = XML Style Sheets CSS does not support operations such as reordering and sorting elements based on a condition, and displaying only selective elements. XML does not use predefined tags (we can use any tag-names we like), and the meaning of these tags are not well understood. A 5 6 Example.2 7 XSL Elements xsl:Template indicates that there are child nodes/subdirectories. Syntax: 8 XSL Elements Legal filter operators are: = (equal) != (not equal)< less than > greater than Syntax: 9 XSL Elements xsl:if element is used put a conditional if test against the content of the XML file, Syntax: 10 XSL Elements xsl:choose element is used in conjunction with 11 XSL Elements xsl:apply-templates element applies a template to the current element or to the current element's child nodes. If we add a select attribute to the 12 Where does the XML transformation happen?There are three primary ways to transform XML documents into other formats, such as HTML, with an XSLT style sheet: 1. The XML document and associated style sheet are both served to the client (Web browser), which then transforms the document as specified by the style sheet and presents it to the user. 2. The server applies an XSLT style sheet to an XML document to transform it to some other format (generally HTML) and sends the transformed document to the client (Web browser). 3. A third program transforms the original XML document into some other format (often HTML) before the document is placed on the server. Both server and client only deal with the transformed document. 13 References ---- Learn XSLT element could mean an HTML table, a piece of furniture, or something else - and a browser does not know how to display it. XSL describes how the XML document should be displayed!
XSL Elements