OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] XQuery types was Re: [xml-dev] Yet another plea for XUpdat

[ Lists Home | Date Index | Thread Index ]

Jonathan Robie wrote:
> As you point out, static typing can definitely improve runtime performance.
> Consider comparisons. In XQuery, $a = $b can mean a lot of things. If you
> know both are singleton integers, you can just do an integer compare. If $b
> is a sequence, you have to do existential quantification. If both are
> strings, you need a string compare. The static type system can rewrite the
> query to do the appropriate compare without needing to examine the data.
> Without it, you have to pick your way through the data and use conditional
> logic to figure out which comparison to use.

You have been asking for concrete examples where XQuery's
type system imposes an additional cost on users.  I think
the above counts as such an example.

If there is no efficient way to implement '=' without static
type analysis, and static type analysis requires a W3C XML Schema
as an input (which is my interpretation of [XQuery] section 3.1,
please correct me if I'm wrong), then anybody who uses '=' has
to pay, either by decreased efficiency or by having to use a W3C
XML Schema.

--Joe English



News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS