[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

simple:xsl

Subject: simple:xsl
From: "LeninBabuAgeer" <lenin@xxxxxxxxxxx>
Date: Tue, 18 Apr 2000 11:13:29 +0200
stdvalue xml
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 &regards

Lenin



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.