There is some limited support in Saxon for running stylesheets that process a document in streaming mode: see
 
http://www.saxonica.com/documentation/sourcedocs/serial.html
 
More extensive and automated support for streamed processing remains a goal of many researchers, but it's difficult to achieve in general given the flexibility and dynamic nature of the XSLT language. It's more likely to be achieved for simple XQuery queries, which are much more amenable to static analysis because the language is much more restrictive.
 
Clearly streamed processing is possible for very simple cases, that is where every template rule processes the children of the context node in document order, and there is no call on the document() function. But no-one actually writes such stylesheets, so optimizing them would not be useful. As soon as the stylesheet gets more complex than that, and especially where multiple documents or temporary trees are involved, streamed processing becomes very difficult.
 
A slightly different technique which some products are now using successfully, and which might find its way into a future Saxon release, is document projection. Here an analysis of the stylesheet is used to discard some subtrees of the input document as it is being built, on the basis that the stylesheet never looks at those subtrees; this enables the tree that is built in memory to be smaller.
 
Michael Kay
http://www.saxonica.com/


From: saxon-help-bounces@lists.sourceforge.net [mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf Of Philip Tomlinson
Sent: 09 April 2007 20:50
To: Mailing list for SAXON XSLT queries
Subject: Re: [saxon] Stax and XPath

Sorry, I meant DOM in the generic Object Model sense (i.e. JDOM, XOM,TinyTree).

But why should I have to create an OM.  If I am processing a large document it is going to be quite inefficient to reify the OM.
When I saw the Stax support in Saxon, I had a ray of hope that I wouldnt need to load the whole OM in order to evaluate XPaths, XQueries.
Is this supported in some way or is anyone working on this?

Rgds,
Phil



Michael Kay wrote:
You don't have to create a DOM, but you do have to construct a tree
representation of the document in memory. (The Saxon TinyTree is far more
efficient for this than the DOM.)

Michael Kay
http://www.saxonica.com/ 

  
-----Original Message-----
From: saxon-help-bounces@lists.sourceforge.net 
[mailto:saxon-help-bounces@lists.sourceforge.net] On Behalf 
Of Philip Tomlinson
Sent: 07 April 2007 08:52
To: Mailing list for SAXON XSLT queries
Subject: [saxon] Stax and XPath

Hi,

Using Saxon 8.9.

I think I've noticed that I cant create a StaxBridge for a 
file and evaluate an Xpath against this without creating a DOM.
I seem to have to build a full DOM in order to evaluate 
XPaths or XQueries.

Is there a way to do avoid having to load a large DOM in 
order to evaluate an XPath?

Rgds,
Phil

-------------------------
Philip Tomlinson
EZ Co Ltd
Email:   
Mobile: 021 707 385




--------------------------------------------------------------
-----------
Take Surveys. Earn Cash. Influence the Future of IT Join 
SourceForge.net's Techsay panel and you'll get the chance to 
share your opinions on IT & business topics through brief 
surveys-and earn cash 
http://www.techsay.com/default.php?page=join.php&p=sourceforge
&CID=DEVDEV
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help
    


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
saxon-help mailing list
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help




  


-- 
-------------------------
Philip Tomlinson
EZ Co Ltd
Email: phil@ez123.co.nz
Mobile: 021 707 385