Project

Profile

Help

Bug #5739

closed

Space in string in text template not output as element content

Added by Martin Honnen over 1 year ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
XSLT Conformance
Sprint/Milestone:
Start date:
2022-11-20
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
2, Trunk
Fix Committed on JS Branch:
2, Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

Using xslt3 of SaxonJS 2.5 from the command line with e.g. -json:sample1.json -xsl:sheet1.xsl, I find that the explicit blank for the third element is not output/serialized i.e. with xslt3 the (wrong) output is

<?xml version="1.0" encoding="UTF-8"?>
<Details>
   <name indexarray="0">1</name>
   <name indexarray="1">2</name>
   <name indexarray="2"/>
</Details>

while SaxonCS gives the right output

<?xml version="1.0" encoding="UTF-8"?>
<Details>
   <name indexarray="0">1</name>
   <name indexarray="1">2</name>
   <name indexarray="2"> </name>
</Details>

Even simpler test case -it -xsl:sheet2.xsl gives

<?xml version="1.0" encoding="UTF-8"?>
<Test>
   <Text1> </Text1>
   <Text2/>
</Test>

with SaxonCS but misses the space with SaxonJS:

<?xml version="1.0" encoding="UTF-8"?>
<Test>
   <Text1/>
   <Text2/>
</Test>

Files

sample1.json (40 Bytes) sample1.json Martin Honnen, 2022-11-20 17:18
sheet1.xsl (516 Bytes) sheet1.xsl Martin Honnen, 2022-11-20 17:18
sheet2.xsl (411 Bytes) sheet2.xsl Martin Honnen, 2022-11-20 17:28
sheet2-saxoncsexport.xsl.sef.json (1.09 KB) sheet2-saxoncsexport.xsl.sef.json Martin Honnen, 2022-11-20 17:37

Please register to edit this issue

Also available in: Atom PDF Tracking page