[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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 :-)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|