Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
2.7.1
-
None
-
None
Description
The javadoc for TransformerImpl does a poor job of documenting the output properties that can be set via its setOutputProperty(name,value) method.
http://xml.apache.org/xalan-j/apidocs/org/apache/xalan/transformer/TransformerImpl.html
It says this:
<<
Set the value of a property. Recognized properties are:
"http://xml.apache.org/xslt/sourcebase" - the base URL for the source, which is needed when pure SAX ContentHandler transformation is to be done.
Parameters:
name - The property name, which is a fully-qualified URI.
value - The requested value for the property.
>>
It should probably say this:
<<
This method is used to set or override stylesheet xsl:output attributes.
The recognized standard output properties are:
cdata-section-elements
doctype-system
doctype-public
indent
media-type
method
omit-xml-declaration
standalone
version
For example, tran.setOutputProperty("standalone", "yes");
In the case of the cdata-section-elements property, the value should be a whitespace separated list of
element names and each name is just the local name of the element, if it is no namespace, or the
URI in braces followed immediately by the local name if the element is in that namespace. For example:
tran.setOutputProperty("cdata-section-elements", "elem1
elem2 elem3");
The recognized Xalan extension elements are:
content-handler
entities
indent-amount
line-separator
omit-meta-tag
use-url-escaping
These must be in the extension namespace of "http://xml.apache.org/xalan", and this is done by putting the namespace URI in
braces before the property name, for example:
tran.setOutputProperty("
line-separator" , "\n");
>>