Presentation is loading. Please wait.

Presentation is loading. Please wait.

Power Hour October 2010 Building Custom Formats

Similar presentations


Presentation on theme: "Power Hour October 2010 Building Custom Formats"— Presentation transcript:

1 Power Hour October 2010 Building Custom Formats
Ben Allums

2 Power Hour – October 2010 Agenda Survey Results
Building Custom Formats Concepts Code Practice Webinars of Interest

3 Power Hour – October 2010 Survey Results

4 Survey Results When to meet:

5 Survey Results Topics to cover:

6 Survey Results Topics to cover:
Using the XML adapter with DTDs other than DITA Files needed to customize the WebWorks 5 template - has their location changed since the help doc on the wiki was posted? pre

7 Building Custom Formats
Power Hour – October 2010 Building Custom Formats

8 Building Custom Formats
Concepts Code Practice

9 Building Custom Formats
Concepts

10 Building Custom Formats
Concepts Start with XML Script with XSLT Use the File Library Finding files Adding files Extension Methods, for everything else Manipulate with file & URI paths Write files Log progress

11 Concepts Container Nested Nested Start with XML Structured content
Distinguish with attributes Container id=top Nested id=first type=aaa Nested id=sec type=aaa

12 Concepts Container * Container A Nested Copy Nested type=aaa A Nested
Script with XSLT Match context Emit new structure or keep the same Container id=top * Container A Nested Copy Nested id=first type=aaa type=aaa A Nested A Nested id=sec type=aaa Copy

13 Concepts Files File File Use the File Library Finding files
Adding files Files File path type File path type

14 Concepts * wwfilesystem Copy wwexsldoc type=aaa A wwlog Copy
Extension Methods, for everything else Manipulate with file & URI paths Write files Log progress * wwfilesystem Copy wwexsldoc type=aaa A wwlog Copy

15 Building Custom Formats
Code

16 Building Custom Formats
Code Start with XML Script with XSLT Use the File Library Finding files Adding files Extension Methods, for everything else Manipulate with file & URI paths Write files Log progress

17 Code Start with XML All content (FrameMaker, Word, DITA) goes to XML
WebWorks Intermediate Format (WIF) <?xml version="1.0" encoding="utf-8"?> <Document xmlns="urn:WebWorks-Document-Schema">  <Content> <Paragraph id=" " stylename="Heading1"> <TextRun id=" " stylename="Bold"> <Text value="Example WIF Document" /> </TextRun> <TextRun id=" "> <Text value=" shows what is possible." /> </TextRun> </Paragraph> </Content> </Document>

18 Code Script with XSLT Match content Emit as you like
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet> <xsl:template match="/"> <xsl:apply-templates /> </xsl:template> <xsl:template = 'Heading 1']"> <h1> <xsl:apply-templates /> </h1> </xsl:template> <xsl:template match="*"> <xsl:apply-templates /> </xsl:template> ... </xsl:stylesheet> = 'Heading 1'] <h1> </h1>

19 Code Use the File Library Tracks every file ePublisher knows about
Look for types (and also group and document IDs) <?xml version="1.0" encoding="utf-8"?> <Files version="1.0" xmlns="urn:WebWorks-Engine-Files-Schema"> <File path="C:\Temp\WebWorks\ePublisher\Data\resource.fmwif" type="engine:conversion" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4"> <Depends path="C:\Desktop\book\resource.fm" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </File> <File path="C:\Temp\WebWorks\ePublisher\Data\resource.wif" type="engine:wif" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4"> <Depends path="C:\Temp\WebWorks\ePublisher\Data\resource.fmwif" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </File> type="engine:conversion" type="engine:wif"

20 Code Use the File Library Finding files  Query by type
Process all files of a given type at once <?xml version="1.0" encoding="utf-8"?> <Files version="1.0" xmlns="urn:WebWorks-Engine-Files-Schema"> <File path="C:\Temp\WebWorks\ePublisher\Data\resource.fmwif" type="engine:conversion" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4"> <Depends path="C:\Desktop\book\resource.fm" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </File> <File path="C:\Temp\WebWorks\ePublisher\Data\resource.wif" type="engine:wif" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4"> <Depends path="C:\Temp\WebWorks\ePublisher\Data\resource.fmwif" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </File> type="engine:wif"

21 Code Use the File Library
Adding files  Tell ePublisher what you created Available to all later processing stages <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet> <xsl:template match="/"> <wwfiles:Files> <wwfiles:File path="C:\Desktop\my_new_file.html" type="output:page" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </wwfiles:Files> </xsl:template> ... </xsl:stylesheet> <wwfiles:Files> <wwfiles:File path="C:\Desktop\my_new_file.html" type="output:page" groupID="WS29Gkg8W7g" documentID="V-d9Aksa5_4" /> </wwfiles:Files>

22 Code Extension Methods, for everything else XSLT only goes so far
Extension methods enable ePublisher to provide a complete solution <?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet> <xsl:template match="/"> <xsl:variable name="VarPageAsXML"> <!-- Page content --> </xsl:variable> <xsl:variable name="VarPage" select="msxsl:node-set($VarPageAsXML)" /> <xsl:variable name="VarPath" select="wwfilesystem:Combine($VarOutputDir,'file.html')" /> <xsl:variable name="VarWriteFile" select="wwexsldoc:Document($VarPage, $VarPath)" /> </xsl:template> ... </xsl:stylesheet> wwfilesystem:Combine($VarOutputDir,'file.html') wwexsldoc:Document($VarPage, $VarPath)

23 Building Custom Formats
Practice

24 Building Custom Formats
Practice Minimal format to get started Customize an existing format Let’s try it!

25 Power Hour – October 2010 Webinars of Interest

26 Webinars of Interest Show Me: November 18th at 11:30am Central
Topic: Single Sourcing your Content & ePublisher Learn what the ePublisher platform can do for you right out of the box. Hosted by members of the WebWorks staff Repeats on the 3rd Thursday of every month Sign-up at

27 Webinars of Interest Study Hall: November 10th at 1:00pm Central
Open forum for ePublisher users Ask questions or request help on custom projects Hosted by members of the WebWorks development staff Repeats on the 2nd and last Wednesdays of every month Join at

28 Webinars of Interest Archives:
Power Hour Show Me!

29 Power Hour October 2010 Building Custom Formats
Ben Allums


Download ppt "Power Hour October 2010 Building Custom Formats"

Similar presentations


Ads by Google