XML Transformer configuration help

D

damir.korencic

Hi ppl,

Does somebody know how to cofigure a
javax.xml.transform.Transformer object
so that it does not output all of the element attributes
with their default values, just the attributes that are
present in the original XML document, that is
parsed, transformed (only values of text attributes
of certain elements are changed) via DOM api and then
output via the transformer.
Or, more generally, does somebody know what
are the other implicit transformations that the
Transformer class can make when outputing
the document?

Tnx a lot,

Damir
 
J

John B. Matthews

Does somebody know how to cofigure a javax.xml.transform.Transformer
object so that it does not output all of the element attributes with
their default values, just the attributes that are present in the
original XML document, that is parsed, transformed (only values of
text attributes of certain elements are changed) via DOM api and then
output via the transformer. Or, more generally, does somebody know
what are the other implicit transformations that the Transformer
class can make when outputing the document?

I'd think that would depend on 1) the implementation dependent factory
returned by TransformerFactory.newInstance(), as described here:

<http://java.sun.com/javase/6/docs/api/javax/xml/transform/TransformerFac
tory.html#newInstance()>

and 2) the XSLT supplied to the factory's newTransformer() method. With
no XSLT, the identity Transform copies everything.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top