[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ABNF for draft-smith-ldapv3-filter-update-01.txt



Mark,

        escaped = "\00" / "\2" ( "8" / "9" / "a" ) / "\5c"

is too limiting.  RFC 2254 says:

   Other characters besides the ones listed above may be escaped
   using this mechanism, for example, non-printing characters.

So,
        escaped = "\" HEX HEX
        HEX = %x30-39 / %x41-46 / %x61-66

would, I believe, be better.  Also, some comment that if
a multiple-octet character is escaped that each octet
of the character is individually escaped.  See 2253bis for
one possible wording.

Kurt

At 11:48 AM 2/20/01 -0500, Mark Smith wrote:
>Thanks.  I am editing the filter document now, and I believe we need to
>make one small change to the ABNF you suggest.  Since values can be of
>zero length, we need to define valueencoding as:
>
>        valueencoding = 0*(normal / escaped)
>
>Note that we could omit the leading zero since that is the default (but
>I think it is clearer to include it in this instance).
>
>-- 
>Mark Smith
>Netscape Directory Product Development
>
>
>Ryan Moats wrote:
>> 
>> Mark, Tim-
>> 
>> Looking at the ABNF in draft-smith-ldapv3-filter-update-01.txt,
>> the only thing that needs updating are the attr, matchingrule, and
>> value rules, and these aren't that difficult to update...
>> 
>>         attr       = <AttributeDescription from Section 4.1.5 of [1]>
>>         matchingrule = <MatchingRuleId from Section 4.1.9 of [1]>
>>         value      = <AttributeValue from Section 4.1.6 of [1] encoded
>>                                 using valueencoding rule>
>>           valueencoding = 1*(normal / escaped)
>>           normal = %x01-27 / %x2b-5b / %x5d-7f
>>           escaped = "\00" / "\2" ( "8" / "9" / "a" ) / "\5c"
>> 
>> At that point I'd change the following paragraph from
>> 
>>    The value construct is as described in the corresponding section of
>>    [1] given above, except that if an AttributeValue contains any of the
>>    following characters
>> 
>>         Character       ASCII value
>>         ---------------------------
>>         *               0x2a
>>         (               0x28
>>         )               0x29
>>         \               0x5c
>>         NUL             0x00
>> 
>>    the character must be encoded as the backslash '\' character (ASCII
>>    0x5c) followed by the two hexadecimal digits representing the ASCII
>>    value of the encoded character. The case of the two hexadecimal
>>    digits is not significant.
>> 
>> To
>> 
>>    The valueencoding rule provides that the characters "*" (ASCII 0x2a),
>>    "(" (ASCII 0x28), ")" (ASCII 0x29), "\" (ASCII 0x5c), and NULL (ASCII
>>    0x00) are represented as the backslash "\" character (ASCII 0x5c)
>>    followed by the two hexadecimal digits representing the ASCII value
>>    of the encoded character.
>> 
>> The case insensitivity is handled in the ABNF.