|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Break Point in XML document: XPATH??
well, one way that is super slow is:
<xsl:copy-of select="following-sibling::elem2[not (contains (preceding-sibling::elem-2, "break"))]"/> <!-- select all elem2 nodes that are have no preceding sibling that has the word break in it --> a faster way might be: <!-- create a variable with the index of the word break -->
<xsl:variable name="break-pos">
<xsl:for-each select="following-sibling::elem2[contains (., "break")]">
<xsl:value-of select="position()"/>
</xsl:for-each>
</xsl:variable><!-- copy all elem2's that occur before that index --> <xsl:copy-of select="following-sibling::elem2[position() < number($break-pos)"/> this assumes that only one elem2 contains the word 'break'.
Chandra - wrote: Hi all, XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








