[Date Prev][Date Next]
Re: ITS#5174 openldap.schema entry not valid per RFC 4512
Thanks for looking at it. I think the RFC 4234 parse of the elements
in the RFC 4512 definition would be as a 'concatenation' (based on
rule->elements->alternation->concatenation). To get "any order"
behavior under RFC 4234, I think the elements in the definition would
be separated by '/' characters, and all the elements would be enclosed
in a group with a repetition element. There's an example in the
"Generalized Time" definition (RFC 4517, section 3.3.13) that shows
why the optional members must be in sequence by default. In that
particular case, the [fraction] can't be allowed to appear before the
[minute ...] part, or it would be ambiguous whether the final "3015"
in "2007100807.53015" was part of the fraction or a minute and second
that appears (for no good reason) after the fraction ".5"
The reason I reported it was that I wrote a parser for LDAP schema
based directly on the formal grammar downloaded all the schema from
OpenLDAP as a test. That was the only schema that broke, and only on
the one element. I did not have any trouble with the OpenLDAP
software accepting the schema. If you use a grammar builder (I used
ANTLR) rather than a hand-coded parser, being permissive makes it a
bit more complex. Allowing the elements to appear in any order would
be easy to parse for the RFC 4512 elements, because they happen to be
defined with markers ("NAME", "DESC" and so on) that makes them easy
to differentiate, but then enforcing at-most-once semantics on the
elements requires either an additional pass or some hand coded
predicates to check for duplicates in a data structure being built
On 10/8/07, Pierangelo Masarati <firstname.lastname@example.org> wrote:
> Not sure if ordering of optional sequence members is required by RFC
> 4234, but the change you suggest sounds harmless. OpenLDAP software, in
> this sense, is usually permissive in what is accepted and strict in what
> is emitted.
> Thanks, p.
> Ing. Pierangelo Masarati
> OpenLDAP Core Team
> SysNet s.r.l.
> via Dossi, 8 - 27100 Pavia - ITALIA
> Office: +39 02 23998309
> Mobile: +39 333 4963172
> Email: email@example.com