W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2009

[Bug 6131] [XPath 2.1] Requirement: context-free paths

From: <bugzilla@wiggum.w3.org>
Date: Thu, 09 Jul 2009 00:32:08 +0000
To: public-qt-comments@w3.org
Message-Id: <E1MOhYW-0006Zf-Rd@wiggum.w3.org>
http://www.w3.org/Bugs/Public/show_bug.cgi?id=6131





--- Comment #11 from Bogdan Butnaru <bogdanb+w3c+bugzilla@gmail.com>  2009-07-09 00:32:08 ---
(In reply to comment #10)
> It feels rather error-prone to me: even if it's not technically ambiguous there
> would be very similar constructs with very different meanings, resulting in
> poor error messages. For example mistyping the ";" as a ":" in 
> 
> $a:="fred";if (f($a)) then 1 else 0
> 
> would not hit an error until the keyword "then" is encountered.

I wouldn't be very much concerned about that; it would be more dangerous if a
similar case would _not_ trigger an error, however, and I'm not sure there
aren't any such cases.

(Note that the ws:explicit rule makes your particular example hard to hit in
practice: people are used to adding whitespace after a separator like “;”,
and they'll usually do it even if they mistype it as “:”.)

However, if we decide it's problematic, we can use a different separator, like
“#”, “@” or even “$”. Note that this character will be outside the
quotes, so we can pick anything that works for our syntax, ignoring whatever
format IRIs have.

We can also do it in reverse, e.g. if we pick “@” it might make more sense
to write « localName@"http://example.com" » (this only works if the
separator is not allowed in a localName, of course.) We can also allow
constructs like « prefix:localName@"http://example.com" », to specify a
default prefix for the QName.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Thursday, 9 July 2009 00:32:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 9 July 2009 00:32:17 GMT