[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Inheritance/defaulting of attributes

  • From: Peter Murray-Rust <peter@u...>
  • To: xml-dev@i...
  • Date: Sun, 05 Oct 1997 11:20:08

xml attribute inheritance
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 
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

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...

Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.