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

Re: XSL Sheet for Varying Node Name

Subject: Re: XSL Sheet for Varying Node Name
From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx>
Date: Mon, 14 Feb 2005 03:34:25 -0800 (PST)
xsl iterate all nodes
Hi Eugene,
  You can write XSL like this -

<xsl:template match="items">
  <!-- iterate all child nodes -->
  <xsl:for-each select="*">
   <!--
    use <xsl:value-of select="{name()}" />
    for getting node name ;
    use <xsl:value-of select="." /> ,
    for getting node value
   -->
  </xsl:for-each>
</xsl:template>

This will make the code independent of node names..

Regards,
Mukul

--- jeb501@xxxxxxxxxxxxxxx wrote:

> Hi All,
> 
> Please find below a part of XML file, In this the
> node name "Feb04" is 
> depends on
> node value of cdy. (ie node name Feb04 will Jan05 if
> cdy's value is 
> 01-01-2005 )
> 
> I want to make a table with with headings oano....to
> cdy and also 
> want to include the values of nodes with varying
> node name.
> 
> can anybody share there ideas of XSL codes.
> 
> Thanks
> Eugene
> 
> <?xml version="1.0" encoding="Windows-1252"
> standalone="yes" ?> 
> - <exblog>
> - <items>
>   <oano>1359/5</oano> 
>   <oasl>2</oasl> 
>   <custpo>P128483</custpo> 
>   <posl>2</posl> 
>   <custcode>X001</custcode> 
>   <code>BF177003</code> 
>   <desc>Desc 2" BODY</desc> 
>   <grade>CF8M</grade> 
>   <bqty>2</bqty> 
>   <npr>40.70</npr> 
>   <cdy>01.02.2004</cdy> 
>   <Feb04>81.40</Feb04> 
>   </items>
> </exblog>
> 
> **End of snippet..
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - 250MB free storage. Do more. Manage less. 
http://info.mail.yahoo.com/mail_250

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.