Subject: Re: [ldapext] referencing one LDIF file from another

From: "Vithalprasad Gaitonde" <[email-masked]>
Date: Thu, 14 Apr 2005 07:43:35 -0600

Good point, Howard.
Here's another try: Does this work for you ?

included-ldif-file-content = "include:" FILL url
;where the url points to a file which confirms to ldif-file of type
ldif-content

included-ldif-file-content = "include:" FILL url
;where the url points to a file which confirms to ldif-file of type
ldif-changes

ldif-file = ldif-content / ldif-changes / included-content-ldifs

included-content-ldifs = 1*(1*SEP included-ldif-file-content)

included-changes-ldifs = 1*(1*SEP included-ldif-file-changes)

ldif-content = version-spec included-content-ldifs 1*(1*SEP
ldif-attrval-record)

ldif-changes = version-spec included-changes-ldifs 1*(1*SEP
ldif-change-record)

Prasad

>>> Howard Chu <[email-masked]> 04/14/05 6:28 PM >>>
What do you think about using a URL here instead of a simple filename?

For the common case it would usually be a FILE URL but I think we gain

some future-proofing by making it fully hyperlinked. It may not be 
useful for utilities that just expect to process static data, but I
have 
in mind to use LDAP URLs here as well.

Vithalprasad Gaitonde wrote:
> Howard,
> Following is the change we could do to section "*Formal Syntax 
> Definition of LDIF"
> *
> included-ldif-file-content = "include:" FILL fileName
> ;where the contents of filename confirm to ldif-file of type
ldif-content
> 
> included-ldif-file-content = "include:" FILL fileName
> ;where the contents of filename confirm to ldif-file of type
ldif-changes
> included-content-ldifs = 1*(1*SEP included-ldif-file-content)
> 
> included-changes-ldifs = 1*(1*SEP included-ldif-file-changes)
> 
> ldif-file = ldif-content / ldif-changes / included-content-ldifs / 
> included-changes-ldifs
> 
> ldif-content = version-spec included-content-ldifs 1*(1*SEP 
> ldif-attrval-record)
> 
> ldif-changes = version-spec included-changes-ldifs 1*(1*SEP 
> ldif-change-record)
> Let me know what you think.
> 
> Thanks,
> Prasad
> 
> >>> Howard Chu < [email-masked] > 11/23/2004 12:33:06 PM >>>
> Vithalprasad Gaitonde wrote:
> > RFC2849 doesnt seem to provide a way to include one ldif file into
> > another ldif file though it does allow referencing an external file
for
> > an attribute value.
> > Has this been considered in the past ?
> > It seems like a useful thing to have when there are dependencies
across
> > several ldif files.
> 
> I agree, I would definitely have a use for this. Haven't thought
about
> what the syntax should be yet.

-- 
-- Howard Chu
Chief Architect, Symas Corp. Director, Highland Sun
http://www.symas.com http://highlandsun.com/hyc 
Symas: Premier OpenSource Development and Support

_______________________________________________
Ldapext mailing list
[email-masked] 
https://www1.ietf.org/mailman/listinfo/ldapext 
_______________________________________________
Ldapext mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/ldapext

---

From: Hallvard B Furuseth <[email-masked]>
Date: Fri, 15 Apr 2005 19:48:40 +0200

> 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