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

<xsl:for-each> iterates over phantome nodes.

           Summary: <xsl:for-each> iterates over phantome nodes.
           Product: XalanJ2
           Version: 2.4Dx
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Xalan
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


The XSL...

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:fo="http://www.w3.org/1999/XSL/Format";>
<xsl:output method="text" encoding="utf-8"/>

<xsl:template match="/">
        <xsl:apply-templates select="parent"/>
</xsl:template>

<xsl:template match="parent">
        <xsl:for-each select="child::node()">
name is <xsl:value-of select="name()"/> text is <xsl:value-of select="text()"/>
        </xsl:for-each>
</xsl:template>

</xsl:stylesheet>

Used with the XML...

<?xml version="1.0" encoding="UTF-8"?>
<parent>
        <a>1</a>
        <b>2</b>
        <c>3</c>
        <d>4</d>
        <e>5</e>
</parent>

generates...

name is  text is 
name is a text is 1
name is  text is 
name is b text is 2
name is  text is 
name is c text is 3
name is  text is 
name is d text is 4
name is  text is 
name is e text is 5
name is  text is 

Each *real* node is intersperced with two *phantom* empty nodes.

Will attempt to look into this myself, just wondering if anyone has come across 
this.

Thanks in advance.

Reply via email to