1 / 36

Power Hour End of 2012 XSLT Basics and applying to ePublisher

Learn the basics of XSLT and how to apply it to ePublisher. Explore XML, XSLT programming language, and XML namespaces.

rchisholm
Download Presentation

Power Hour End of 2012 XSLT Basics and applying to ePublisher

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Conference Number: 805-309-0248Participant Code: 880-0006 Power HourEnd of 2012 XSLTBasics and applying to ePublisher

  2. Power Hour – End of 2012 Agenda • XSLTBasics and applying to ePublisher • Survey Results • Webinar Schedule

  3. Power Hour – End of 2012 XSLTBasics and applying to ePublisher

  4. XSLT – Basics and applying to ePublisher Experience – Snapshot from January 2012

  5. XSLT – Basics and applying to ePublisher What are your goals for this session?

  6. XSLT – Basics and applying to ePublisher What are your goals for this session? • I'm a beginner on XSLT. I want to learn as much as possible about it. • I need to have background on Why, How, & Where XSLT is used • Is there a way to use XSLT to write a line to a text file?

  7. XSLT – Basics and applying to ePublisher What are your goals for this session? • The logic of the ww namespace; I see this in all the xsl files • How XSLT connects in different ePublisher files? For example, how does the default.wwconfig connect to content.xsl file? Power Hour ArchiveOctober 2012

  8. XSLT – Basics and applying to ePublisher What are your goals for this session? • Mainly about templates • How to customize the output • One goal (possibly unrelated and perhaps performed through CSS instead) is to customize Reverb's toolbar/header Power Hour ArchiveAugust & September 2012

  9. XSLT – Basics and applying to ePublisher What are your goals for this session? • Documentation/Information on the ePublisher proprietary tags and schema implemented with WebWorks such as: • WebWorks-Engine-Files-Schema • WebWorks-Document-Schema • WebWorks-Page-Template-Schema • WebWorks-XSLT-Extension-Log • WebWorks-XSLT-Extension-FileSystem WebWorks WikiDevCenter/Documentation

  10. XSLT – Basics and applying to ePublisher What are your goals for this session? • How to use the <xsl:import href="wwtransform:super" /> to code a format override that requires edits in multiple places within content.xsl. How do the multiple "super" entries align with the default content.xsl? As an example, how would the "super" be used to code for a character-based dropdown feature? Study Hall

  11. XSLT – Basics and applying to ePublisher Topics to cover • XML • XML Namespaces • XSLT • XPath • XSLT Output • Using XSLT to get real work done

  12. XSLT – Basics and applying to ePublisher Tools to help us learn • WebWorks Toystoys.webworks.com • Text Editor (or XML/XSLT editor) • ePublisher Designer

  13. XSLT – Basics and applying to ePublisher XML • Standard syntax for representing any type of structured data • XML Declaration<?xml version="1.0" encoding="UTF-8" ?> • Elements<element> • Attributes<element attribute="value">

  14. XSLT – Basics and applying to ePublisher XML <?xml version="1.0" encoding="utf-8"?><Document> <Content> <Paragraph id="501" stylename="Heading1"> <TextRun id="501-1" stylename="Bold"> <Text value="Example WIF Document" /> </TextRun> </Paragraph> </Content></Document>

  15. XSLT – Basics and applying to ePublisher XML Namespaces • Identify elements with their specification • URL – http://www.w3.org/1999/xhtml • URN – urn:WebWorks-Document-Schema • Difference? • URLs may be resolved by XSLT processors • URNs are just names and are not resolved

  16. XSLT – Basics and applying to ePublisher XML Namespaces • Allow you to mix XML tags in a single XML file • xmlns:html="http://www.w3.org/1999/xhtml" • xmlns:xsl="http://www.w3.org/1999/XSL/Transform" • Same element name possible in both namespaces • <html:choose> • <xsl:choose>

  17. XSLT – Basics and applying to ePublisher XML Namespaces <?xml version="1.0" encoding="UTF-8"?><wwdoc:Document version="1.0"xmlns:wwdoc="urn:WebWorks-Document-Schema"xmlns:html="http://www.w3.org/1999/xhtml"> <wwdoc:Content> <wwdoc:Paragraph id="1"> <wwdoc:TextRun id="1-1"> <wwdoc:Text value="Text in a paragraph." /> </wwdoc:TextRun> <html:div>Embedded HTML markup</html:div> </wwdoc:Paragraph> </wwdoc:Content></wwdoc:Document> xmlns:html="http://www.w3.org/1999/xhtml" <html:div>Embedded HTML markup</html:div>

  18. XSLT – Basics and applying to ePublisher XSLT • Programming language for transforming XML files • Programming language that is itself written in XML

  19. XSLT – Basics and applying to ePublisher XSLT <?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0"xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"xmlns:wwdoc="urn:WebWorks-Document-Schema"> <xsl:template match="wwdoc:Paragraph"> <html:div> Matched a paragraph! </html:div> </xsl:template></xsl:stylesheet> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:template

  20. XSLT – Basics and applying to ePublisher XPath • Query language built-in to XSLT • Allows you to query XML data as if it were a database • Basis of XSLT processing

  21. XSLT – Basics and applying to ePublisher Goal: Select the wwdoc:Text element XPath //wwdoc:Paragraph[@id='1']/wwdoc:TextRun[1]/wwdoc:Text/@value //wwdoc:Text/@value <?xml version="1.0" encoding="UTF-8"?><wwdoc:Document version="1.0"xmlns:wwdoc="urn:WebWorks-Document-Schema"xmlns:html="http://www.w3.org/1999/xhtml"> <wwdoc:Content> <wwdoc:Paragraph id="1"> <wwdoc:TextRun id="1-1"> <wwdoc:Text value="Text in a paragraph." /> </wwdoc:TextRun> <html:div>Embedded HTML mark up</html:div> </wwdoc:Paragraph> </wwdoc:Content></wwdoc:Document> <wwdoc:Text value="Text in a paragraph." />

  22. XSLT – Basics and applying to ePublisher XSLT Output • XSLT 1.0 supports one default input and one output • ePublisher extends XSLT 1.0 to support multiple output files of different types • XML • HTML • XHTML • Text

  23. XSLT – Basics and applying to ePublisher Using XSLT to get real work done • Simple case for XSLT is taking a single input file and outputting to one result file • Real world XSLT is taking input from multiple files and outputting them to one or more result files • ePublisher supports the real world case;-)

  24. XSLT – Basics and applying to ePublisher Tips • Create XSLT transforms that perform a single, clear operation • Process data multiple times if necessary to derive answers to complex questions • Combine two files into one to ensure clear code ePublisher tries to follow these rules!

  25. XSLT – Basics and applying to ePublisher Resources • WebWorks Toys – XSLT Transforms • XML Namespace Name: URN or URL? • Understand XML Namespaces • XSLT 1.0 & XPath 1.0 Quick Reference • Power Hour – January 2012 • Power Hour – September 2010

  26. Power Hour – End of 2012 Survey Results

  27. Survey Results When to meet:

  28. Survey Results Voice Options:

  29. Survey Results Topics to cover:

  30. Survey Results Topics to cover: • The order that underlying ePublisher files are processed during DITA generation and what is happening at each processing point • Checklist for deploying Reverb to a web server; what am I supposed to tell my IT people? What should I check - browsers/web server settings, etc. Power Hour ArchiveOctober 2012

  31. Survey Results Topics to cover: • Cross-applying web styles from one output format to another (e.g., WebHelp styles to Reverb or EPUB) • Detailed scripting for AutoMap • DITA to XSL-FO and PDF Show Me

  32. Power Hour – End of 2012 Webinar Schedule

  33. Webinar Schedule Power Hour: • January 31th at 2:00pm Central • ePublisher - Invoking tools and post-processing outputs Sign-up atwww.webworks.com/eSchool/Power_Hour/

  34. Webinar Schedule Show Me: • December 20th at 10:30am Central • Learn what the ePublisher platform can do for you • Repeats monthly on the 3rd Thursday Sign-up atwww.webworks.com/eSchool/Show_Me/

  35. Webinar Schedule Study Hall: • December 12th at 1:00pm Central • Open forum for ePublisher users • Repeats monthly on the 2nd and last Wednesdays Join atwww.webworks.com/eSchool/Study_Hall/

  36. Power HourEnd of 2012 XSLTBasics and applying to ePublisher

More Related