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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Content roles in XML

[ Lists Home | Date Index | Thread Index ]
  • From: Jim Amsden <jamsden@us.ibm.com>
  • To: <xml-dev@ic.ac.uk>
  • Date: Thu, 22 Jan 1998 15:07:47 -0500

I just thought of a simple mechanism for describing the role an element plays
in the content model for an element. What's needed is a way to give names for
content elements (which currently only give the content type). How about
something like roleName=contentElement (e.g., addListenerMethod=Method). This
is similar to how attribute names define the role a value plays in describing a
characteristic of an element. Default roles could be the same as the
contentElement name, the same as in UML. So, this could be a simple upwardly
compatible extension to XML. It's also simpler and more regular than using
parameter entities.

The example could then look like:

<!ELEMENT EventSet (Annotation*,
    addListenerMethod=Method,
    removeListenerMethod=Method,
    Method+)
>
<!ATTLIST EventSet
  %FeatureDescriptor;

  listenerType CDATA #REQUIRED
  isInDefaultEventSet (true | false) "false"
  isUnicast (true | false) "false"
>

Notice that I used the default for all the event methods because that's a
reasonable role name. The DOM could retain the role name for the content and
allow queries based on this name the same way it does for attributes. This
would make the DOM much more semantically rich and would reduce the need to
create a lot of customizable nodes.


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