S
Simon Brooke
This relates to my earlier questions about namespaces...
When I use
javax.xml.transformer.Transformer.transform(
javax.xml.transform.Source, javax.xml.transform.Result)
then, if I pass a DOMResult object as the second argument, there's
nothing that I can see which I can get back from the DOMResult that
tells me that it wants the document to be pretty-printed. I can get back
the node which is the result of the transformation, and that node will
will in practice be either a document node or an element node. But I
can't see anything in either the DOM2 or DOM3 specifications for
Document, Element or Node which says whether they want to be pretty
printed - and, indeed, nor should there be, because a document is just a
bit of data and should be agnostic about its representation.
But the xslutput directive takes 'indent="yes"' as a possible
attribute-value pair. An XSL transform has to be able to tell me that it
wants to be pretty printed, and it would seem it has to pass that back
to me in the Result or DOMResult specifications. I just don't see it.
Am I being stupid?
When I use
javax.xml.transformer.Transformer.transform(
javax.xml.transform.Source, javax.xml.transform.Result)
then, if I pass a DOMResult object as the second argument, there's
nothing that I can see which I can get back from the DOMResult that
tells me that it wants the document to be pretty-printed. I can get back
the node which is the result of the transformation, and that node will
will in practice be either a document node or an element node. But I
can't see anything in either the DOM2 or DOM3 specifications for
Document, Element or Node which says whether they want to be pretty
printed - and, indeed, nor should there be, because a document is just a
bit of data and should be agnostic about its representation.
But the xslutput directive takes 'indent="yes"' as a possible
attribute-value pair. An XSL transform has to be able to tell me that it
wants to be pretty printed, and it would seem it has to pass that back
to me in the Result or DOMResult specifications. I just don't see it.
Am I being stupid?