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

Re: XPath 1.5? (was RE: typing and markup)


Re:  XPath 1.5? (was RE:  typing and markup)
I think that optimizations that can be implemented for user-defined types
will frequently or mostly be of a sort that can be stated in terms of
'elements whose content model has characteristics X and Y' (to be used under
the assumption that the subject of the transform or quey is valid according
to the type).  For instance, an XSLT implementation should (I'm guessing, as
I've no experience as an implementor of XSLT) be able to optimize template
application and matching if it knows that foo is an empty element, or and
element containing only pcdata.  A compiler might match the type description
for foo against a set of optimizable patterns in determining how to compile
a particular transform that was to act on it.

For these optimizations, I don't think it would be necessary to have
fooElementNode objects, but it might be useful to have EmptyElementNode
objects which could be generated for suitable parts of the content model.

Jeff

----- Original Message -----
From: "Jeni Tennison" <jeni@j...>
To: "Jonathan Robie" <jonathan.robie@d...>
Cc: <xml-dev@l...>
Sent: Wednesday, May 08, 2002 7:35 AM
Subject: Re:  XPath 1.5? (was RE:  typing and markup)


> But from what I can see, the same kind of operation on user-defined
> types, particularly on complex types, is going to be a lot harder. I'm
> not an implementer, but I imagine it would take a lot of work during
> compilation to create classes for different kinds of elements so that
> you can take advantage of their particular features, such as testing
> whether an element can have a particular child before trying to
> retrieve it. The reason it's worthwhile doing this for the built-in
> types is precisely because they're built in.
>
> I think it comes down to what advantage it gives you to treat a 'foo'
> element as a 'foo' element rather than a generic element node, and
> whether that advantage is worth the cost of schema analysis and the
> extra time and memory it takes to have fooElementNode objects, bearing
> in mind that the compile time and run time costs have to directly
> offset each other with XSLT.
>
> If it ends up being roughly equal, or if the analysis time is greater
> than the time you save due to optimisation, which is what I suspect,
> then the question is what's the point of the strong typing for complex
> types? Especially as there are lots of *disadvantages*, such as the
> added complexity in the processors and in the spec to deal with all
> the different kinds of casting and validating of complex types.



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.