Details
-
Bug
-
Status: Resolved
-
Resolution: Incomplete
-
2.7.1
-
None
-
None
-
Operating System: Other
Platform: Other
-
9530
Description
Haven't tested this, but it's claimed that the default identity tranformation
may copy the external subset into the result document's internal subset.
Current workaround: Construct a "real" identity transformation, eg from a
string. If you need to preserve the source document's <!DOCTYPE>, pre-read the
source to obtain that info and use that to build an appropriate <xsl:output>
into the string before building the transformation. Note that this will discard
any internal subset that may be present in the source.
Longer term: TransformerIdentityImpl needs to be reconsidered from the ground
up. It has never quite made up its mind whether it's an XSLT identity
transformation or just a serializer. If the former, we might want to provide a
way to programmatically set the equivalent of its <xsl:output> parameters to
allow creating a <!DOCTYPE> (though it would be the user's responsibility to set
this). If the latter, we ought to copy the <!DOCTYPE> and only the internal
subset through to the output stream(s)... assuming we can distinguish internal
from external, which may not always be possible.
See also Bug 1121, Bug 1831, Bug 5779 for other TransformerIdentityImpl
concerns.