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

RE: Co-operating with Architectural Forms


michael brennan architecture software
> What if you avoid such constructs? What if all your
> expressions only select
> along the child and attribute axes -- are existing XSLT
> engines (SAXON, for
> instance) smart enough to optimize for that and not try to
> hold the entire
> document structure in memory?

No, I don't think any existing processors do this optimization, and for a
good reason: there aren't enough stylesheets that meet all these constraints
to justify implementing it.

The constraints you've listed aren't a full set. For example using last()
invalidates serial processing, as does <xsl:number/>, as do id() and key()
and any absolute path expression. Positional predicates such as [1] in
patterns are do-able in theory but not easy. It's not enough that a template
rule should only select children and attributes, it must only do one
downwards selection, i.e. it must only have one for-each or apply-templates
or value-of or copy-of instruction that processes children (though it can
have any number that process attributes). In other words, it's basically a
subset of XSLT that can do nothing other than subsetting and renaming the
elements in the source document in a context-free way.

At one early stage Saxon did have a serial processing mode. It was so
different from the normal processing mode that the software architecture was
really suffering from having to support both, so I scrapped it, replacing it
with saxon:preview. Even saxon:preview causes maintenance headaches from
time to time.

Xalan, I think, has introduced a processing model in which transformation is
done in parallel with parsing, and I think this architecture was introduced
with a view to discarding parts of the tree that are known to be no longer
needed. So they've got an architecture that's capable of doing it, but they
probably need to do a lot more static analysis of the stylesheet to be able
to complete the job.

Michael Kay
Software AG
home: Michael.H.Kay@n...
work: Michael.Kay@s...


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.