You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by xa...@xml.apache.org on 2004/09/24 17:30:36 UTC
[jira] Updated: (XALANJ-1719) muenchian grouping + sorting with strange effects
The following issue has been updated:
Updater: Brian Minchau (mailto:minchau@ca.ibm.com)
Date: Fri, 24 Sep 2004 8:29 AM
Changes:
Component changed to transformation
---------------------------------------------------------------------
For a full history of the issue, see:
http://issues.apache.org/jira/browse/XALANJ-1719?page=history
---------------------------------------------------------------------
View the issue:
http://issues.apache.org/jira/browse/XALANJ-1719
Here is an overview of the issue:
---------------------------------------------------------------------
Key: XALANJ-1719
Summary: muenchian grouping + sorting with strange effects
Type: Bug
Status: Open
Project: XalanJ2
Components:
Xalan-interpretive transformation
transformation
Versions:
2.5
Assignee: Xalan Developers Mailing List
Reporter: Jörg Heinicke
Created: Mon, 10 Nov 2003 9:28 PM
Updated: Fri, 24 Sep 2004 8:29 AM
Environment: Operating System: Other
Platform: Other
Description:
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.
---------------------------------------------------------------------
JIRA INFORMATION:
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
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