xsl-list
[Top] [All Lists]

Re: [xsl] How to split mixed content

2009-02-15 07:26:35

Is my solution the way to split mixed content or is there an easier or
a more elegant way?

what you have looks fine to me, the repeated ifs are of course really a
xsl:choose which may save an umeasurably small amount of time as the
test only needs to be done once. You can get rid of the test on position
by omitting br rather than .

            <xsl:for-each-group select="node()"
            group-starting-with="br">
<line><xsl:copy-of select="current-group() except  self::br"/></line>
</xsl;for-each>

But it really doesn't make any difference.

David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>