ExslDocument
Purpose:
- Allow multiple output files from an single XSL transform. Also provides routines to quickly load XML files without invoking XML validators as well as utility methods to enable correct output formatting.
Namespace:
urn:WebWorks-XSLT-Extension-Document
Prefix:
wwexsldoc
Methods:
Document(node-set nodeSet, string path, string encoding, string method, string version, string indent, string omit_xml_declaration, string standalone, string doctype_public, string doctype_system, string cdata_section_elements, string media_type):
Writes the specified node set to a file at the location defined by path. For information on additional parameters, please refer to XSL documentation for the <xsl:output> element.
Returns:- Nothing.
- Write a node set to a file.
<xsl:variable name="VarResultAsXML"> ... </xsl:variable> <xsl:variable name="VarResult" select="msxsl:node-set($VarResultAsXML)/*" /> <xsl:variable name="VarWriteDocument" select="wwexsldoc:Document($VarResult, 'C:\badplacefor.xml')" />
- Loads an XML file without resolving internal paths and validation DTDs.
Returns:- A node set.
- Load the page template without resolving attribute paths.
<xsl:variable name="VarPageTemplate" select="wwexsldoc:LoadXMLWithoutResolver($VarPathTemplatePath)" />
MakeEmptyElement(node-set nodeSet):
- Converts a non-empty XML node to an empty node.
Returns:- A node set contain a single empty XML node.
Insure <img> element is emitted as an empty XML node for proper display in HTML browsers.
<xsl:variable name="VarImageElementAsXML"> <xsl:element name="img"> <xsl:attribute name="src"> <xsl:value-of select="'blue.jpg'" /> </xsl:attribute> </xsl:element> </xsl:variable> <xsl:variable name="VarImageElement" select="msxsl:node-set($VarImageElementAsXML)/*" /> <xsl:value-of select="wwexsldoc:MakeEmptyElement($VarImageElement)" />