Lists Home |
Date Index |
- From: "Clark C. Evans" <firstname.lastname@example.org>
- To: John Cowan <email@example.com>
- Date: Mon, 29 Nov 1999 02:59:23 -0500 (EST)
SML cannot drop attributes unless it provides
a resonable alternative.
On Sun, 28 Nov 1999, John Cowan wrote:
> > <element att="val"> <content/> </element>
> How about this?
> <element <att>val</att>> <content/> </element>
> This is for sure not XML/SGML, but it generalizes the recursive
> pattern. If you want an attribute on the attribute, you write:
> <element <att <att-of-att>subvalue</att-of-att>>val</att>> ...
Thanks John. Didn't even think of this. It would
definately allow for recursive attributes -- and a
clear distinction between meta informatoin (attributes)
and content information. Very nice.
Unfortunately, it breaks with XML compatibility... thus,
we are left with this question:
Is having a syntax level distinction between information and
information about the information (meta information) necessary?
I'm uncertain, but leaning towards "yes" for my vote.
IMHO, there is a huge difference between the two.
Take the following HTML fragment:
<table border="2" cellpadding="50">
I clearly see the different role that content plays
as opposed to attributes. The border and cellpadding
attributes *modify* the state of the table; where
the tr element content is *part-of* the table.
The border attribute recurisvely applies to
every one of the table's children by virtue
of how the table is drawn. In a similar way, the
colspan changes the last td element so that its
funciton is completely different -- a child of td
does not have this power.
On a side (but very important) note, the
attribute syntax allows all of these modifiers
to be expressed *before* the first element content.
>From a pratical sequential processing perspective,
this syntax distinction is very necessary --
otherwise one would have to wait until the entire
content of an element to be read "just-in-case"
one of the children modified its parent. This
would be a nightmare, and would require random
access... hence more memory, and thus, completely
undermine SML's application to less powerful devices.
>From a philosophical perspective, the attributes
define the "whole", where the content defines
the "parts". Mixing them leaves a nasty
taste in my mouth.
I assume there is a fundamental reason for
this seperation in SGML, and thus in HTML
and that it did not arrive by accident.
Could the above comments be part of the reason?
SML cannot drop attributes *unless* is provides
an alternative approach.
This approach should support the attributes
(those things which apply to the whole) appearing
first, and the content occuring afterwords.
Ideally, the alternative approach would
allow for recursion as well... hence
John Cowan's suggestion is brilliant...
However, it's not XML compatible.
Is this *such* a big deal? How hard
would it be to make a parser that could
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/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, 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)