[
Lists Home |
Date Index |
Thread Index
]
- From: Peter Murray-Rust <peter@ursus.demon.co.uk>
- To: xml-dev@ic.ac.uk
- Date: Sun, 05 Oct 1997 11:20:08
Thanks Eve,
At 18:16 04/10/97 -0400, Eve L. Maler wrote:
>Inheritance/defaulting of attributes is a quite common thing in SGML (and
>so presumably it will be common in XML). In fact, it's common enough that
>a lot of people wish that SGML offered an attribute default value of
>#INHERITED, as a more specific form of #IMPLIED. In some DTDs, I've
>defined a parameter entity %inherited; that resolves to #IMPLIED, as a kind
>of self-documentation of intent.
>
>I think it might get a little tricky, though, to nail down precisely what
>the defaulting behavior should be if it's formalized in XML. When you
>inherit a value from an ancestor, the attribute name is assumed the same
>across both element types. But should they have the same declared and
Yes - I agree. In XLL EXTENDED has (essentially) the same attributes as its
child LOCATOR. I assume this is so that LOCATOR can inherit them from
EXTENDED, rather than that EXTENDED actually needs them itself? [Please
disabuse me if not - but I couldn't see an *obvious* separate use for, say,
ACTUATE on EXTENDED other than to pass it to its children.]
My own case is worse in that I have defined
<!ELEMENT LIST ANY>
since its role is simply to act as a container. Therefore *with a DTD* it
would have to anticipate all the attributes of its children and those that
it might wish to pass on to them. Without a DTD [more accurately, without
wishing to validate the whole document against a single DTD] this is less
of a restriction, but there still has to be a non-prose mechanism to pass
the attributes on to the children. (Just as we have XML-ATTRIBUTE for
mapping, we could ask the ERB for some inheritance mechanism :-)
>default types? Is it an error if they don't? In fact, what this comes
>down to is needing some sort of agreement over what attributes are "the
>same," even though they're on different element types. (Hmm, a subject
>that has been broached in the namespace discussion on the SIG list
>recently...)
An alternative - which I have only just read - could be the mechanism in
the RDF spec (I assume this is public now and can be discussed on this
list?). Since one can define a relationship between nodes, it would be
possible for this list to suggest (or define) such relationships. I am not
sure how generic this is, or whether it has to be done for each instance...
P.
>
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)
|