Non Sucking YAML parser

David Wright dave-lpm` at
Thu Sep 14 16:27:46 BST 2006

> On Thu, Sep 14, 2006 at 12:21:49PM +0200, Robin Berjon wrote:
>> [XML namespaces]
> Perhaps I'm being dense, but what is the point of namespaces in XML?  If
> your code comes across a document it can't deal with cos it's - say -
> describing a hospital visit instead of a book - then it's going to barf.
> Code dealing with XML must know a lot about the documents anyway, so all
> that extra verbiage is pointless.  Say 'title' instead of
> <hospitalvisit:patientdetails:title>Mr</crap>* and <book:title>Winnnie
> The Pooh</waffle>.
> If instead your code is meant to handle generic documents and not really
> understand them - perhaps it is code to traverse an arbitrary document
> element tree, or to store a document in a database - then it doesn't
> need to know about the namespaces anyway, nor can it be expected to
> usefully compare documents, so again they're pointless.

At $current_employer, we have evilly large XML manifests whose format is 
the bastard child of ideas from Microsoft,, the IEEE, and 
$current_employer. The resulting documents have elements from 8 different 
namespaces. Most of the orgs involved did not collaborate on their 
individiual standards.

The manifests get munged in house and distributed to variety of 
third-party apps, some of which only know about some of the namespaces. 
>From my point of view it's very easy to have xsl:templates such as:

<xsl:template match="//*[starts-with(name(), 'fooble:')]"/>

That strips everything from a given namespace in one swoop. (I'm sure I 
came up with a cleaner way than that in XSL, but you see the economy.)

>From the hand-mungers point of view, the XML is miles easier to read 
when they can easily identify the source of each element.

We and the whole project would be pretty fscked without them, in short.


More information about the mailing list