[dsdl-discuss] DTLL / RELAX NG "libraries"

From: Alex Brown <alexb@griffinbrown.co.uk>
Date: Mon Feb 27 2006 - 14:29:24 UTC

Dear all,

1. Namespaces and Libraries.

DTLL currently provides a generally-available ns attribute for
specifying which Namespace datatypes belong to. Thus it is possible in a
single DTLL instance to declare datatypes in different Namespaces.

If we take the 'library' to be the collection of datatypes defined in a
DTLL instance, there is a potential conflict with the RELAX NG concept
of a 'datatype library'. In RELAX NG a library is modelled as a
collection of datatype in the _same_ Namespace.

>From a DTLL instance that specifies datatypes in many Namespaces, we
could just infer that it contains the same number of virtual 'libraries'
within it - but this seems a less than ideally clean model to me.

To clarify what we mean be a datatype _library_ I suggest the following:

- rename the DTLL top level element from <datatypes> to
<datatype-library>.

- require the ns attribute on this element; remove it from all others.

What follows from this is that:

- In RELAX NG and DTLL (and all DSDL?) a 'datatype library' is a
collection of datatype definitions within the same Namespace.

- a DTLL instance defines datatypes for ONE datatype library (as defined
by the ns attribute of its root element).

Note that:

- Validators will allow multiple DTLL instances (and hence multiple
datatype libraries) to be invoked.

- A library may be defined by multiple DTLL instances whose datatypes
target the same Namespace. (Thus, conceptually, a 'datatype library' may
be more than what is defined by a single DTLL instance, but never less).

2. divs and includes

Doing this leaves the question of the 'div' element. Its current main
purpose is to provide scoping for ns attributes - but this would no
longer be necessary if there is only one 'ns' per instance.

I suggest keeping it however, as a useful arbitrary wrapper for
fragments of DTLL which can be included using XInclude.

If XInclude is assumed to be available that removes the need for DTLL's
own <include> element, which I propose removing.

Any thoughts on the above gratefully received ...

- Alex.

--
DSDL members discussion list
To unsubscribe, please send a message with the
command  "unsubscribe" to dsdl-discuss-request@dsdl.org
(mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)
Received on Mon Feb 27 15:27:10 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 14:48:02 UTC