Project

Profile

Help

Bug #4688

closed

EE 9.9.1.7 strange function parameter overriding

Added by Andy Yar over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XPath conformance
Sprint/Milestone:
-
Start date:
2020-08-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
10, 9.9, trunk
Fix Committed on Branch:
10, 9.9, trunk
Fixed in Maintenance Release:
Platforms:

Description

Hello, during an internal Saxon upgrade 9.8.0.15J to 9.9.1.7J regression testing we have found out a strange issue. Our custom functions suddenly started to behave odd.

Using following snippet, the output should mimic the standard format-number(). Thus it should format value1 and value2 using the mask given as second parameter of the function call. However, this doesn't seem to be the case using EE 9.9.1.7.

The whole transformation file is attached as test2.xsl.

 <xsl:template match="root">
        <root>
            <format1>
                <xsl:value-of select="f:format-number(value1, '000')"/>
            </format1>
            <format2>
                <xsl:value-of select="f:format-number(value2, '0000000000')"/>
            </format2>
        </root>
    </xsl:template>

...

The output contains both value1 and value2 formatted as both were using the second mask of the parameter call.

 <format1>0000000058</format1>
 <format2>0000000064</format2>

For example, using PE 9.9.1.7 seems to handle the parameter passing correctly:

  <format1>058</format1>
  <format2>0000000064</format2>

Since there are numerous differences in both Saxon configurations, both attached outputs (fail.xml and correct.xml) contain a full environment printout. These particular test outputs were obtained using a copy of Oxygen IDE.

Is this a known issue? Thanks


Files

fail.xml (8.27 KB) fail.xml Wrong output - format1 using not the first parameter 000 but the second one Andy Yar, 2020-08-17 16:17
correct.xml (8.26 KB) correct.xml Correct output - format1 using correct parameter 000 Andy Yar, 2020-08-17 16:17
format.xml (107 Bytes) format.xml Dummy test data Andy Yar, 2020-08-17 16:17
test2.xsl (2.52 KB) test2.xsl Two calls of a custom fuction Andy Yar, 2020-08-17 16:17

Please register to edit this issue

Also available in: Atom PDF