You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "Simon Kitching (JIRA)" <xa...@xml.apache.org> on 2004/11/12 04:55:23 UTC
[jira] Updated: (XALANJ-1719) muenchian grouping + sorting with strange effects
[ http://nagoya.apache.org/jira/browse/XALANJ-1719?page=history ]
Simon Kitching updated XALANJ-1719:
-----------------------------------
Attachment: in.xml
example xml file to demonstrate xsl:sort issue
> muenchian grouping + sorting with strange effects
> -------------------------------------------------
>
> Key: XALANJ-1719
> URL: http://nagoya.apache.org/jira/browse/XALANJ-1719
> Project: XalanJ2
> Type: Bug
> Components: Xalan-interpretive, transformation
> Versions: 2.5
> 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://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org