Take control of the output of an XSLT stylesheet.
in XSLT has 10 attributes, each controlling a different aspect of
XSLT output. This hack lists each of these attributes and shows you
how to use them. All of
attributes are optional.
An XSLT stylesheet can have more than
output element, and the values found in the
attributes of those elements are combined. However, if a given
attribute occurs on more than one
the last occurrence trumps all previous occurrences. Nevertheless, it
is technically an error if an attribute (aside from
cdata-section-elements) occurs on more than one
output element in the stylesheet; however,
processors can recover by choosing the value from the last
output in the stylesheet.
method attribute can have the value
text for XML, HTML, and text output, respectively.
XSLT 2.0 will support a value of
xhtml for XHTML
support. The method attribute can also have a QName as a value, but
the QName must be recognized by the application processing it. If the
first element in the result is
html, the default
indent attribute takes the value
no. This tells the XSLT
processor to indent the output to the result tree, which helps make
output more readable. A value of
yes is the
default for the
html output method,
no for the
xml output method.
omit-xml-declaration attribute can have a value of ...