[XML-SIG] Name pattern bug or not (was Re: [XML-SIG] Re: Issues with Unicode type)

Henry S. Thompson ht@cogsci.ed.ac.uk
09 Oct 2002 11:10:57 +0100


"Thomas B. Passin" <tpassin@comcast.net> writes:

> [Henry S. Thompson]
> 
> > > The XML Namespaces Rec says that an NCName is
> > >
> > >  NCName ::= (Letter | '_') (NCNameChar)*
> > >
> > > but you have it equivalent to
> > >
> > >  NCName ::= (NCNameChar) (NCNameChar)*
> >
> > I _think_ I have that right -- Name is defined as
> >
> >  <simpleType name="Name">
> >   <restriction base="token">
> >     <pattern value="u'[_:A-Za-z . . .
> >
> > and the above effectively _subtracts_ the : from that, leaving the _
> > and all the Letters.
> >
> Yes, but it also allows all the digits for the first character.  In the XML
> and Namespaces Recs, the first character is different from the rest and does
> not allow them.  Digits are defined as
> 
>  Digit    ::=    [#x0030-#x0039] | [#x0660-#x0669] | [#x06F0-#x06F9] |
> [#x0966-#x096F] | [#x09E6-#x09EF] | [#x0A66-#x0A6F] | [#x0AE6-#x0AEF] |
> [#x0B66-#x0B6F] | [#x0BE7-#x0BEF] | [#x0C66-#x0C6F] | [#x0CE6-#x0CEF] |
> [#x0D66-#x0D6F] | [#x0E50-#x0E59] | [#x0ED0-#x0ED9] | [#x0F20-#x0F29]

Um, I've checked again, and I _don't_ find digits allowed in first
place in my patterns. . . I've now checked both my actual code, and
the message I sent that started this sub-thread, and the 0-9... only
appears in the second [...] group, that is, the Name pattern
is [...][...]+, and the 0-9 is (correctly, as you point out) not
present in the first [...].  Or did you find some other range there which
subsumes this?

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2002, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
 [mail really from me _always_ has this .sig -- mail without it is forged spam]