W3C home > Mailing lists > Public > uri@w3.org > May 2003

Re: Syntax Issues/Experience with RFC2396bis and abnf2re

From: Clive D.W. Feather <clive@demon.net>
Date: Wed, 7 May 2003 15:20:34 +0100
To: Rob Cameron <cameron@cs.sfu.ca>
Cc: Graham Klyne <GK@ninebynine.org>, uri@w3.org
Message-ID: <20030507142033.GD22441@finch-staff-1.thus.net>

Rob Cameron said:
> I think I would prefer your interpretation that HEXDIG allows
> upper or lower case.   But in a literal reading of RFC2234
> and other reference materials, the following three
> counterarguments concern me.

All are wrong. I've just spoken to Paul Overell, one of the authors of
RFC2234.

Firstly, he is *CLEAR* that ABNF is always case insensitive.

> (1)	The reference ABNF parser available from IETF does not
>         permit lower case values for HEXDIGIT.
> 	http://www.ops.ietf.org/abnf/

"That's a bug."

> (2)	The HEXDIG production satisfies the individual character
> 	specification constraint of RFC 2234:
> 
> 	"To specify a rule which IS case SENSITIVE, specify 
> 	the characters individually."

No it does not.

> 	HEXDIG         =  DIGIT / "A" / "B" / "C" / "D" / "E" / "F"

If you read the text in the RFC, it actually says:

    To specify a rule which IS case SENSITIVE,
    specify the characters individually.

    For example:
        rulename    =  %d97 %d98 %d99
    or
        rulename    =  %d97.98.99

Paul was clear that HEXDIG allows lowercase.

> 	(If specification by numeric value is required, and not
> 	just an option as shown in the examples, then why doesn't
>         RFC2234 say "by numeric value" rather than "individually?")

Because it says "individually". And because, in context, the example makes
it clear what is meant - the previous example used quoted strings.

And if "a" was case-sensitive, the example in 3.1 would not have been
written the way it was.

> (3)	Section 3.4 of RFC 2234 shows that a range of numeric
> 	values has an equivalent specification as individual characters.
> 
> 	DIGIT =  %x30-39
> 	is equivalent to:
> 	DIGIT =  "0" / "1" / "2" / "3" / "4" / "5" / "6" / "7" / "8" / "9"

Because, strangely enough, those are not letters.

> 	Therefore, one should be able to say that %x41-46 is 
> 	equivalent to "A" / "B" / "C" / "D" / "E" / "F"

No. %x41-46 is equivalent to %x41 / %x42 / %x43 / %x44 / %x45 / %x46.

Very simply, it says:

    ABNF strings are case-insensitive

It does not say:

    ABNF strings longer than one character are case-insensitive

-- 
Clive D.W. Feather  | Work:  <clive@demon.net>   | Tel:    +44 20 8495 6138
Internet Expert     | Home:  <clive@davros.org>  | *** NOTE CHANGE ***
Demon Internet      | WWW: http://www.davros.org | Fax:    +44 870 051 9937
Thus plc            |                            | Mobile: +44 7973 377646
Received on Wednesday, 7 May 2003 10:20:45 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 13 January 2011 12:15:31 GMT