Presented by Michael Davis & Morgan Bibbs XML & XSL

1 Presented by Michael Davis & Morgan Bibbs XML & XSL CA...
Author: Loreen Dixon
0 downloads 2 Views

1 Presented by Michael Davis & Morgan Bibbs XML & XSL CASE STUDY: An XML based snippet for one-off manual profile pages.

2 Digital Design & Development!Before you get started on your own project… Who ya gonna call?? Digital Design & Development!

3 DEFINING TERMS, PROVIDING CONTEXTXML = eXtensible Markup Language XSL = eXtensible Stylesheet Language Components of XSL: XSLT = transforms XML XPath = navigates XML XQuery = queries XML *W3School s

4 A note about extensible Markup Language Pine Oak Cause: lightning Tree Frog At first... Mangrove Cause: gator damage Pig Frog Not anymore! There is no defined syntax for XML You can mix HTML syntax with your own markup As long as the XSL declarations correspond with the XML syntax, you’re good to go

5 The stylesheet for the previous two documents.OU Templates Files required - file type, purpose, and language File Type Purpose Language Template Image This is what users will see when they select a new page or section to create. GIF TCF Defines new page/section setup form and 
what files to create in a new section. XML TMPL Outlines the PCF page structure, page 
properties, and editable regions.* XSL The stylesheet for the previous two documents. * The file extension PCF is meaningless. Only once the PCF is published does it matter. The file extension upon publish is defined in the stylesheet declaration on the second line of the TMPL document.

6 Why Snippets? Creating a new template is a large-scale solution for a relatively small-scale problem. XSL snippets allow for easy editing of complex layouts with minimal training required. Our templates are based on XML/XSL for a reason. XML is reliable, tested, simple, and customizable. We should be utilizing the XML/XSL framework of OmniUpdate, and outside of templates, snippets are the best way to do this.

7 OU snippets Files required - file type, purpose, and languagedirectory-profile-1.inc Snippet source file. XML directory-profile-1.table-transform.xsl Snippet Stylesheet XSL The snippet itself Create a new snippet: name it, 
add to a category, link the .inc file, 
and save.

8 DEMO - XSL functionalityIn our demo, the components of XSL – XSLT, Xquery and Xpath – work together to accomplish the following specific functions and transformations: Query xml elements, attributes, variables Query specific xml paths and to create new variables Dynamically apply classes and other attributes to content and show/hide content based on those xml queries Generate unique IDs to link tabs to tab content

9 DEMO - XSL elements All XSL elements used: “When and “otherwise” must be nested in “choose” to complete the statement.

10 Top half of XSL stopping after tab list, before tab contentDEMO - xsl simplified and color coded Top half of XSL stopping after tab list, before tab content Bright blue = xsl Light green = abbreviated xsl Orange = html 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41

    nav nav-pills nav nav-tabs
  • active
Two additional variables for education-filled, website-filled

11 THANK YOU! Resources OFFICIAL XML SCHEMAhttps://www.w3.org/2001/XMLSchema DEMO RESOURCES: https://github.com/admonkey/directory-profile.snippet THANK YOU!