Inheritance/defaulting of attributes

Peter Murray-Rust peter at
Sat Oct 4 21:47:32 BST 1997

The XLL spec (3.4) reads:

>>>Note that many of the attributes may be provided for both the parent
linking element and the child locator element. If any such attribute is
provided in the linking element but not in a locator element, the value
provided in the linking element is to be used in processing the locator
element. In other words, the attributes provided in the linking element may
serve as defaults for the (possibly many) locator elements.

This requires the implementation to provide for LOCATORs (children) to
'inherit' attributes from EXTENDED (parent). In my own DTD I would like to
be able to use this philosophy, as in the following simple example of a
list of numbers, all of type FLOAT

<!-- ... -->

can be abbreviated to 

  <VAR TITLE="x">1.2</VAR>
  <VAR TITLE="y">2.3</VAR>
<!-- ... -->

Is this seen as a sufficiently general mechanism in XML that it is worth
creating a DTD-independent engine for this? If so, is there a general
mechanism for indicating (in the document instance or DTD) that this
operation is to be carried out? At present it is only prose in the XLL
spec?  It might be preferable to have a syntactic stement of this
requirement - do otehrs feel the same? Can AFs be used? 

[At present I have hardcoded the XLL prose into JUMBO but I don't feel
happy about it, especially if the spec changes in the future. In some
circumstances I imagine that entities could achieve some simplification,
but they don't allow a child attribute value to override a parent value.]


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