Boost logo

Boost Users :

From: Pierre THIERRY (nowhere.man_at_[hidden])
Date: 2006-06-22 10:05:40


Le Tue, 20 Jun 2006 10:02:37 -0700, Delfin Rojas a écrit :
> I'm sorry to disagree but each XML element can be order-dependent or
> not according to the XML schema used. In the XML schemas you can
> specify the sub-elements of a given element must appear on a given
> order or you can specify sub-elements can appear in any order and in
> any amount.

But that doesn't make the different orderings an equivalence class for
documents or infosets.

That is, a schema could allow:

<root> <foo value="1"/> <bar value="2"/> </root>

and

<root> <bar value="2"/> <foo value="1"/> </root>

and the application reading them could consider that they provide the
same information, but they still would constitute two different
documents and infosets...

> However, boost::serialization doesn't care about XML schemas and the
> current serialization xml archive seems to use a SAX-style parsing to
> process the XML document so it must be order-dependent.

Though SAX-parsing could enable order-independence: you could fill the
foo member wherever you're parsing it and the bar member the same way,
AFAIK. But I didn't look at the way the serialization works, so maybe
it's only possible with DOM.

Doubtfully,
Nowhere man

-- 
nowhere.man_at_[hidden]
OpenPGP 0xD9D50D8A

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net