Martin Bjorklund <[email protected]> writes:

> Ladislav Lhotka <[email protected]> wrote:
>> Hi,
>> 
>> another ABNF issue:
>> 
>>    predicate           = "[" *WSP (predicate-expr / pos) *WSP "]"
>> 
>>    predicate-expr      = (node-identifier / ".") *WSP "=" *WSP
>>                          ((DQUOTE string DQUOTE) /
>>                           (SQUOTE string SQUOTE))
>> 
>>    pos                 = non-negative-integer-value
>> 
>>    non-negative-integer-value = "0" / positive-integer-value
>> 
>> The value of 0 shouldn't be allowed for 'pos' because context position
>> in XPath is always positive, i.e. the first list entry is selected
>> with "[1]".
>
> You are right - I have changed this to:
>
>    pos = positive-integer-value

Actually, there is another problem: the ABNF allows, for example

/if:interfaces/if:interface[1][2]

which doesn't make sense. So a correct version could be

   instance-identifier = 1*("/" (node-identifier (*predicate / pos))

   predicate           = "[" *WSP predicate-expr *WSP "]"

   predicate-expr      = (node-identifier / ".") *WSP "=" *WSP
                         ((DQUOTE string DQUOTE) /
                          (SQUOTE string SQUOTE))

   pos                 = "[" *WSP positive-integer-value *WSP "]"


Lada

>
>
> /martin
>
>
>
>> 
>> Lada
>> 
>> --
>> Ladislav Lhotka, CZ.NIC Labs
>> PGP Key ID: E74E8C0C
>> 
>> 
>> 
>> 
>> _______________________________________________
>> netmod mailing list
>> [email protected]
>> https://www.ietf.org/mailman/listinfo/netmod
>> 

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: E74E8C0C

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to