W3C home > Mailing lists > Public > public-cwm-bugs@w3.org > February 2005

string escapes reverted on purpose?

From: Dan Connolly <connolly@w3.org>
Date: Thu, 17 Feb 2005 11:37:23 -0600
To: public-cwm-bugs@w3.org
Cc: Norman Walsh <ndw@nwalsh.com>
Message-Id: <1108661843.4991.661.camel@localhost>

Norm noticed...

This used to be valid: :N1001D :label "T4: 'It\'s Been...'" .
seems to me \' would produce that traceback since 1.99         (connolly
14-Feb-02)


But now he gets...

[exec] notation3.BadSyntax: Line 184 of
<file:/share/projects/w3c/WWW/XML/Group/xsl-query-specs/data-model/build/dm-example.n3>: Bad syntax (bad escape) at ^ in:
     [exec] "... a :Text .
     [exec] :N1001D :parent :N1001C .
     [exec] :N1001D :label "T4: 'It^\'s Been...'" .

python is happy with it:

$ python
Python 2.3.4 (#2, Jan  5 2005, 08:24:51)
[GCC 3.3.5 (Debian 1:3.3.5-5)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> s="T4: 'It\'s Been...'"
>>> s
"T4: 'It's Been...'"


I don't think the tutorial covers this level of detail.

It should be written up somewhere... I don't think it's reasonable
to expect people to understand this as a specification:

string		cfg:matches		"(\"\"\"[^\"\\\\]*(?:(?:\\\\.|\"(?!\"\"))[^\"\\\
\]*)*\"\"\")|(\"[^\"\\\\]*(?:\\\\.[^\"\\\\]*)*\")";

 -- http://www.w3.org/2000/10/swap/grammar/n3.n3



-- 
Dan Connolly, W3C http://www.w3.org/People/Connolly/
D3C2 887B 0F92 6005 C541  0875 0F91 96DE 6E52 C29E
Received on Thursday, 17 February 2005 17:37:24 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:58 GMT