Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
2.4
-
Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
-
None
-
Operating System: Other
Platform: Other
-
PatchAvailable
Description
At the weekend we found a problem in Cocoon 2.1 (CVS head) using the used Xalan
2.4.1 and XSLTC there
(http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=103985066026426&w=2).
The files used for the tests were
xml-cocoon2\src\webapp\samples\flow\examples\prefs\pages\userInfo.xsp
and version 1.5
http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/java/org/apache/cocoon/components/language/markup/xsp/java/jpath.xsl
I will attach simplified versions of both files.
In the XSL there was a aggregated key declaration (or how is it called?):
<xsl:key name="JPathExprs" match="jpath:if" use="@test"/>
<xsl:key name="JPathExprs" match="jpath:when" use="@test"/>
<xsl:key name="JPathExprs" match="jpath:for-each" use="@select"/>
<xsl:key name="JPathExprs" match="jpath:value-of" use="@select"/>
When applying templates like
<xsl:apply-templates select="//jpath:if | //jpath:when | //jpath:value-of |
//jpath:for-each"/>
and using a template like
<xsl:template match="jpath:if | jpath:when | jpath:for-each | jpath:value-of">
<tr>
<td>
<xsl:value-of select="name()"/>
</td>
<td>
<xsl:value-of select="concat(@test, @select)"/>
</td>
<td>
<xsl:value-of select="generate-id()"/>
</td>
<td>
<xsl:value-of select="generate-id(key('JPathExprs', concat(@test,
@select)))"/>
</td>
<td>
<xsl:value-of select="count(key('JPathExprs', concat(@test,
@select)))"/>
</td>
</tr>
</xsl:template>
the generate-id() and the count() return wrong values for strings like "check
and firstName = ''". The generate-id() return is empty and the count() return is
0. But as you can guess those expressions are important for Muenchian Grouping.
Attachments
Attachments
Issue Links
- is duplicated by
-
XALANJ-1956 Xalan fails OASIS test case Keys_MultipltKeysInclude
- Resolved
-
XALANJ-1981 multiple <xsl:key> elements for the same index does not work
- Resolved