OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Inheritance/defaulting of attributes

[ Lists Home | Date Index | Thread Index ]
  • From: Peter Murray-Rust <peter@ursus.demon.co.uk>
  • To: xml-dev@ic.ac.uk
  • Date: Sat, 04 Oct 1997 20:35:49

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

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

can be abbreviated to 

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


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

	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)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS