Bug #3894
closed
Output properties item-separator and saxon:newline should not be whitespace-stripped
Applies to branch:
9.8, trunk
Fix Committed on Branch:
9.8, trunk
Fixed in Maintenance Release:
Description
Saxon is performing whitespace stripping on all serialization parameters supplied to xsl:output or xsl:result-document.
The is not appropriate for all parameters, in particular item-separator and saxon:newline.
The method ResultDocument.setSerializationProperty() refrains from doing space-stripping in the case of item-separator (but not saxon:newline), but in the case of parameters supplied to xsl:output and xsl:result-document the damage has already been done by then.
It's possible to get values containing spaces through from the command line (!saxon:newline=" ") though I haven't found a way to get newlines and carriage returns through this interface - no doubt it depends on the shell interpreter in use. Presumably this means it's also possible via the Java API.
- Status changed from New to Resolved
- Applies to branch 9.8, trunk added
- Fix Committed on Branch 9.8, trunk added
I have added some test cases to the XSLT 3.0 output and result-document test sets setting item-separator to various whitespace values. Note that these generally need to be written using character entities because of XML attribute value normalization.
I have added new test cases to the XSLT 3.0 Extra test suite output-properties for saxon:newline.
I have changed XSLOutput and XSLResultDocument to avoid trimming whitespace on item-separator
and saxon:newline
. With these changes the tests pass on the 9.9 branch. The item-separator property on the 9.8 branch is something of a lost cause, but I will make the same changes anyway, even though the tests fail for other reasons. Note that whitespace in a property computed as an AVT in xsl;result-document gets through without requiring these changes.
I have also changed ResultDocument.setSerializationProperty() to refrain from whitespace-stripping saxon:newline (there was already special-case code for item-separator in this case).
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.9.0.1 added
Bug fix applied in the Saxon 9.9.0.1 major release.
Leave open until fix applied in the next Saxon 9.8 maintenance release.
- Status changed from Resolved to Closed
- Fixed in Maintenance Release 9.8.0.15 added
Bug fix applied in the Saxon 9.8.0.15 maintenance release.
Please register to edit this issue
Also available in: Atom
PDF