Subject: Re: [xsl] Best practices From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Mon, 19 Jan 2004 09:53:25 -0500 |
In the following xml document, what is the best way to display 'id' and 'description' of element lln and 'name' of element N when objname='Folder'?
<xsl:for-each select="lln[@objname='Folder']"> <!--prefix stuff--> <xsl:value-of select="@id"/> <!--infix stuff--> <xsl:value-of select="@description"/> <!--infix stuff--> <xsl:value-of select="n/@name"/> <!--suffix stuff--> </xsl:for-each>
<xsl:for-each select="lln[@objname='Folder']"> <xsl:value-of select="concat( @id, ' ', @description, ' ', n/@name )"/> </xsl:for-each>
<xsl:for-each select="lln[@objname='Folder']"> <!--prefix stuff--> <xsl:apply-templates select="@id"/> <!--infix stuff--> <xsl:apply-templates select="@description"/> <!--infix stuff--> <xsl:apply-templates select="n/@name"/> <!--suffix stuff--> </xsl:for-each>
<ll> <lln id="123" objname="Folder" description="a folder" name="lln one name"> <n name="n one name"/> </lln> <lln id="131" objname="Folder" description="a folder1" name="lln one name1"> <n name="n one name1"/> </lln> <lln id="143" objname="Document" description="a folder2" name="lln one name2"> <n name="n one name2"/> </lln> </ll>
-- North America (Washington, DC): 3-day XSLT/2-day XSL-FO 2004-03-15 - (San Francisco, CA): 3-day XSLT/2-day XSL-FO 2004-03-22 Asia (Hong Kong, China): 3-day XSLT/2-day XSL-FO 2004-05-17 Europe (Bremen, Germany): 3-day XSLT/2-day XSL-FO 2004-05-24 Instructor-led on-site corporate, government & user group training for XSLT and XSL-FO world-wide: please contact us for the details
G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Best practices, Jarno . Elovirta | Thread | RE: [xsl] Best practices, SHEIKH Sajjad |
Re: [xsl] sorting information from , David Carlisle | Date | RE: [xsl] Exsl functions in xslt 2, Andrew Welch |
Month |