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


Help: OASIS Mailing Lists Help | MarkMail Help



   writing good xml

[ Lists Home | Date Index | Thread Index ]

Dear All

A general question and a specific one.

Someone once told me that you should only used attributes when you know that
you will never need another attribute. (Case 1)

And then I read somewhere to forget about attributes except for the
exception of an id attribute. (Case 2)

Does anyone care to comment and clarify this.

And to add a specific question.

I want to define a set of 64 bit flags, and I want to only define ones that
are true.

What do you reckon is the best ways to do this:

Case 1

<x flag0="true" flag4="true"/>


Case 2


or something like:

Case 3



Case 4

<Flags Value="20"> <!- Binary 10100 -->


Case 5


<Flags Value="9">

or something better? Can anyone see any problems with any of the

I would like the resulting XML to be easy to parse and to transform ( ie not
tricky xpath or recursion required).

I haven't decided whether to use events such as those found in sax. 

any comments or suggestions would be gladly appreciated.


kent gibson


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS