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

Re: XQuery and DTD/Schema?


Re:  XQuery and DTD/Schema?

Uche Ogbuji wrote:
> [Jonathan Robie]
> > Let me try to explain why I think named typing is good. Here's a function:
> > define function get-total( element invoice $i )
> >    returns xs:decimal
> > {
> >          sum( $i//item/price )
> > }
> > [...] At run-time, you don't want to
> > have to test every function parameter to see if it corresponds to a schema,
> > you simply want to ensure that the validator has said this corresponds to
> > the appropriate definition.
>
> You keep saying this sort of thing, and it baffles me.  Its a solution in
> search of a problem if I ever saw one.  If the substrate data is *XML* (this
> is what we're here to discuss, right?) then why do these declaration have to
> be
> a) static
> b) based on a named type system
> c) a and/or b only as provided within a schema
> a) There is no reason it has to be static.  The semantics of sum can be
> "accept or convert to an integer".  This is how XPath 1.0 does things.  And
> I'll make the technical point that you know very well Simon has made enough
> times: this is the way to do it that is more cleanly layered for XML
> processing.  I know you'll respond "but that's inefficient".


I'd even question how relevant the efficiency issue is.

XQuery is designed, principally, to do database queries.
In this context, it doesn't matter if you can take advantage
of type information to add two xs:integers in nanoseconds
instead of microseconds, when it takes milliseconds to retrieve
the data in the first place.


--Joe English

  jenglish@f...

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.