RE: [xsl] XSL to generate required output

Subject: RE: [xsl] XSL to generate required output
From: "Amrit Pal Singh" <ampsingh@xxxxxxxxx>
Date: Tue, 13 Dec 2005 17:46:38 +0530
Hi all,

Thanks for your replies... It worked with xsl below.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
	<xsl:variable name="delimiter" select="'##'"/>
	<xsl:template match="/">
			<xsl:apply-templates select="//Table"/>
	<xsl:template match="Table">
select="Row[Cell=$delimiter]" mode="mode1"/>
	<xsl:template match="Row[Cell=$delimiter]" mode="mode1">
		<xsl:attribute name="name"><xsl:value-of
select="following-sibling::*[1]" mode="mode1"/>
	<xsl:template match="*" mode="mode1">
		<xsl:apply-templates select="."/>
select="following-sibling::*[1]" mode="mode1"/>
	<xsl:template match="@* | node()">
			<xsl:apply-templates select="@* | node()"/>


-----Original Message-----
From: Ragulf Pickaxe [mailto:ragulf.pickaxe@xxxxxxxxx]
Sent: Monday, December 12, 2005 7:35 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] XSL to generate required output

Hi Amrit,

> Hi Mike,
> <xsl:variable name="poscurrent" select="position()"/>
> <xsl:copy-of select="following-sibling::Row[not(Cell='##')][position()

> &lt; poscurrent]"/>

I am not Michael, but...

You are here saying that you want the following siblings, that have a
position which is less than the position of the current one. This is an
expression that is always false.

The one I provieded is more in the line of the solutions found in: (first hit on the google
search that Michael Kay provided).

Ragulf Pickaxe :-)

Current Thread