Ivan Shmakov writes:
> (...)
>       * allow any number of (coordinate system, latitude, longitude)
>         triplets to be specified.
> (...)
>       The last approach seems to be the most flexible.  However, I
>       don't know if it's possible to ``tie'' attributes into such a
>       ``triples'' with LDAP?

Like this?
  attribute "coordSys",  values ("a", "b", "c")
  attribute "latitude",  values ("1", "2", "3")
  attribute "longitude", values ("9", "8", "7")
Nope... an attribute's values are in an unordered list, so LDAP is
free to mess that up.

Solutions:

* Make a single attribute with all three values.
  attribute "position", values ("a 1 9", "b 2 8", "c 3 7").

  Syntax Directory String or IA5 String, plus a client-defined syntax
  which clients are responsible for writing and parsing.

Or if you really want separate attributes (I'd not do that unless I
needed to):

* Create one entry for each coordinate system, and put each variant
  in a separate entry.

* Create an attribute option range "coordinate-<system name>"
  so that you can create one attribute description set for each
  coordinate system:

  attribute "latitude;coordinate-a",  value "1"
  attribute "latitude;coordinate-b",  value "2"
  attribute "latitude;coordinate-c",  value "3"
  attribute "longitude;coordinate-a", value "9"
  attribute "longitude;coordinate-b", value "8"
  attribute "longitude;coordinate-c", value "7"

  This may require server support for user-defined attribute options
  though.  E.g. the "attributeoptions" keyword in OpenLDAP slapd.conf.

-- 
Hallvard

Reply via email to