Identifying Files to Process
Processing files based on type rather than individual file names allows developers to define workflows for any number of input and output files. To identify the files each XSL transform should process or create, ePublisher defines an XML schema to store file information. A simplified form of this schema looks like the following example:
<Files>
 <File name="alpha.xml" type="Source" />
 <File name="delta.xml" type="Source" />
</Files>
This XML document is fed as input to each XSL transform, and every XSL transform emits the list of generated files using this same schema. Therefore, running doctoc.xsl with the previous example input file list returns the following output:
<Files>
 <File name="alpha_toc.xml" type="Doc_TOC" />
 <File name="delta_toc.xml" type="Doc_TOC" />
</Files>
In this example, the final transform, grouptoc.xsl, runs with the following input file list:
<Files>
 <File name="alpha.xml" type="Source" />
 <File name="delta.xml" type="Source" />
 <File name="alpha_toc.xml" type="Doc_TOC" />
 <File name="delta_toc.xml" type="Doc_TOC" />
</Files>
This final transform returns the following output:
<Files>
 <File name="group_toc.xml" type="Group_TOC" />
</Files>
The Source documents were fed into the grouptoc.xsl transform because all previous output files are available to all downstream XSL transforms. ePublisher allows developers to define as many XSL stages as needed, and each stage can process, reprocess, examine, and manage, any preceding file generated.
Was this helpful?
Last modified date: 11/30/2021