[ http://issues.apache.org/jira/browse/XALANJ-1368?page=comments#action_12319512 ]
Jörg Heinicke commented on XALANJ-1368: --------------------------------------- Yes, it works for me. Am I not allowed to close the bug or am I just blind to find the button? > multiple key definitions (same name) do not work as expected on longer strings > ------------------------------------------------------------------------------ > > Key: XALANJ-1368 > URL: http://issues.apache.org/jira/browse/XALANJ-1368 > Project: XalanJ2 > Type: Bug > Components: transformation, Xalan-interpretive > Versions: 2.4 > Environment: Operating System: Other > Platform: Other > Reporter: Jörg Heinicke > Priority: Blocker > Attachments: patch.j1368.txt, test.xml, test.xsl > > 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. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
