ePublisher Invoking Tools and Post-Processing Outputs Conference Number: 805-309-0248 Participant Code: 880-0006 Power Hour January 2013 ePublisher Invoking Tools and Post-Processing Outputs
ePublisher Invoking Tools and Post-Processing Outputs Power Hour – January 2013 Agenda Next Month’s Topic ePublisher Invoking Tools and Post-Processing Outputs Survey Results Webinar Schedule
Power Hour – January 2013 Next Month’s Topic
PDFs from DITA Examining the process of DITA to XSL-FO to PDF Next Month’s Topic Tie vote PDFs from DITA Examining the process of DITA to XSL-FO to PDF XSLT, Part II Beyond the Basics, Applying to ePublisher
ePublisher Invoking Tools and Post-Processing Outputs Power Hour – January 2013 ePublisher Invoking Tools and Post-Processing Outputs
Invoking Tools and Post-Processing Outputs What are your goals for this session?
Invoking Tools and Post-Processing Outputs What are your goals for this session? Not familiar with external tools available to post-process generated files. We use a few scripts with customized CSS files. Each time I upgrade the projects, I have to go into the Designer and be sure that the same selections are made. Is there an easier way to do this?
Invoking Tools and Post-Processing Outputs Topics to cover Output files from an XML source Post-process generated files with an external tool Run scripts to include data in generated content Run scripts during the publishing process to integrate with other systems
Invoking Tools and Post-Processing Outputs Background Topics Using XSL to process XML and text files Invoking command-line tools from XSL Embedding scripts in XSL Adding format stages Finding files in files.info
Invoking Tools and Post-Processing Outputs Resources Document XSL Extension http://wiki.webworks.com/DevCenter/Documentation/ExtensionObjects/ePublisher/ExslDocument Exec XSL Extension http://wiki.webworks.com/DevCenter/Documentation/ExtensionObjects/ePublisher/Exec MSXSL Script Blocks http://msdn.microsoft.com/en-us/library/533texsx%28v=vs.80%29.aspx Format Definition Files http://www.webworks.com/Documentation/Reverb/#page/04.Reference%2520Information/How%2 520It%2520Works.1.15.htm Toys Transform Server + files.info http://toys.webworks.com/ files-info-reporter (Resources for this webinar)
Invoking Tools and Post-Processing Outputs Using XSL to process XML and text files Load files using standard document() function or ePublisher’s Load function <xsl:variable name="VarDocument1" select="document('file:///C:/info.xml')" /> <xsl:variable name="VarDocument2" select="wwexsldoc:LoadXMLWithoutResolver ('file:///C:/info.xml')" /> <xsl:variable name="VarDocument3" select="wwexsldoc:LoadXMLWithoutResolver ('C:\info.xml')" />
Invoking Tools and Post-Processing Outputs Using XSL to process XML and text files Write files using ePublisher Document method <xsl:variable name="VarWriteDocument" select="wwexsldoc:Document( $VarResult, 'C:\badplacefor.xml')" />
Invoking Tools and Post-Processing Outputs Using XSL to process XML and text files Replace strings in a file Formats\Microsoft HTML Help 1.x\Transforms\htmlhelp_hhp.xsl <xsl:variable name="VarEntriesAsXML"> <wwmultisere:Entry match="$DefaultTopic;" replacement="{$VarDefaultTopic}" /> <wwmultisere:Entry match="$HomePage;" replacement="{$VarHomePage}" /> </xsl:variable> <xsl:variable name="VarEntries" select="msxsl:node-set($VarEntriesAsXML)/*" /> <xsl:variable name="VarReplaceInFile" select="wwmultisere:ReplaceAllInFile( 'UTF-8', $GlobalHHPPageTemplatePath, 'UTF-8', $ParamOutPath, $VarEntries)" />
Invoking Tools and Post-Processing Outputs Using XSL to process XML and text files Read text files into an XML document Shared\common\pages\pagetemplate.xsl Use in combination with String Utilities http://wiki.webworks.com/DevCenter/Documentation/ExtensionObjects/ePublisher/StringUtilities <xsl:variable name="VarFileContents" select="wwstring:FromFile('C:\data.txt', 'UTF-8')" />
Invoking Tools and Post-Processing Outputs Invoking command-line tools from XSL Invoke Results <xsl:variable name="VarExecResult" select="wwexec:Execute('doit.exe in out')" /> <wwexec:Result version="1.0" retcode="-1"> <wwexec:Stream name="Output"> Standard output will show up here, aka stdout. </wwexec:Stream> <wwexec:Stream name="Error"> Standard error will show up here, aka stderr. </wwexec:Stream> </wwexec:Result>
Invoking Tools and Post-Processing Outputs Embedding scripts in XSL Examples in ePublisher (these use C#) Shared\common\behaviors\finalize.xsl Shared\common\index\combine.xsl Shared\common\pdf\generate.xsl WebWorks Reverb\Transforms\search-index.xsl Any .NET language is supported (C#, VB.NET, F#, Jscript, etc.)
Invoking Tools and Post-Processing Outputs Adding format stages <Format version="1.0" xmlns="urn:WebWorks-Engine-Format-Schema"> <Capabilities>...</Capabilities> <TaskGroups>...</TaskGroups> <Pipelines> ... </Pipelines> </Format>
Invoking Tools and Post-Processing Outputs Adding format stages <Pipelines> <Pipeline name="Alpha"> <Stage>...</Stage> </Pipeline> <Pipeline name="Omega"> <Depends pipeline="Alpha" /> <Stage>...</Stage> </Pipeline> <Pipelines>
Invoking Tools and Post-Processing Outputs Adding format stages <Pipeline name="Omega"> <Depends pipeline="Alpha" /> <Stage type="xsl" action="wwformat:Transforms/pages.xsl"> <Parameter name="ParameterDependsType" value="engine:wif" /> <Parameter name="ParameterType" value="page:output" /> </Stage> </Pipeline>
Invoking Tools and Post-Processing Outputs Finding files in files.info <File path="C:\Output\html\files\about-documents.html" displayname="" type="page:output" checksum="634952537864096566:6033" projectchecksum="Z3b3W8H104A" groupID="RkxF9LT9R3I" documentID="MeMtvSYl88c" pipeline="Page" actionchecksum="aNeO1hn2XvbWLGFTe/Fm+A==" category="pages" use="external" deploy="true" >
Power Hour – January 2013 Survey Results
Survey Results When to meet:
Survey Results Voice Options:
Survey Results Topics to cover:
Survey Results Show Me! Topics to cover: Working with ePublisher Designer - the basics and a bit beyond Working with page breaks, TOCs, mini-TOCs and bookmarks when generating PDF documents from Word format. Show Me!
Power Hour – January 2013 Webinar Schedule
Power Hour: Webinar Schedule February 28th at 2:00pm Central Webinar Vote PDFs from DITA Examining the process of DITA to XSL-FO to PDF XSLT, Part II Beyond the Basics, Applying to ePublisher Sign-up at www.webworks.com/eSchool/Power_Hour/
Show Me: Webinar Schedule February 21th at 1:30pm Central Learn what the ePublisher platform can do for you Repeats monthly on the 3rd Thursday Sign-up at www.webworks.com/eSchool/Show_Me/
Study Hall: Webinar Schedule February 13th at 1:00pm Central Open forum for ePublisher users Repeats monthly on the 2nd and last Wednesdays Join at www.webworks.com/eSchool/Study_Hall/
Power Hour January 2013 ePublisher Invoking Tools and Post-Processing Outputs