XML Best Practices (was Re: text/html for xml extensions of XHTML)

At 06:15 AM 5/7/01 -0700, Seth Russell wrote:
> > XML program structures, even without validation running, are typically far
> > too brittle to ignore extra information caused by extra child
> > elements.  You'd get a lot of strange errors where documents that could be
> > processed in certain contexts would fail in others.
>
>But what is actually at error here:  the brittle processors, or the XML
>documents?  I would say it was the brittle processors ... what would you
>say?   Incidentally I can't  form a "valid to the author" response to all
>the emails that appear in my mailbox ..... so I don't see why one could
>assume that some XML processor should be expected to do any better.

I'd say it's a best practice issue, not an error.  The tools (DOM, XPath) 
commonly used to process XML documents require that developers have some 
concept of what structures they'll be using.  If there's been an error 
made, it's at the level which defines such processing.

SAX does make it easier to ignore extra markup than the tree-based systems, 
but I'm not sure that was a deliberate design choice or a side-effect of 
event-based processing.

> > I've argued for a long while that flexibility (not standardization) of
> > vocabularies is the real lesson of XML, but that's not reflected in
>current
> > practice.
>
>Could you sketch for us what "flexibility of vocabularies" means to you ?

Generally speaking, it means that developers and users can create 
vocabularies which are meaningful to them, and not necessarily to expert 
committees.  I've got a very sketchy outline at:
http://www.simonstl.com/articles/selfish2.htm

It's not done yet, probably won't be for a few weeks, but it might give an 
outline.  Note that I expect transformations to deal with a lot of the 
issues described above, not inherently flexible processing.  After years of 
working with 'flexible HTML processing', I can't say I'm fond of 
unpredictable error-correction and the like.

There's also a presentation focusing on the role of transformations in XML at:
http://www.simonstl.com/articles/transform/transform.html


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

Received on Monday, 7 May 2001 09:42:43 UTC