GB stands for Great Britain ?

admin

Administrator
Staff member
Hi happy XMLers !

I'm starting with XML. Here is what I have in my stylesheet and which works:

<xsl:template match = "record">
<p>RECORD <xsl:value-of select="position()"/><br />
Country: <xsl:value-of select = "/my_doc/my_table/elts/elt[child::code='F']/valeur" />
<br />
Capital: <b><xsl:value-of select = "Capital" /></b>
</p>
</xsl:template>


Now what I wish is yo use, not a constant like 'F', but the value of a child of my current node. To be less confused, if I use the above, I will always get "France". What I want is that, if the code is 'F', I get 'France', if it is 'GB', I get 'Great Britain', and so on.

All these values are stored in my xml page (couple code / valeur). What I can't get is using a text node value instead of a constant.

Is this possible ? How is it possible ? Why is it not possible ?

So many thanks in advance.
 
Back
Top