RE: qnames with - in cwm

Would now be a good time to go beyond a-z alphabetics in qnames and align
with XML 1.1 Names and Tokens where possible?

http://www.w3.org/TR/xml11/#sec-common-syn

	Andy

-------- Original Message --------
> From: public-cwm-bugs-request@w3.org <>
> Date: 4 May 2004 10:40
> 
> I was not sure where to send this, since I consider it more a Notation3
> bug than a CWM bug. http://www.w3.org/DesignIssues/Notation3
> doesn't say
> to send to any particular list.  Maybe not here but public-cwm-talk?
> 
> I noticed you've switched the definition of Notation3's
> specification in
> April, more about this in other messages.
> 
> http://www.w3.org/DesignIssues/Notation3 says:
> [[
> Identifier munging
> 
> This syntax does not allow minus signs in identifiers, whereas the XML
> encoding for RDF does. ]]
> 
> The reference implementation of N3, cwm has been more generous
> (in a checked out dev.w3.org/2000/10/swap):
> 
> $ grep -i A-Z *|grep -i qname
> rdfn3.g:    token QNAME:
> r'([a-zA-Z][a-zA-Z0-9_-]*)?:[a-zA-Z0-9_-]+'
> rdfn3_yapps.py:            ('QNAME',
> '([a-zA-Z][a-zA-Z0-9_-]*)?:[a-zA-Z0-9_-]+'),
> relaxNG.g:    token QName : r'[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+' # @@???
> 
> and in notation3.py:
>   _notQNameChars = "\t\r\n !\"#$%&'()*.,+/;<=>?@[\\]^`{|}~"
> # Assume anything else valid qname :-/
> (as used in 'def qname' later)
> 
> All of these would allow foo:bar-baz
> 
> Trivial test:
> 
> $ cat > t.n3
> @prefix foo: <http://example.org/> .
> foo:bar foo:baz foo:bar-baz .
> $ cwm t.n3
> #Processed by Id: cwm.py,v 1.148 2004/03/21 04:24:32 timbl Exp
>         #    using base file:/home/cmdjb/w3c/2000/10/swap/t.n3
> 
> #  Notation3 generation by
> #       notation3.py,v 1.153 2004/03/21 04:24:35 timbl Exp
> 
> #   Base was: file:/home/cmdjb/w3c/2000/10/swap/t.n3
> 
>     <http://example.org/bar>     <http://example.org/baz>
> <http://example.org/bar-baz> .
> 
> #ENDS
> 
> 
> The newer http://www.w3.org/2000/10/swap/grammar/n3.n3
> CVS 1.9 2003/10/30 22:41:34 says
>   qname bnf:matches
> "(([a-zA-Z_][a-zA-Z0-9_]*)?:)?([a-zA-Z_][a-zA-Z0-9_]*)?";
> 
> I think it would be a good idea to allow - inside qnames.
> You can other
> uses by whitespace and let people avoid CamelCase inside names if they
> don't like that. 
> 
> I think some people have already been using - in names, relying on cwm
> accepting it.  (I had a quick look and, for example, Jena's N3 parser
> accepts it).  I'm tempted to add it to Turtle to match what people are
> using and want to use. 
> 
> Dave

Received on Wednesday, 5 May 2004 05:17:19 UTC