ive got some xml:
----------------------------
<section id="commentary">
<section id="comment">test1</section>
<section id="comment">test2</section>
<section id="comment">test3</section>
</section>
----------------------------
applying this xsl:
----------------------------
<xsl:for-each select="section[@id='commentary']/section">
<xsl:value-of select="section[@id='comment']"/>
(found) <br/>
</xsl:for-each>
----------------------------
it just gives me
------------------------------
(found)
(found)
(found)
------------------------------
so the "<xsl:value-of select="section[@id='comment']"/>" isnt working from within the for each
with this xsl
------------------------------
<xsl:for-each select="section[@id='commentary']">
<xsl:value-of select="section"/>
(found) <br/>
</xsl:for-each>
------------------------------
it only gives me
-------------------------------
test1 (found)
-------------------------------
so im getting the value but its only getting the first occourance.
..So how do i loop all the <section id="comment"> and get all values of <section id="comment">..
i think its because the attributes are all the same but i cant do much about that since its the way i get it sent.
cheers for your time.
----------------------------
<section id="commentary">
<section id="comment">test1</section>
<section id="comment">test2</section>
<section id="comment">test3</section>
</section>
----------------------------
applying this xsl:
----------------------------
<xsl:for-each select="section[@id='commentary']/section">
<xsl:value-of select="section[@id='comment']"/>
(found) <br/>
</xsl:for-each>
----------------------------
it just gives me
------------------------------
(found)
(found)
(found)
------------------------------
so the "<xsl:value-of select="section[@id='comment']"/>" isnt working from within the for each
with this xsl
------------------------------
<xsl:for-each select="section[@id='commentary']">
<xsl:value-of select="section"/>
(found) <br/>
</xsl:for-each>
------------------------------
it only gives me
-------------------------------
test1 (found)
-------------------------------
so im getting the value but its only getting the first occourance.
..So how do i loop all the <section id="comment"> and get all values of <section id="comment">..
i think its because the attributes are all the same but i cant do much about that since its the way i get it sent.
cheers for your time.