What is the use of the methods setOutputProperty()
, setParameter()
and setURIResolver()
of the class javax.xml.transform.Transformer
? I had went through the official documentation and many other online resources, but I was unable to understand it clearly.
Asked
Active
Viewed 296 times
0

David P. Caldwell
- 3,394
- 1
- 19
- 32

IdiotHub123
- 9
- 1
1 Answers
0
It's not obvious from the documentation because they don't link it prominently (but subtly), but setOutputProperty
refers to OutputKeys, and those values can be used for the property names (and contain information about what they do, like control the indentation of the output).
setParameter
makes a parameter value available to the transform; see XSL Transformation in Java with parameters.
setURIResolver
allows the caller to specify how to find URIs. This might, for example, be used to load public identifiers like -//OASIS//DTD DocBook XML//EN
; see Formal Public Identifier, or to load network resources from a local filesystem or database.

David P. Caldwell
- 3,394
- 1
- 19
- 32