mathieu wrote:
Joe Kesselman wrote: 2. Do I need to define my own file version (maybe as the first XML
element) ? Up to you. Will you ever need to distinguish versions?
Well I disagree simply because I don't know.
If you don't know, you can either treat the absence of the version mark
as indicating version 0.0, or you can go ahead and design it in now.
Either solution is defendable.
In general: If in doubt, it's wise to design for a version mark, even if
you make it optional.
My understanding was that DTD or
XML schema was much more explicit for a third party than if I were to
write down the file specification.
Not entirely. The DTD/Schema may be useful for driving some tools. It
may provide some specific kinds of information that aren't expressed
directly in the instance document -- if your parser doesn't support
xml:id, and you don't have a DTD or schema, tools may not be able to
take advantage of some optimization potential. In fact, IBM has
demonstrated that a schema-aware parser can actually be made faster than
a non-validating parser, if you know which schema to expect and you do
some compilation ahead of time. (I think a paper on that topic appears
in the current issue of the IBM Systems Journal; I know the authors have
presented papers on this at conferences.)
If those issues don't concern you, you don't have to create a DTD or
schema immediately -- but the longer you wait, the more likely folks
will do things in their instance documents that you didn't expect. And
formalizing your document design is a good exercise even if you don't
enforce it.
--
() ASCII Ribbon Campaign | Joe Kesselman
/\ Stamp out HTML e-mail! | System architexture and kinetic poetry