Lists Home |
Date Index |
- From: "Olivo Miotto" <email@example.com>
- To: firstname.lastname@example.org
- Date: Thu, 1 Oct 1998 20:13:23 +0800
I've been looking at the DCD submission and the proposed DTD
that was posted here a few days ago, and I have a few points to
discuss- I thought this would be the best forum.
I hope I'm not asking old questions (I've tried to search the
archives, but my connection from SE Asia is very slow). I must
point out that I am pretty new to XML, coming from the Software
Engineering/OO camp. Some of the questions were prompted by
a little exercise I'm doing: writing a DCD description of the
DCD DTD. I hope to post it soon.
1) First of all, I'm very excited about DCD. I think it really does take
XML into a new realm. I'm a little unclear about the long term
strategy though: assuming that DCD is approved, is the aim to be
an alternative to (or even replace perhaps) DTDs? Or be a
mechanism for defining DTDs? In any case, the triangular
relationship XML Document <-> DTD <-> DCD needs some
clarification for me.
2) I can understand that compatibility with RDF is a noble target,
but I think the interchangeability of Elements and Attributes (DCD
section 2.1.2) clouds the water, making it more difficult to process
DCD files. I would rather the syntax="explicit" form be the only way
of specifying DCD. The remainder of my questions assume this
3) A philosophical question: has anyone drawn up a clear functional
distinction between attributes and elements? DCD astutely refers
to both as properties, and indeed they have things in common.
Saying they are interchangeable (or at least that attributes can be
changed into elements) is however an oversimplification. It seems
to me that attributes are modifiers of the functionality of the element
they describe, while elements describe its content. I am not able to
formalize this very clearly though. Can someone help?
4) Related to 3): DCD allows elements to also have default and
fixed values like attributes. Am I correct in thinking that this is lost
when producing a DTD from DCD?
5) Elements and attributes have a lot of datatype-related properties
with interdependencies. A number of attributes are only applicable
to certain datatypes, etc. As an OO programmer, I think this looks
error-prone. I wish DCD had a more structured approach to the
definition of property data.
Related to this, it seems that there is little consistency between
what is defined as an attribute and what is defined as an element. A
good example is AttributeDef where, if Values is an element, then
Default should also be, as it represents one of the above Values.
I think it would be quite nice if some of the attributes were moved out
into separated tags, perhaps a <Range> tag for max/min/default, a
<Values> for literal values and their default, etc.
Even further, we could have <NumericalRange>, <AlphaRange>,
<DateRange>, or at least some tags for representing classes of
datatypes (<Date>, <String>, <Number> etc.). If someone is
interested in taking this further, I could work out some examples or
do a sample DTD.
6) I know this is not going to make me popular, but I think that there
are too many datatypes, and they mix storage and presentation
formats. It seems to me that, in a text-based format, you should not
have to care if an integer is i1, ui1 or whatever. Similarly, why have
both char and string? And is there a real need for picture, scale and
precision? Do we really need length for strings? Maybe I am not
seeing the big picture here...
7) The boolean type should be "True" or "False", not "1" or "0".
8) If in your content you have a single optional element, you must put
it in a group. Is this correct?
9) I don't really understand why we need ID-role when we have
datatypes of id, idref and idrefs
10) I'm not really sure what is meant by open/closed content. How is
it different from ANY and Mixed content?
11) The <Values> tag has a space-separated list of values. I know this
is a good thing to do if values must be an attribute, but from a DTD
viewpoint it would be better as a sequence of <Value> tags, e.g.
I'm sorry this has turned out to be a long message- I would really
appreciate some wisdom from the rest of you.
Thanks and best regards
Olivo Miotto Technology Expert (Distributed Object Computing)
Institute of Systems Science, National University of Singapore
email@example.com Tel: +65-772 6644 Fax: +65-778 2571
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)