Presentation is loading. Please wait.

Presentation is loading. Please wait.

Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation.

Similar presentations


Presentation on theme: "Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation."— Presentation transcript:

1 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Using XSLT To Transform XML Brian E. Travis Architag International Corp btravis@architag.com 9-333 btravis@architag.com

2

3 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSL Extensible Stylesheet Language HTML: "Format without Structure" HTML: "Format without Structure" Typesetting language Typesetting language Not extensible Not extensible CSS: "Enhanced Format, No Structure" CSS: "Enhanced Format, No Structure" Stylesheet language Stylesheet language Overrides default formatting for HTML, but annot change basic structure of the document Overrides default formatting for HTML, but annot change basic structure of the document XML: "Structure Without Format" XML: "Structure Without Format" Defines "elements" using "tags" Defines "elements" using "tags" Creates hierarchical structure of information set Creates hierarchical structure of information set

4 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT "Adding Format to Structure" Transforms XML to XML Transforms XML to XML Declarative programming language Declarative programming language Creates formatted output Creates formatted output Does limited processing Does limited processing

5 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Quiz May 5, 2000 May 5, 2000 May 5, 2000

6 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Operation XSLTransformer Output (x) Stylesheetxmlns:xsl Source Tree (your XML) XSLT

7 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Example In XRay

8 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Stylesheet Architecture ... Start tag for stylesheet document, containing XSL Namespace indicator Start tag for stylesheet document, containing XSL Namespace indicator Template rules and other stuff Template rules and other stuff End of stylesheet End of stylesheet

9 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Template Rule


10 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Patterns ParagraphElement abstract/paragraphParent chapter//quoteAncestor chapter[synopsis]Filter list[@type] Attribute filter (specified) list[@type=ordered ] Attribute filter (value)

11 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Template Rule

12 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Stylesheet Temperature °F Wind: mph

13 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. 76 5 Current conditions 76 Temperature: ° F 76 5 5 Wind: mph 76 5 1 2 3 4 5 6 8 7 9 10 1112 13 XSLT Transformation

14 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Demonstration: XSL for Documents Create stylesheet for complex document Create stylesheet for complex document Run in browser Run in browser

15 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Demonstration: XSL On The Server Get XML document from server Get XML document from server Article.xml Article.xml Apply stylesheet, transform, and deliver HTML to the browser Apply stylesheet, transform, and deliver HTML to the browser Article.asp Article.asp Article.xsl Article.xsl

16 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. XSLT Operation XML XSL (TOC) XSL(Abstract) XSL (Full) HTML (TOC) HTML (Abstract) HTML (Full) XSL Processor (HTML)

17 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Demonstration: XML Data Islands Create HTML document with XML data islands Create HTML document with XML data islands Article.xml Article.xml Article-toc.xsl Article-toc.xsl Article-abstract.xsl Article-abstract.xsl Article-full.xsl Article-full.xsl Article-wtoc.xsl Article-wtoc.xsl Switch stylesheet under script control Switch stylesheet under script control ApplyStyle.htm ApplyStyle.htm

18 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Case Study: Newsletter XML-enabled Web Site http://tagnewsletter.com

19 Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation is expressly forbidden. Tech Ed 2000 Materials Tech Ed 2000 Materials http://architag.com/r/TechEd2000 http://architag.com/r/TechEd2000 XML and XSL XML and XSL http://msdn.microsoft.com/xml http://msdn.microsoft.com/xml http://www.w3.org/Style/XSL/ http://www.w3.org/Style/XSL/

20


Download ppt "Copyright © 1999, Architag International Corporation. All rights reserved. Use without express written permission from Architag International Corporation."

Similar presentations


Ads by Google