This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
simple:xsl
- To: <xsl-list at mulberrytech dot com>
- Subject: simple:xsl
- From: "LeninBabuAgeer" <lenin at webgiro dot com>
- Date: Tue, 18 Apr 2000 11:13:29 +0200
- Reply-To: xsl-list at mulberrytech dot com
Hai
I getting small problem
my problem is basing on the attribute value
I have to display things in different locations
I am trying like this but I am getting same output in different locations
can any one suggest a solution pl
My xml has
-----------------------------------------------------------------------
<Party stdValue="Supply">
<PartyID>AB1234</PartyID>
<PartyWGID>1005</PartyWGID>
<PartyContactID>1</PartyContactID>
<Ref stdValue="VAT">AB-123456789</Ref>
</Party>
<Party stdValue="Buyer"><PartyID/>
<Name>
<Name1>Len</Name1>
<Name2>CEO</Name2>
</Name>
<Street>
<Street1>Street</Street1>
</Street>
<PostalInfo>
<City>NJ</City>
<CountrySubEntity>USN</CountrySubEntity>
<PostalCode>123456</PostalCode>
<Country>US</Country>
</PostalInfo>
<Contact>
<TelNum>?12345</TelNum>
</Contact>
<Ref>CF-2345 ZXY</Ref>
</Party>
I have written XSL like This
---------------------------------------------------
<TD WIDTH="280" ALIGN="LEFT" VALIGN="TOP" COLSPAN="2"><FONT FACE="arial"
SIZE="2">
<xsl:choose>
<xsl:when test="Party[@stdValue='Supply']">
<xsl:apply-templates select="Party">
</xsl:when>
</xsl:choose>
</FONT></TD>
<!-- Buyer -->
<TD WIDTH="280" ALIGN="LEFT" VALIGN="TOP" COLSPAN="4"><FONT FACE="arial"
SIZE="2">
<xsl:choose>
<xsl:when test="Party[@stdValue='Buyer']">
<xsl:apply-templates select="Party"/>
</xsl:when>
</xsl:choose>
</FONT></TD>
And my template
-------------------------------------------------
<xsl:template match="Party">
<xsl:apply-templates select="Name"/><br/>
<xsl:apply-templates select="Street"/><br/>
<xsl:apply-templates select="PostalInfo"/><br/>
<xsl:value-of select="PartyID"/><br/>
<xsl:value-of select="PartyWGID"/><br/>
<xsl:value-of select="PartyContactID"/><br/>
<xsl:value-of select="Ref"/><br/>
</xsl:template>
Thanks ®ards
Lenin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list