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

Re: Disk-based XPath Processing

  • From: Philippe Poulard <Philippe.Poulard@s...>
  • To: Michael Kay <mike@s...>
  • Date: Tue, 03 Oct 2006 14:17:12 +0200

disk based dom
Michael Kay wrote:
> 
> There are lots of academic papers on streaming XPath that have implemented
> the parts of XPath that the researchers knew how to implement and left out
> the bits they didn't (such is the privilege of academics). They aren't all
> very good at revealing which bits they left out, but I don't think you'll
> find one that can do preceding-sibling::*[3] or
> following-sibling::*[last()-1].
> 
> Michael Kay
> http://www.saxonica.com/
> 

Hi Michael,

The steps of XSLT patterns are restricted to child or @ axes, thus I 
guess that you're talking about finding following-sibling::*[last()-1] 
inside a predicate...
As I said previously, RefleX is somewhat good as long as you don't use 
reverse axes ; XCL filters can handle such expressions : 
foo[following-sibling::*[last()-1]]

For XPath expressions that are not used as patterns, or predicates of 
patterns that would use a reverse axe, you might consider an alternative 
strategy, for example by pouring a SAX subtree to a DOM fragment ; with 
RefleX, it would be something like this :

<xcl:rule pattern="foo">
     <xcl:document name="myDOM">
         { . }
     </xcl:document>
     <xcl:if test="{$myDOM/someNode/preceding-sibling::*[3]}">
        <xcl:then>
            <!--do what you want here-->
        </xcl:then>
     </xcl:if>
</xcl:rule>

But in both cases, it means that you are implicitely or explicitely 
caching datas, so it is efficient for small subtrees. Be aware of the 
consequences of your XPath patterns or expressions when they are applied 
to SAX streams.

To conclude, I'm sure that it's better to get round rather than trying 
to get a straight solution hard to accomplish with SAX.

-- 
Cordialement,

               ///
              (. .)
  --------ooO--(_)--Ooo--------
|      Philippe Poulard       |
  -----------------------------
  http://reflex.gforge.inria.fr/
        Have the RefleX !


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.