[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Type promotion (or URI promotion) in EBV calculation?

Martin Probst martin at x-hive.com
Tue Jan 24 09:58:21 PST 2006


  Type promotion (or URI promotion) in EBV
	calculation?
Hi Jonathan,

> I don't think users have an intuition for how to use URIs as Boolean 
> values, and trying to support this just makes the language more complex 
> and more confusing. Can you think of a compelling use case?

I'm not arguing that users have an intuition to use URIs as Boolean
values, I agree with you and I generally think it's better for a
language to have a Boolean type and be strict about it.

However XQuery treats strings as booleans, and URIs as strings in many
places. You can write 'if ("foo") then ...' and you can write
'string-length(xs:anyURI("foo"))', substring etc. so in nearly every
part of the language URIs are treated as being equivalent to strings,
except for the EBV and predicates. This is confusing, at least to me.

The use case because of which I got into this was a customer with a
query as mentioned above, 'if (namespace-uri($x))' meaning if $x has a
namespace URI. I think this should be legal if 'if (string($x))' is
legal.

Martin



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
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-2011 All Rights Reserved.