Presentation is loading. Please wait.

Presentation is loading. Please wait.

XSLT Susanne Sherba October 12, 2000. Overview What is XSLT?What is XSLT? Related RecommendationsRelated Recommendations XSLT ElementsXSLT Elements Associating.

Similar presentations


Presentation on theme: "XSLT Susanne Sherba October 12, 2000. Overview What is XSLT?What is XSLT? Related RecommendationsRelated Recommendations XSLT ElementsXSLT Elements Associating."— Presentation transcript:

1 XSLT Susanne Sherba October 12, 2000

2 Overview What is XSLT?What is XSLT? Related RecommendationsRelated Recommendations XSLT ElementsXSLT Elements Associating Stylesheets with DocumentsAssociating Stylesheets with Documents Additional InformationAdditional Information

3 What is XSLT? A language for transforming XML documents into other XML documentsA language for transforming XML documents into other XML documents Designed for use both as part of XSL and independently of XSLDesigned for use both as part of XSL and independently of XSL Not intended as a completely general- purpose XML transformation language.Not intended as a completely general- purpose XML transformation language. [W3C XSLT Recommendation]

4 XSLT Process

5 XSLT Status W3C Recommendation - November 16, 1999W3C Recommendation - November 16, 1999 Version 1.0Version 1.0

6 Related Recommendations XPathXPath XSLXSL XML Stylesheet RecommendationXML Stylesheet Recommendation

7 XSLT Stylesheet Element allowed as synonym

8 XSLT Template Element

9 Applying Templates

10 Root Items Item: <?xml-stylesheet href="style1.xsl” type="text/xsl"?> Porsche 1 Ferrari 2 Example 1

11

12 Root Items Item: <?xml-stylesheet href="style2.xsl” type="text/xsl"?> Porsche 1 Ferrari 2 Example 2

13

14 Repetition Do something here...

15 Root Items Item: <xsl:value-of select="productName"/> <?xml-stylesheet href="style3.xsl” type="text/xsl"?> Porsche 1 Ferrari 2 Example 3

16

17 Conditional Processing <if test = “position()=last()”> Do something …

18 Conditional Processing Do something for last element Do something for first element Do something for other elements

19 Creating the result tree

20 XSL output: Root Items Item: Porsche Item: Ferrari Set the background to red <xsl:attribute name="bgcolor"> red Root... Example 4

21 Numbering

22 Combining Stylesheets

23 Some Other Elements

24 Associating Stylesheets with Documents W3C Stylesheets Recommendation Version 1.0 In the xml document:

25 Additional Information XSLT Recommendation Version 1.0 - http://www.w3.org/TR/xsltXSLT Recommendation Version 1.0 - http://www.w3.org/TR/xslt http://www.w3.org/TR/xslt XSLT.com - http://www.xslt.comXSLT.com - http://www.xslt.comhttp://www.xslt.com XSLT Reference - http://www.zvon.org/xxl/XSLTreference/ Output/index.htmlXSLT Reference - http://www.zvon.org/xxl/XSLTreference/ Output/index.html http://www.zvon.org/xxl/XSLTreference/ Output/index.html http://www.zvon.org/xxl/XSLTreference/ Output/index.html


Download ppt "XSLT Susanne Sherba October 12, 2000. Overview What is XSLT?What is XSLT? Related RecommendationsRelated Recommendations XSLT ElementsXSLT Elements Associating."

Similar presentations


Ads by Google