Subject: Re: Fwd: Removing blank lines in text output
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 6 Mar 2007 14:52:18 GMT
|
> Is this possible in XSLT?
yes it's a grouping problem (in your case with two groups, one of
trailing blank lines, one of everything else) so the standard grouping
idioms apply, xsl:for-each-group in xslt2 or the usual grouping methods
in xslt1.
For example
<xsl:template match="ORU_R01.OBSERVATION">
... do a line
</xsl:template>
<xsl:template match="ORU_R01.OBSERVATION[not(OBX.5) and not(following-sibling::ORU_R01.OBSERVATION/OBX.5)">
... do nothing
</xsl:template>
will remove all trailing lines.
David
|