You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Paul Winder <pw...@arbortext.com> on 2001/05/07 20:32:45 UTC
"disable-output-escaping" PI
Hi all,
We are using Xalan as an intermediate in our process, sending it SAX events
and taking the output as SAX events for further processing.
We have found that when we have an xsl:text tag in the stylesheet with the
attribute "disable-output-escaping" set with the value "yes",
Xalan is inserting PI's in the SAX output:
<span style='<?javax.xml.transform.enable-output-escaping ?>font-size:
.69em; <?javax.xml.transform.disable-output-escaping ?>'>
instead of the desired
<span style='font-size: .69em;'>
Looking at the class javax/xml/transformation/Result.java, I see a note
saying "result dom trees may also have PI_DISABLE_OUTPUT_ESCAPING and
PI_ENABLE_OUTPUT_ESCAPING inserted into the tree".
I wonder if this also applies to SAX output.
The PI is messing us up. Quoting Paul Grosso, who is responsible for the
stylesheet:
"disable-output-escaping is very important and is supported by
all processors that serialize a document. And if it is not
supported, the spec says:
'...the XSLT processor may signal an error; if it
does not signal an error, it must recover by not disabling
output escaping.'
It may not insert bogus PIs into the output stream."
and
"I'm hoping you can find a way to turn it off. Having PIs generated
in the middle of attribute values makes for non-wellformed XML! You
might mention that to the Apache folks."
So, is there a way to turn this off?
If not I'll have to filter out the PI's, which seems pretty ugly.
Any clarification of why you are doing this would be appreciated.
Thanks,
Paul Winder
Arbortext