Having only looked at sections of parser
code, I don’t know the answer to this. What is it about a 1.0
parser that tells it to build the document node? Is it simply the start
of the root element? To me, XML 1.0 has a single document node and a
single root element (which is a child of the document node). I’m
not clear on why the spec would not need to change to allow multiple documents
in a single file (or stream or whatever). Using today’s parsers I can’t
parse the following as a single stream/file/etc. <person> <name>Matt
Johnson</name> </person> <person> <name>Michael
Kay</name> </person> I have to add the arbitrary <people>
wrapper which I may not care about. Using today’s parsers, I think this
would be viewed as two root elements under a single document node which causes
the parser to fail. Not being clear on the details of a parser, it is not
clear to me how it would know (using the existing spec) that each
<person> should be attached to separate document nodes. Perhaps
your point is that the spec doesn’t care and it is an implementation
issue? Thanks. Matt From: Michael Kay [mailto:mike@saxonica.com]
|