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=20727>.
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=20727

for each on variable with sub elements fails

           Summary: for each on variable with sub elements fails
           Product: XalanJ2
           Version: 2.5
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: org.apache.xalan.xsltc
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The following example fails and the work around is listed below 

    <xsl:variable name="myVar">
        <xsl:element name="subelement">text1</xsl:element>
        <xsl:element name="subelement">text2</xsl:element>
    </xsl:variable>
    <xsl:for-each select="$myVar/subelement">
        <xsl:copy-of select="."/>
    </xsl:for-each>

To work around the second problem, I replace the "xsl:for-each" loop with two 
nested "xsl:for-each" statements:

    <xsl:for-each select="$myVar">
        <xsl:for-each select="subelement">
            <xsl:copy-of select="."/>
        </xsl:for-each>
    </xsl:for-each>

Reply via email to