Where can I find a list of the properties of Transformer.setOutputProperty?

Essentially, the properties can be anything you put into it. Properties are "defaulted" by default properties specified by section 16 of the XSL Transformations (XSLT) W3C Recommendation. If any of the argument keys are not recognized and are not name-space qualified, the property will be ignored and not returned. If you really need a complete list - I'd say Sec 16 of the W3C recommendations is a good place to start.


Rather obscurely, they're documented in the Xalan proprietary javadoc:

This method is used to set or override the value of the effective xsl:output attribute values specified in the stylesheet.

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");

Also, check out the javax.xml.transform.OutputKeys class.

tran.setOutputProperty(OutputKeys.STANDALONE, "yes");

Tags:

Java

Xml