Project

Profile

Help

Bug #6467

closed

xsl:merge error when using Tlevel:high but not with other Tlevel values (Saxon HE12.5 Java)

Added by Adrian Bird 5 months ago. Updated 4 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2024-07-04
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

I have a simple xsl:merge test case that fails with this error when I run it with Tlevel:high. It works fine with Tlevel:normal or low or not set.

Error at xsl:merge on line 17 column 18 of Merge.xslt:
  XTDE2210  Corresponding xsl:merge-key attributes in different xsl:merge-source elements do
  not have the same effective values
In template xsl:initial-template on line 4 column 45 of Merge.xslt:
Corresponding xsl:merge-key attributes in different xsl:merge-source elements do not have the same effective values

The code merges the data from the 2 variables and the xsl:merge-source elements are basically the same:

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template name="xsl:initial-template">
    <root>
      <!-- 2 data sets to be merged -->
      <xsl:variable name="mergeSourceA">
        <node>100</node>
        <node>300</node>
        <node>500</node>
      </xsl:variable>
      <xsl:variable name="mergeSourceB">
        <node>200</node>
        <node>400</node>
        <node>600</node>
      </xsl:variable>
      <xsl:merge>
        <xsl:merge-source select="$mergeSourceA/*">
          <xsl:merge-key select="." />
        </xsl:merge-source>
        <xsl:merge-source select="$mergeSourceB/*">
          <xsl:merge-key select="." />
        </xsl:merge-source>
        <xsl:merge-action>
          <node>
            <xsl:value-of select="current-merge-key()"/>
          </node>
        </xsl:merge-action>
      </xsl:merge>
    </root>
  </xsl:template>
</xsl:stylesheet>

Adrian


Files

Merge.xslt (996 Bytes) Merge.xslt Simple xsl:merge test case Adrian Bird, 2024-07-04 09:50

Please register to edit this issue

Also available in: Atom PDF