[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Inheritance/defaulting of attributes
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@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...)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|