Subject: Re: [xsl] XSL Sheet for Varying Node Name From: Mukul Gandhi <mukul_gandhi@xxxxxxxxx> Date: Mon, 14 Feb 2005 03:34:25 -0800 (PST) |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSL Sheet for Varying Node Na, jeb501 | Thread | RE: [xsl] != vs not(); was Underst, Pawson, David |
Re: [xsl] Display Tree Nodes Increm, David Carlisle | Date | [xsl] Closing and reopening hierarc, Huditsch Roman |
Month |