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

Re: XPath/XSLT 2.0 concerns


xslt schema aware typo
Jeni Tennison wrote:
> Sure, but there's a lot of stuff being put into XPath 2.0 precisely so
> that XSLT processors *can* do this schema-dependent optimisation. I'm
> trying to get at whether that stuff is worthwhile or not.

Well, the obvious schema-dependent optimisations are
- take shortcuts while traversing the input tree for
   doing selects and building key tables
- take advantage of known cardinalities of selected
   node sets
- avoid exception handling in expressions, for example
   like handling NaNs in "1+$whatever", and perhaps taking
   shortcuts in evaluating expressions
The last point can also almost be done without schema
information, the only major difference being that the
input values for the expression have to be checked before
the expression is evaluated rather than during input
validation.
Whether any of the other two optimisations above will
pay off depends very much on the schema. If you have a
large input document and a very non-uniforn schema
(unlike the usual DB query results or XHTML), it may be
worthwile, in particular if you are sloppy and/or heavily
utilise the descendant, previous and following axes.

However, I can see a schema aware XSLT as a development
aid, the same sense as a type system for other progarmming
languages. Wouldn't it be nice to get warnings that
select="record/filed" is always empty (because of the typo)
and that 1+customername might be non-numeric? I belive
it could catch a lot of small problems in early development
stage which otherwise could even evade quite serious testing.

> and even then, it's utility hasn't yet been proven empirically.
Well, nobody really tried yet, so who knows? I belive
the ability to catch certain problems at style sheet compile
time, or at least at the first run, can easily save thousands
of man-hours of work. I just had an example where writing
select="output" instead of select="outputs/output" had cost
me two full days :-\.

J.Pietschmann


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.