[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)


xpath empty element
Hi Jeff,

> 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.

It would certainly make sense for elements with simple types (PCDATA)
to be different kinds of objects than elements with complex types, but
I was talking about elements with complex types (particularly those
with complex content) and differentiating between them.

I agree that empty elements are a special class of those, but is the
time it takes to analyse the schema to work out whether a type is
empty likely to give a significant speed advantage over just checking
whether the element has any children? It might if the document had
huge numbers of those elements, or if the schema analysis only had to
occur once. Otherwise, it's much less clear cut.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


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.