At 08:21 -0400 10/21/03, Dan Sugalski wrote:
> I find the notion of an "XML header" a bit confusing, given Dan's
statement to the effect that it was a throw to XML folks.

 I think anything "XML folks" will be interested in will entail
 *wrapping* stuff, not *prefixing* it.

Nah, I expect what they'll want is for the entire data stream of serialized objects to be in XML format. Which is fine--they can have that. (It's why I mentioned the serialization routines can be overridden)

For an XML stream the header might be <xml parrot format='xml'
version=1.0> with the rest of the stream in XML. A YAML stream would start
<xml parrot format='yaml' version=1.0> with the rest in YAML, and teh
binary format as <xml parrot format='binary' version=1.0>. Or something
like that, modulo actual correct XML.

If you want that to be looking like valid XML, it would have to be different:


error: Specification mandate value for attribute parrot
<xml parrot/>
          ^
Better in my opinion would be something like:

<parrot format="xml" version="1.0"/>data yadda yadda yadda

At least this would be a valid stand-alone XML container. And possibly parsers out there can be coerced into leaving the rest of the stream for other processes to be read.


This way we have a single, fixed-format type/version header, which makes
the initial identification easier and less error-prone. (Possibly even
fit for file and programs of its ilk to note) The binary format won't
care, and teh YAML format shouldn't care (as long as the indenting's
right) but the XML format would, so it seems to make sense to use the XML
stuff for the initial header.

So are we talking about a header or a wrapper? If it is really a header, it's not XML and then it's prettyy useless from an XML point of view.



Liz

Reply via email to