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

Re: Visiting your cake and eating it too (was Stupid Question

Re:  Visiting your cake and eating it too (was Stupid  Question
From: "Sean McGrath" <sean.mcgrath@p...>

> At 18:32 06/03/2002 +1100, Rick Jelliffe wrote:
> >There is a case to be made that, for implementability reasons, it is actually
> >good to bundle together as many orthogonal functions that can act as
> >visitors on the same traversal of the infoset.

> This makes no sense to me. I must be missing something. What do you
> mean "for implementability reasons". My gut tells me quite the
> opposite!
Oops, I meant "for efficiency reasons".  Rather than traversing an infoset
many times, it can be more efficient if different functions can be performed
in a single pass through a document. *

So stream-based processing is efficient because it operates on a single
traversal. Contrast this with DOM, if you implement "layered"
functions naively as separate passes. 

But not all layers can be implemented well using streams. (XPath
systems requiring arbitrary context, for example.) So instead, to
get efficiency of tree-based data structures, we need to perform
as many functions as possible during one traversal.  

So it makes sense for an implementation, for efficiency reasons,
for a schema processor to do datatyping, augmentation, and 
defaulting at the same time.

So the modularity of Schema languages should not only be seen
in terms of "what functions can be split out into independent
passes?", but rather "what functions can be split out into notional
independent passes, but implemented using the same pass?"

In practice (i.e. for designers of schema languages and scissor-happy
layerists), it means that for efficiency the node-selection mechanism 
should be shared, while the node manipulation mechanism should
be modular.

Rick Jelliffe 

* Obviously there are other aspects at work too: the availability
of keys or IDs gathered from previous passes, and whether
a layer should act based on a traversal of each node or by following 
an XPath.


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.
First Name
Last Name
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.