DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9068>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9068

xsltc interaction between multi-doms and for-each

           Summary: xsltc interaction between multi-doms and for-each
           Product: XalanJ2
           Version: CurrentCVS
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


XSLTC jumps out of a for-each loop when the stylesheet also contains
a variable definition using the document function. The following 
test case has been greatly simplified from some files sent by Stefan Kost.

sk.xml
------
<page>
        <properties>
                <language>de</language>
                <autologout>no</autologout>
                <contentarea>no</contentarea>
        </properties>
        <header>
                <title>titleIntranet</title>
                <title>titleLogin</title>
        </header>
        <main>
                <logobar/>
                <loginform/>
        </main>
</page> 

sk.xsl
------
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

<xsl:variable name="translationFile" select="document('msg_de.xml')/messages"/>

<xsl:template match="/">
<title>
<xsl:for-each select="/page/header/title">
   last is <xsl:value-of select="last()" />
   current node is <xsl:value-of select="current()" />
</xsl:for-each>
</title>
</xsl:template>


msg_de.xml <-- referenced by document function
----------
<messages>
<message id="titleHelp">Hilfe anfordern und Fehler melden</message>
<message id="titleIntranet">Gold-Zack Intranet</message>
<message id="titleLogin">Anmeldung</message>
<message id="buttonLogin">Anmelden</message>
</messages>

Expected output
---------------
<?xml version="1.0" encoding="UTF-8"?>
<title>
   last is 2
   current node is titleIntranet
   last is 2
   current node is titleLogin</title>


Obtained output
---------------
<?xml version="1.0" encoding="UTF-8" ?>
<title>
   last is 2
   current node is titleIntranet</title>

Reply via email to