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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: SAX: Attributes

[ Lists Home | Date Index | Thread Index ]
  • From: Sean Mc Grath <digitome@iol.ie>
  • To: xml-dev@ic.ac.uk
  • Date: Sun, 4 Jan 1998 23:40:05 GMT

>
>The alternative is to return to what I had originally done with
>Ælfred, and generate a separate event for each attribute:
>
>  public void attribute (String elementName, String aname, String value);
>

Separate attribute events raises a question.

Unlike SGML, XML does not specify that the order in which attribute values
are supplied in a start-tag is insignificant to applications.
(Perhaps I missed something it in the spec.?). A processor working
sans DTD obviously cannot determine a declaration order in which to generate
the events.

Annex G of the SGML handbook just says the order is insignificant. However,
nsgmls ESIS supplies then in declaration order and I for one have written
apps that relied on that. Perhaps writing apps that rely on a specific
order of attribute event arrival is just plain bad design!

Anyway, the dictionary approach, supplying all the attributes in one go
side-steps buffering and state space for simple little SAX apps. that want
to pick
up attributes X and Y of element Z and nothing else.

While on this subject, what comes first, a start-tag event or its attribute
event(s)?


Sean Mc Grath
sean at digitome dot com




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