[ http://issues.apache.org/jira/browse/XALANJ-1864?page=all ]

Brian Minchau updated XALANJ-1864:
----------------------------------

    Fix Version: 2.7

> infinite loop in XSLTC if id(...) is used
> -----------------------------------------
>
>          Key: XALANJ-1864
>          URL: http://issues.apache.org/jira/browse/XALANJ-1864
>      Project: XalanJ2
>         Type: Bug
>   Components: XSLTC
>     Versions: 2.5
>  Environment: Operating System: Linux
> Platform: PC
>     Reporter: Heiko Oberdiek
>     Assignee: Yash Talwar
>      Fix For: 2.7

>
> Sorting fails, if "id(...)" is used:
> test.xml:
> <?xml version="1.0" standalone="yes"?>
> <!DOCTYPE test [
>   <!ELEMENT test (a+,b)>
>   <!ELEMENT a EMPTY>
>   <!ELEMENT b EMPTY>
>   <!ATTLIST a id   ID     #REQUIRED
>               name CDATA  #REQUIRED>
>   <!ATTLIST b refs IDREFS #REQUIRED>
> ]>
> <test>
>   <a id="a" name="foo"/>
>   <a id="b" name="bar"/>
>   <b refs="a b"/>
> </test>
> test.xsl:<?xml version="1.0" encoding="ISO-8859-1"?>
> <xsl:stylesheet version="1.0"
>   xmlns:exslt="http://exslt.org/common";
>   xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>   <xsl:output method="text"/>
>   <xsl:template match="/">
>     <xsl:apply-templates select="//b"/>
>   </xsl:template>
>   <xsl:template match="b">
>     <xsl:text>Wrong sorting order:&#10;</xsl:text>
>     <xsl:for-each select="id(@refs)">
>       <xsl:sort select="@name"/>
>       <xsl:value-of select="concat('* ', @name, '&#10;')"/>
>     </xsl:for-each>
>     <xsl:text>Correct result only, if id() is wrapped </xsl:text>
>     <xsl:text>into node-set():&#10;</xsl:text>
>     <xsl:for-each select="exslt:node-set(id(@refs))">
>       <xsl:sort select="@name"/>
>       <xsl:value-of select="concat('* ', @name, '&#10;')"/>
>     </xsl:for-each>
>     <xsl:text>Also apply-templates fails:&#10;</xsl:text>
>     <xsl:apply-templates select="id(@refs)">
>       <xsl:sort select="@name"/>
>     </xsl:apply-templates>
>   </xsl:template>
>   <xsl:template match="a">
>     <xsl:value-of select="concat('* ', @name, '&#10;')"/>
>   </xsl:template>
> </xsl:stylesheet>
> Tested versions: 2.3.1, 2.5.0, 2.5.2, 2.6.0
> Yours sincerely
>   Heiko <[EMAIL PROTECTED]>

-- 
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]

Reply via email to