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

Re: [ldapext] referencing one LDIF file from another



Vithalprasad Gaitonde writes:
> Here's another try: Does this work for you ?

As far as I can tell, all LDIF files of your grammar must include
at least one more LDIF file.

It should be possible for a file to include any number of files before
the first change/attrval records, or to contain only include statements
and no change/content records.  So with an "include:" statement one can
no longer see from the grammar whether the file will apply ldif-content
or ldif-changes.

Instead the parser must choose that from the first non-"include:" record
it encounters, possibly in an included file, and the RFC should proably
specify that it is an error if there are both change and content
records.

If we do it that way, I think the grammar can simply be:

  ldif-file    = version-spec 1*(1*SEP ldif-chunk)
  ldif-chunk   = ldif-attrval-record / ldif-change-record / include-ldif
  include-ldif = "include:" FILL url SEP


If implementors want to determine if it is a content or changes file
from looking at the file itself, we could instead have two include
statements:

  include-ldif-content: "include-content:" FILL url SEP
  include-ldif-changes: "include-changes:" FILL url SEP

and the grammar mod would be

  ldif-file                = ldif-content / ldif-changes ; (as before)

  ldif-content             = version-spec 1*(1*SEP ldif-content-chunk)
  ldif-changes             = version-spec 1*(1*SEP ldif-change-chunk)

  ldif-content-chunk       = ldif-attrval-record / include-ldif-content
  ldif-change-chunk        = ldif-change-record  / include-ldif-changes

-- 
Hallvard

_______________________________________________
Ldapext mailing list
Ldapext@ietf.org
https://www1.ietf.org/mailman/listinfo/ldapext