Actions
Bug #3414
closedvalue-of generates extra white-space and new line characters
Status:
Rejected
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2017-08-28
Due date:
% Done:
0%
Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:
Description
We are using Saxon-HE in one of our .NET projects. We’ve noticed recently the following issue – when ‘value-of’ is applied to multiple nodes as below
XSLT:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
<xsl:template match="/">
<data>
<value id="febf90c4">
<xsl:attribute name="value">
<xsl:value-of select="/Clients/Client1/Personal/Initial" />
</xsl:attribute>
</value>
</data>
</xsl:template>
</xsl:transform>
Input XML:
<Clients>
<Client1 Id="6180657">
<Personal Id="6180657">
<Initial>
<FirstName type="q5:string">M</FirstName>
<LastName type="q6:string">P</LastName>
</Initial>
</Personal>
</Client1>
</Clients>
the transformation produces incorrect result
Output XML:
<data xmlns:xs="http://www.w3.org/2001/XMLSchema">
<value id="febf90c4" value="
 M
 P
 " />
</data>
Expected XML:
<data xmlns:xs="http://www.w3.org/2001/XMLSchema">
<value id="febf90c4" value="MP" />
</data>
I assume concatenation of several nodes includes indentation characters into the output value.
Files
Please register to edit this issue
Actions