-
Bug
-
Resolution: Fixed
-
P4
-
6
-
1.4
-
1.4
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2157489 | 7 | Joe Wang | P3 | Closed | Fixed | m05 |
JDK-2182515 | 6u18 | Santiago Pericasgeertsen | P4 | Closed | Fixed | b02 |
Products: JDK 6, JAXP RI 1.4.
The following XSLT code fragment:
<xsl:template match="title">
<xsl:number level="single" from="a" count="a|b|c|d|e" format="1" />
is applied to the following input:
<a>
<title>Level A</title>
For this <title> and the xsl:number element RI's transformer produces "1". But it should produce empty string "".
The XSLT 1.0 specification (http://www.w3.org/TR/xslt#number) says:
"If the from attribute is specified, then the only ancestors that are searched are those that are descendants of the nearest ancestor that matches the from pattern."
According to the specification, the XSLT element
<xsl:number level="single" from="a" count="a|b|c|d|e" format="1"/>
should return an empty string since there are no "a|b|c|d|e" elements which are descendants of the <a> element
(which is the first element on ancestor-or-self axis which matches expression in "from") and at the same time ancestors of <title>.
How to reproduce (all files are attached):
run "java XSLTransform numbering63.xml numbering63.xsl"
On JDK 6 it produces output presented in numbering63.ri but it should produce output like numbering63.expected.
The following XSLT code fragment:
<xsl:template match="title">
<xsl:number level="single" from="a" count="a|b|c|d|e" format="1" />
is applied to the following input:
<a>
<title>Level A</title>
For this <title> and the xsl:number element RI's transformer produces "1". But it should produce empty string "".
The XSLT 1.0 specification (http://www.w3.org/TR/xslt#number) says:
"If the from attribute is specified, then the only ancestors that are searched are those that are descendants of the nearest ancestor that matches the from pattern."
According to the specification, the XSLT element
<xsl:number level="single" from="a" count="a|b|c|d|e" format="1"/>
should return an empty string since there are no "a|b|c|d|e" elements which are descendants of the <a> element
(which is the first element on ancestor-or-self axis which matches expression in "from") and at the same time ancestors of <title>.
How to reproduce (all files are attached):
run "java XSLTransform numbering63.xml numbering63.xsl"
On JDK 6 it produces output presented in numbering63.ri but it should produce output like numbering63.expected.
- backported by
-
JDK-2157489 Wrong behaviour of the "xsl:number" element
-
- Closed
-
-
JDK-2182515 Wrong behaviour of the "xsl:number" element
-
- Closed
-