[ http://issues.apache.org/jira/browse/XALANJ-1719?page=all ]
Brian Minchau updated XALANJ-1719: ---------------------------------- Version: Latest Development Code (was: 2.5) > muenchian grouping + sorting with strange effects > ------------------------------------------------- > > Key: XALANJ-1719 > URL: http://issues.apache.org/jira/browse/XALANJ-1719 > Project: XalanJ2 > Type: Bug > Components: transformation, Xalan-interpretive > Versions: Latest Development Code > Environment: Operating System: Other > Platform: Other > Reporter: Jörg Heinicke > Assignee: Xalan Developers Mailing List > Attachments: gump.xml, in.xml, in.xsl > > I try to transform the Cocoon Gump descriptor available at > http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/gump.xml (simplified version will > be attached) with a stylesheet to a property file as > http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/blocks.properties. > In the stylesheet I group the Cocoon blocks (<project > name="cocoon-block-xyz">) > depending on their @status. The problem is in the following template: > The stylesheet: > <xsl:key name="status" match="project[starts-with(@name, 'cocoon-block-')]" > use="@status"/> > <xsl:template match="/module"> > <xsl:apply-templates > select="project[starts-with(@name, 'cocoon-block-')] > [count(. | key('status', @status)[1]) = 1]" > mode="group"/> > </xsl:template> > <xsl:template match="project" mode="group"> > -------- > <xsl:apply-templates select="key('status', @status)"> > <xsl:sort select="@name"/> > </xsl:apply-templates> > </xsl:template> > <xsl:template match="project"> > <xsl:value-of select="@name"/> > <xsl:text> </xsl:text> > </xsl:template> > There are 3 different groups ('stable', 'unstable', 'deprecated'), which > should > result in 3 lines of -------- as long as the elements of one group are not > sorted. If the above xsl:sort is in use, there are more lines. One further > line > is added if the grouping element (i.e. the one returned by key('status', > @status)[1]) is not the first one after sorting. With the gump.xml as it is, > you > get 5 lines. If you rename the first project element to cocoon-block-aaaa, you > will only get 4 lines. > This happens with Xalan 2.5.2 and seems to be a regression bug. -- 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]