On 2007-07-09, at 10:47:23, Christopher Nebel wrote:
An intrinsic "list" type is a bad idea, because you're not
specifying what it's a list *of*.
Right. XML attributes only support "lists" (actually more like C
arrays) of a single type (IDRefs, NMTOKENS, etc.) and an attribute
cannot be _either_ an IDRef or an NMTOKEN type. Nor can it be a
plurality of types (IDRef and/or NMTOKENS). Unlike AEDescLists of
course, because AEDescs are self-describing and an aete naturally
utilizes that concept. Hence the problem of using an XML attribute to
describe something with a similar attribute concept but whose design
is inherently greater (more encompassing, more flexible). In XML that
kind of notion is supplied by 'element'.
So, continuing the XML attribute logic restrictions (not either/or,
not plurality of types), the sdef Common Attributes should not have
"type". Instead, "type" should be in a Common Elements category --
something similar to "implementation" but mostly required instead of
optional. That's because the maximum "type" can describe is more than
XML attribute. Furthermore, "type" element could then contain an
optional "implementation" element.
That's what the "list" attribute is for -- read the section on
"type" elements.
I think I've got it memorized by now :-)
I've also transcribed it into an xhtml format with some referencing
links. Very handy for sdef design. Is it legal to put that version on
my site (I've made a few corrections)?
Philip Aker
email@hidden
Some of the tools do support a "list" type, but only for backward
compatibility with aetes.
Why is there no 'list' type in the sdef Common Attributes type
section? And I think nowhere in any of the include files (like
Intrinsics.sdef).
The type of an element, property, or parameter. The value must be
one of the primitive types: any, text, integer, real, number,
boolean, specifier, location specifier, record, date, file,
point, rectangle, or type, or the name of a class, enumeration,
record-type, or value-type defined elsewhere in the sdef. To
specify a complex type such as list of integer or number or text,
use a type element as described below.