[lextypes] Holus bolus: a general-purpose datatype library

Jeni Tennison jeni at jenitennison.com
Thu Jul 24 17:27:14 BST 2003


John Cowan wrote:
> This is Draft 0 of Holus Bolus, intended as a complete replacement
> for the proposed DSDL part 5 datatypes based on WXS. It handles
> essentially everything WXS does, is more sensibly organized, and has
> much better support for datatyping localized data.
>
> The name is based on a remark of Rick Jelliffe's (who has seen this
> proposal but not yet commented). This is intended to complement, not
> compete with, Jeni's DTL. My guess is that it would be
> straightforward to implement this in DTL.

I'm not going to comment on the suitability of these types for XML,
just try to extract some lessons for DTLL.

The biggest thing that I notice is that parameters in Holus Bolus
perform several different roles, only one of which is supported
through parameters in DTLL. The roles that I can see, and the
parameters that take on these roles, are:

1. validation of lexical representations:

   - */pattern

2. interpretation of lexical representations (to give a value):

   - string/whiteSpace
   - number/base
   - number/decimalPoint
   - time/components
   - time/monthNames
   - time/defaultTimezone
   - octetSequence/representation

3. validation of values:

   - string/maxLength
   - string/minLength
   - number/minimum
   - number/maximum
   - number/allowNaN
   - boolean/truereps
   - boolean/falsereps
   - time/minimum
   - time/maximum
   - duration/minimum
   - duration/maximum
   - octetSequence/minLength
   - octetSequence/maxLength

4. interpretation of other parameters:
   
   - number/minimumKind
   - number/maximumKind
   - number/FIXME
   - time/minimumKind
   - time/maximumKind
   - duration/minimumKind
   - duration/maximumKind
   - time/periodUnit
   - time/durationUnit
   - duration/precisionUnit

5. manipulation of values:

   - number/precision
   - time/period
   - time/duration
   - duration/precision

In DTLL, parameters are only used for the third of these: to provide
extra validation of values. The validation of lexical representations
(1) is obviously done via the <parse> specification. DTLL doesn't give
an explicit way of mapping from a lexical representation to a value
(2) (because values are abstract concepts), except in so far as it
provides ways of normalising values and casting between datatypes;
similarly, the manipulation of values (5) is determined by how they're
normalised, cast and compared. As far as parameters that determine how
other parameters are interpreted (4) goes, I'd assumed that you'd use
different names for parameters to be interpreted in different ways
(e.g. minInclusive + minExclusive rather than minimum + minimumKind).

I think that it would be possible to alter DTLL to support all these
different kinds of parameters, by creating a more general
parameterisation mechanism used to set the values of variables used in
XPaths etc. But I wonder whether it would be worthwhile placing
restrictions on what's parameterisable?
   
Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/




More information about the lextypes mailing list