From: Stefan Seefeld (seefeld_at_[hidden])
Date: 2007-07-13 11:15:00
Jake Voytko wrote:
> My concern, as I indicated in the other thread, is that
> are all valid XML documents, and represent the same data. If this library
> were solely to be used for writing, I would say that this is not an issue.
> However, what is written must be read.
I'm not sure what you are driving at. The parsing of XML files is well specified,
and that's what libxml2 implements.
> The thing I don't understand about the type-safety proposals is how they
> intend to take into account data that is read from a file. Suppose we write
> a program to neatly display XML data from any generic XML file:
> boost::xml my_doc_reader(filename);
> would certainly be a step, and I would expect it to contain a full XML tree
> after this step is said and done with no extra intervention. The XML library
> certainly can't instantiate the proper structs in memory if we don't know
> what they are. Do they exist solely for writing the document?
> To me, type safety is a more specific problem than what the XML standard
> deals with.
Indeed, and so, for the purpose of keeping this XML proposal on track, I'd
suggest to disregard any type safety issues that don't directly derive from
XML well-formedness. XML validation (no matter what schema is used to define
the document type, dtd, relaxng, xsd, etc.) is an add-on, and a runtime mechanism.
If people want to map some specific (X)Schema to the C++ type system, let them
do that, on top of boost.xml.
-- ...ich hab' noch einen Koffer in Berlin...
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk