[xquery-talk] why must one have something inside {} ?

David Lee dlee at calldei.com
Sat Dec 3 06:57:24 PST 2011


Ken Says ---
-----
When you say ...

At 2011-12-03 08:40 -0500, David Lee wrote:
>Why is {} not equal to { () }

... you are mixing apples and oranges.  You are mixing the XPath 
expression language with the language that is using XPath.  What 
would you say to some other language that uses XPath with a different 
wrapping syntax?  You would have to special-case that as well.
------

I'm referring to XQuery not XPath thus (IMHO) not mixing things up.
I am asking why in *XQuery*  the expression {} is not equivalent to {()}
This has nothing to do with XPath specifically ... as in XQuery 
	<foo>{ "" }</foo>

is perfectly valid.   the value inside { "" } is an XQuery expression not an
XPath expression.
So why shouldnt. 
	<foo>{ }</foo>
be valid ?  and equivalent to 
	<foo>{()}</foo>

This has nothing to do with comments either.   Its not a special case just
for comments.
Its actually (IMHO) not a special case at all, its just "how it is" and I
dont yet see any fundimental reason why,
except "that's what the language designers decided".

Is there a case in *XQuery* where this would be problematic ?


----------------------------------------
David A. Lee
Senior Principal Software Engineer
Epocrates, Inc.
dlee at epocrates.com
812-482-5224








More information about the talk mailing list