Reading multiple instances of a tag or element using XSLT
- by shashank saket
My RDF xml file is something like this..
<rdf:RDF>
<rdf:Description rdf:about="........">
<j.0:property rdf:resource="....."/>
<j.0:property rdf:resource=....."/>
<j.0:property rdf:resource="........"/>
</rdf:Description>
</rdf:RDF>
Now in my XSLT stylesheet I need to retrieve the values of all the j.0:property tags. I am using something like this:
<xsl:apply-templates select="j.0:property"/>
<xsl:template match="j.0:property">
<xsl:text><xsl:value-of select="/rdf:RDF/rdf:Description/j.0:propert /@rdf:resource"/></xsl:text>
</xsl:template>
But then it returns the same value 3 times. The value being the value of the first property encountered.
Kindly help as to how I can get the value for each property.