Presentation is loading. Please wait.

Presentation is loading. Please wait.

 2001 Prentice Hall, Inc. All rights reserved. 1.

Similar presentations


Presentation on theme: " 2001 Prentice Hall, Inc. All rights reserved. 1."— Presentation transcript:

1  2001 Prentice Hall, Inc. All rights reserved. 1

2 2 Extensible Style Language (XSL) Extensible style language (XSL) –Defines layout of XML document Much like CSS defines layout of HTML document XSL much more powerful that CSS –XSL Style sheet Provides rules for displaying or organizing an XML document’s data –Provides elements that define rules for XSL Transformations (XSLT) –How one XML document can be transformed into another XML document –Example: XML document can be transformed into a well- formed HTML document

3  2001 Prentice Hall, Inc. All rights reserved. Outline 3 Games.xml Cricket More popular among commonwealth nations Baseball More popular in America Soccer (Football) Most popular sport in the world A processing instruction that references the XSL stylesheet games.xsl. Value type specifies that games.xsl is a text/xsl file.

4  2001 Prentice Hall, Inc. All rights reserved. Outline 4 Program Output

5  2001 Prentice Hall, Inc. All rights reserved. Outline 5 Elements.xsl 9 10 Sports ID 31 Sport 32 Information The stylesheet start tag—which begins the XSL stylesheet. Element xsl:output writes an XHTML document type declaration to the result tree. The match attribute to select the document root of the source document (i.e., game.xml ).

6  2001 Prentice Hall, Inc. All rights reserved. Outline 6 Elements.xsl Element xsl:for-each iterates through the source XML document and search for game elements. Element value-of retrieves attribute id ’s value and place it in a td element in the result tree.

7  2001 Prentice Hall, Inc. All rights reserved. Outline 7 Sorting.xml Deitel's XML Primer Paul 13 Deitel Advanced XML Intermediate XML Parsers and Tools Entities XML Fundamentals 33 Reference to the XSL stylesheet sorting.xsl.

8  2001 Prentice Hall, Inc. All rights reserved. Outline 8 Sorting.xml

9  2001 Prentice Hall, Inc. All rights reserved. Outline 9 Sorting.xsl 8 9 ISBN by, Specify that the msxml processor should apply xsl:template s to the document root’s children. Create the title for the XHTML document.Create a header element that displays the book’s author.

10  2001 Prentice Hall, Inc. All rights reserved. Outline 10 Sorting.xsl ( pages ) Chapter ( pages ) Appendix Select each element (indicated by an asterisk) that is a child of frontMatter. Call node-set function name to retrieve the current node’s element name (e.g., preface ). Element xsl:sort sorts chapter s by number in ascending order. Attribute select selects the value of attribute number in context node chapter. Attribute data-type specifies a numeric sort and attribute order specifies ascending order.

11  2001 Prentice Hall, Inc. All rights reserved. Outline 11 Sorting.xsl ( pages ) Pages: 76

12  2001 Prentice Hall, Inc. All rights reserved. Outline 12 Program Output

13  2001 Prentice Hall, Inc. All rights reserved Microsoft BizTalk

14  2001 Prentice Hall, Inc. All rights reserved. Outline 14 BizTalkexample.x ml 1 2 a-3411d 20 ExComp, Inc. 21 DCS Clothes | Sports wear T13:12: T13:12: Clearance sale 34 This is a clearance sale 35 Free Shipping Defines a default namespace for the BizTalk framework elements. Element Route contains the routing information, which is mandatory for all BizTalk documents. Element To specifies the document’s destination. Element From specifies the document’s source.Element Body contains the actual message, whose schema the businesses define.

15  2001 Prentice Hall, Inc. All rights reserved. Outline 15 BizTalkexample.x ml 36 Clothes that you would love to wear


Download ppt " 2001 Prentice Hall, Inc. All rights reserved. 1."

Similar presentations


Ads by Google