|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Merging lines of 3 words or less
> Then inside the recreated line for each of the current group (which is
> what at this point?)
current-group() return the sequence of items (that is things selcted by the
xsl:for-each-group select="l") that are um in the current group (which
in this case means a group of adjacent line with just the first one
having a 4th word.
position() positions the groups (rather than teh items as it would in a
xsl:for-each) so
<l n="{position()}">
does the right thing, then to get the content of the lines
<xsl:copy-of select="current-group()"/>
would actually give you back each of the l elements in the group, which
you don't want, you just want the contents of each of those lines so
<xsl:copy-of select="current-group()/node()"/>
would almost work but I wasn't sure if you needed to put a space at the
point that you joined the lines back so I did
<xsl:for-each select="current-group()">
<xsl:copy-of select="(node(),' ')"/>
</xsl:for-each>
which for each of the original lines copies all the children then adds a
space
that puts a space at the end as well so perhaps
<xsl:for-each select="current-group()[position()!=last()]">
<xsl:copy-of select="(node(),' ')"/>
</xsl:for-each>
<xsl:copy-of select="current-group()[position()=last()]/node()"/>
or something.
If you know that <lg n="44.6"><l n="3" and > <lg n="100.8"><l n="4">
really are short lines, then you can change things to
<xsl:for-each-group select="l" group-starting-with="
l[w[4]] |
lg[@n='44.6']/l[@n='3'] |
lg[@n='100.8']/l[@n='4']
">
David
________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
|
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
|

Cart








