[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XML overlap - processing a node-set defined by <s

Subject: Re: XML overlap - processing a node-set defined by <start/> and <end/>
From: Svante Schubert <svante.schubert@xxxxxxxxx>
Date: Sat, 17 Feb 2007 21:29:36 +0100
Re:  XML overlap - processing a node-set defined by  <s
James Fuller wrote:
u might want to take a look at lmnl

http://www.lmnl.net/

Thanks James, but I have to stick on XML, lmnl seems to have it's own none-XML syntax.


Meanwhile I found a paper about CLIX [1], which had worked out the start/end scenarios in more detail beyond the chapter 'Range ordering with and without co-located endpoints'.
Until I found out more about the later mentioned validator build on Saxon, my XSLT related question is this:


Is the best (performant) way to work on the selection the following?

<xsl:variable name="precedingStarts" select="count(preceding::text:start)"/>
<xsl:if test="$precedingStarts != 0">
<xsl:variable name="followingEnds" select="count(following::text:end)"/>
<xsl:if test="$precedingStarts = $followingEnds">
<!-- do something -->
</xsl:if>
</xsl:if>


Is there any possibility to cache this?

I am thankful for any help,
Svante


[1] http://www.idealliance.org/papers/extreme/Proceedings/html/2004/DeRose01/EML2004DeRose01.html

gl, James Fuller


On 2/17/07, Svante Schubert <svante.schubert@xxxxxxxxx> wrote:
Imagine XML data, where continuous selection of data - randomly made by
the user - is being marked by using a <start/> and <end/> element.

For example:

<ex:paragraph>
    <ex:START/>
    <ex:span>
        Some text C..
    <ex:span>
</ex:paragraph>
<ex:paragraph>
    Some text D..
    <ex:END/>
    <ex:span>
        Some text F..
    <ex:span>
</ex:paragraph>


The desired nodes would be <ex:span> Some text C.. <ex:span> Some text D..

Is there an easy way to process this kind of selection with XSLT?

Best regards,
Svante

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.