$Id$ Ball Steve 2003 2001 Steve Ball XML Markup Templates
Introduction This stylesheet module provides functions for generating literal XML markup.
Create an XML Declaration This template returns an XML Declaration. Although the XSLT standard provides control over the generation of the XML Declaration, this template may be useful in circumstances where the values must be computed at runtime. version Version number. standalone Standalone indication. Must be value "yes" or "no". encoding Character encoding. Returns an XML Declaration as a string. <?xml version=" " standalone=" " invalid value "" for standalone attribute encoding=" " ?> Create a Document Type Declaration This template returns a Document Type Declaration. Although the XSLT standard provides control over the generation of a Document Type Declaration, this template may be useful in circumstances where the values for the identifiers or the internal subset must be computed at runtime. docel The name of the document element. publicid The public identifier for the external DTD subset. systemid The system identifier for the external DTD subset. internaldtd The internal DTD subset. Returns a Document Type Declaration as a string. No document element specified <!DOCTYPE [ ] > Create an Element Declaration This template returns an element declaration.. type The element type. content-spec The content specification. Returns an element declaration as a string. element type must be specified content specification must be specified <!ELEMENT > Create an Attribute List Declaration This template returns an attribute list declaration. type The element type. attr-defns Attribute definitions. Returns an attribute list declaration as a string. element type must be specified <!ATTLIST > Create an Attribute Definition This template returns an attribute definition. name The attribute name. type The attribute type. default The attribute default. Returns an attribute definition as a string. attribute name must be specified attribute type must be specified attribute default must be specified Create an Entity Declaration This template returns an entity declaration. If the 'text' parameter is given a value, then an internal entity is created. If either the 'publicid' or 'systemid' parameters are given a value then an external entity is created. It is an error for the 'text' parameter to have value as well as the 'publicid', 'systemid' or 'notation' parameters. name The entity name. parameter Boolean value to determine whether a parameter entity is created. Default is 'false()'. text The replacement text. Must be a string. nodes The replacement text as a nodeset. The nodeset is formatted as XML using the as-xml template. If both text and nodes are specified then nodes takes precedence. publicid The public identifier for an external entity. systemid The system identifier for an external entity. notation The notation for an external entity. Returns an entity declaration as a string. entity name must be specified both replacement text and external identifier specified <!ENTITY % NDATA " " > Quote an Attribute Value This template returns a quoted value. value The value to quote. Returns a quote value as a string. < &lt; " ' " " &quot; " ' ' " " Create an External Identifier This template returns an external identifier. publicid The public identifier. systemid The system identifier. Returns an external identifier as a string. PUBLIC " " " " SYSTEM " " Create an Entity Reference This template returns an entity reference. name The name of the entity. Returns an entity reference as a string. & ; Create a Notation Declaration This template returns a notation declaration. name The notation name. publicid The public identifier for the notation. systemid The system identifier for the notation. Returns a notation declaration as a string. notation name must be specified external identifier must be specified <!NOTATION > Create a CDATA Section This template returns a CDATA Section. The XSLT specification provides a mechanism for instructing the XSL processor to output character data in a CDATA section for certain elements, but this template may be useful in those circumstances where not all instances of an element are to have their content placed in a CDATA section. text The content of the CDATA section. Returns a CDATA section as a string. CDATA section contains "]]>" <![CDATA[ ]]> Format Nodeset As XML Markup This template returns XML markup. Each node in the given nodeset is converted to its equivalent XML markup. BUG: This version may not adequately handle XML Namespaces. nodes Nodeset to format as XML. Returns XML markup. < = > </ > /> <!-- --> <? ?>