[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Mon, 23 Aug 1999 09:52:01 -0600

It does have an initial appeal and I do use that type of construct
frequently, but I think it has some problems trying to build it into the
schema language.  If it is done at all, maybe it should really be an
Element-.  One of the key limitations of attributes is the inability to
support structure.  So I'm forced to make a transition to an element when I
need to add structured content, but I can use the attribute form when I
don't have any structured content.  The attribute can represent an element
that in this particular instance has no structured content.

Say, if I have a schema to communicate weather readings that reads something
like:

<reading>
	<location airportCode="IAH" temperature="33"/>
</reading>

If I decided that I needed to add annotation to the temperature, I'd need to
support something like:

<reading>
	<location airportCode="IAH">
		<temperature value="33">
			<note>Readings are delayed by 15 minutes</note>
		</temperature>
	<location>
</reading>

My processing software could be smart enough to support either form.  So if
I didn't have a note to go with the reading I could use the attribute form.

However I'm not sure if I want the schema to have to define the map from the
element form to the attribute form or have the DOM produce a phantom element
for me.


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/ and on CD-ROM/ISBN 981-02-3594-1
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...)



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member