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

RE: Performance Question: Expensive Functions in Pred

Subject: RE: Performance Question: Expensive Functions in Predicates
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Thu, 27 May 2004 17:51:29 +0100
is exp expensive
> Another option of course is to do the applicability processing as a 
> separate step so that the base processing templates don't 
> have to care 
> about applicability. That would ensure that each element is only 
> processed once for applicability but might introduce other 
> performance 
> or scalability issues since one would have to generate either a new 
> serialized instance or a new result tree reflecting the input 
> document(s). It would be a cleaner engineering solution as it 
> would mean 
> base template writers wouldn't have to know about the need to do 
> applicability checks.

I do a similar thing using a SAXFilter on the way into the transform.
My element structure is of the form:

<node>
  <applic>
    <applic_info>
  </applic>

  <nodedata>
  ....
  </nodedata>
</node>

The <node> never makes it to the transform if its <applic> structure
does not pass the test.  What makes it tricky using SAX is that if the
<applic> does pass then the sax events for it (and the parent <node>)
need to be generated, but by then the sax parser is at the end
</applic>.  Implementing the applic check in XSLT would be much easier,
but slower.  I guess it depends on how suitable SAX is in your case.

cheers
andrew

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.