Subject: [xsl] xsl attribute value From: "Arun Sinha" <arunsinha666@xxxxxxxxxxx> Date: Wed, 27 Oct 2004 08:04:30 +0000 |
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?> <?xml-stylesheet type='text/xsl' href='../old/test.xsl' ?> <Report> <Group> <GroupValue type='PO'>PO0005</GroupValue> </Group> <Group> <GroupValue type='SUPPLIER'>Supplier One</GroupValue> </Group> </Report>
PO = PO0005 SUPPLIER = Supplier One
<xsl:template match="/Report"> <xsl:for-each select="Group"> <xsl:value-of select="GroupValue[@type]" /> = <xsl:value-of select="GroupValue" /><br /> </xsl:for-each> </xsl:template>
PO0005 = PO0005 Supplier One = Supplier One
<xsl:template match="/Report"> <xsl:for-each select="Group/GroupValue"> <xsl:value-of select="@type" /> = <xsl:value-of select="." /><br /> </xsl:for-each> </xsl:template>
But my requirement is to print attribute value if the current node is <Group>.
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] [ANN] RenderX Docbench is rel, Alexander Peshkov | Thread | RE: [xsl] xsl attribute value, Jarno.Elovirta |
[xsl] [ANN] RenderX Docbench is rel, Alexander Peshkov | Date | RE: [xsl] xsl attribute value, Jarno.Elovirta |
Month |