Attribute Question

Peter Murray-Rust peter at
Fri Aug 28 00:39:08 BST 1998

At 13:15 26/08/98 -0700, Frank Blau wrote:
>If I have 3 attributes ("Format", "Usage", and "Loop") that I want every
>element in my DTD to have, is there a way to globally declare them? Do
>subelements inherit the attributes of the parent element?

As several people have said, no. 

But there are signs of similar things in the specs already. The values of
xml:lang and xml:space 'apply' to the children of the containing element
(unless superseded). And xml:link and some other attributes (still in
draft) *are* required to be inherited. This leads to some pressure to
provide 'inheritance-like' software for attributes. It's wasteful and
error-prone if every application has to think about a (probably growing)
set of inheritance-like phenomena and I'd certainly like it to be addressed
in the layered APIs we are starting to discuss.


Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS, Virtual Hyperglossary

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list