Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
2.6
-
None
-
None
Description
There is code in the XML serializer to add a newline character after serializing a processing instruction:
// Always output a newline char if not inside of an
// element. The whitespace is not significant in that
// case.
if (m_elemContext.m_currentElemDepth <= 0)
writer.write(m_lineSep, 0, m_lineSepLen);
The whitespace is not significant if the result is an XML document, but it is if it's a general parsed entity. This is the same reason the serializer was modified not to add a newline character after the XML/text declaration.
There are some input files to reproduce this on the corresponding Xalan-C issue:
Attachments
Issue Links
- duplicates
-
XALANJ-1497 xsl:copy adds a newline to processing instructions
- Resolved