skip to main content
Root Match Templates in ePublisher Designer
The root match template has a number of responsibilities in ePublisher Designer. They are listed here:
Recording Files and Dependencies
Loading Node Sets
Progress recording for the extension object that lives in the wwprogress namespace
Up-to-Date checking on the projects output files
Writing output
Recording Files and Dependencies
All root match templates in ePublisher Designer XSL files begin and end with the <wwfiles:Files></wwfiles:Files> elements. Within each root match template, usually near the bottom are one or more <wwfiles:Files> elements which include one or more <wwfiles:Depends /> elements. The attributes in these elements provide information about the file such as the path, and type. Upon completion of a stage, the ePublisher Designer engine will write the location of the processed information in the files.info file for use by other stages attempting to complete their pipeline. Each stage may draw information from files.info and deposit information for use by another stage.
Loading Node Sets
Another responsibility of the ePublisher Designer XSL root match template is to load the node sets needed for the transformation. This is usually done by accessing one or more <wwfiles:Files /> elements from files.info, and using the path attribute on each <wwfiles:Files /> element together with the document() or wwexsldoc:LoadXMLWithoutResolver extension object, to load the node set for the transform. In most cases, the <wwfiles:Files /> elements are selected using an XSL parameter from the format.wwfmt file, or Stage in the current Pipeline.
wwprogress
The wwprogress extension object sends messages to the ePublisher Designer progress indicator. If a root match template is being applied over several documents in several groups, then the number of documents or groups to be processed is recorded using the Start method in the wwprogress namespace.
Notice that an operation registered with the wwprogress extension object has concluded is initiated by using the End method.
Up-to-Date
The ePublisher Designer’s XSL file’s root match template also ensures whether files to be processed are up to date. This is accomplished by passing attributes accepted by the wwfilesext:UpToDate extension method.
Writing Output
If a file is determined to be not up to date, then a XSL template is called, with the result then passed along with information regarding what type of output file is to be written, to the wwexsldoc:Document() method for processing. If the output is to contain XML or HTML elements, then it is necessary to use the msxsl:node-set() method to make the contents of the variable behave as a new XML fragment.
Was this helpful?
Last modified date: 08/16/2017