>Date: Fri, 11 Dec 1998 18:19:21 -0500
>From: "DuCharme, Robert" <[log in to unmask]>
>Subject: Re: Defining metadata - use NOTATION or ATTLIST?
>Roger L. Costello wrote:
>>From my readings on XML it appears that there are two methods for defining
>>an element's metadata: using NOTATIONs and using ATTLIST.
>With the choice of enumeration vs. CDATA, either you constrain values or
>you don't--I don't know of any gray area, unless you want make "other" a
>token to choose from and have another CDATA attribute to store a value
>for this case.
We've done exactly that, with something like:
<!ELEMENT elevation (#PCDATA)>
datatype (int | float | double | boolean | other) #REQUIRED
other_datatype CDATA #IMPLIED
units (feet | meters | centimeters | inches | other) #REQUIRED
other_units CDATA #IMPLIED>
This model requires there to be a known value in the datatype and units
attribute (even if it is other), and it further allows an extensible method
for the user/author to say what that "other" value is, but doesn't require
them to. Granted, with this approach you can't do much intelligent
processing based on different values for the other_X attributes, but at
least you can do catch-all processing for "other".
Paul V. Biron
Kaiser Permanente, So Cal