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

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: attribute order (RE: Syntax Sugar and XML information models)



At 08:46 AM 3/31/01 -0800, Jeff Greif wrote:
>The alternative I think you're describing is to use a hashtable of
>attributes with defaults, and as the explicit attributes are collected,
>mark each one off in the defaulted attributes table if it is found
>there.  Then the remaining defaults, produced by iterating over that
>hashtable and ignoring marked entries, could be added to the explicit
>attributes.
>
>Both ways work, with approximately equivalent performance, but the
>second way makes it easier to preserve the order of the explicit
>attributes (as found in the instance).  The first way makes it easier to
>preserve the order of non-explicit defaulted attributes (as found in the
>DTD).

Depending on how it was implemented, I don't think it would be difficult to 
preserve the order of the explicit attributes and append the defaulted 
attributes, thereby preserving both sequences.

Gets a bit tricky when the order of instance usage is different from the 
order of declaration, of course.


Simon St.Laurent - Associate Editor, O'Reilly and Associates
XML Elements of Style / XML: A Primer, 2nd Ed.
XHTML: Migrating Toward XML
http://www.simonstl.com - XML essays and books