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

Re: XSL to generate required output

Subject: Re: XSL to generate required output
From: Ragulf Pickaxe <ragulf.pickaxe@xxxxxxxxx>
Date: Mon, 12 Dec 2005 09:28:28 +0100
Re:  XSL to generate required output
Hi,
>
> I need to generate the ouput as below. i.e to take hierarchy one level down
when I see ## in Cell.

http://dpawson.co.uk/xsl/sect2/flatfile.html

You need something like this (untested):

<xsl:template match="row[Cell='##']">
  <xsl:variable name="idcurrent" select="generate-id()"/>
  <New>
    <xsl:copy-of
select="following-sibling::row[not(Cell='##')][generate-id(preceding-sibling:
:row[Cell='##'])=$idcurrent]"/>
  </New>
</xsl:template>

If you need more than identity, you will have to change the copy-of to
an apply-templates and make the appropreate templates.

I hope this gets you started,
Ragulf Pickaxe :-)

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.