|
[XML-DEV Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: Nested Documents (was: XML 2.0)
- From: "Johnson, Matthew C. (LNG-ALB)" <Matthew.C.Johnson@l...>
- To: "Michael Kay" <mike@s...>, <xml-dev@l...>
- Date: Wed, 27 Feb 2008 21:33:08 -0500

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@s...]
Sent: Wednesday, February 27, 2008
4:44 PM
To: Johnson,
Matthew C. (LNG-ALB); xml-dev@l...
Subject: RE: Nested
Documents (was: XML 2.0)
In a world where XML allows multiple
roots, I’m curious whether each root would potentially allow a different
encoding? Would multiple prologs be allowed?
We're talking here about multiple
elements underneath a single document node, not about multiple XML documents
held in a single file. (Multiple documents in a single file requires no change
to the specification, since the word "file" is not
mentioned except by way of examples in the XML rec: a parser starts
with a sequence of octets, and where it gets them from is outside the scope of
the spec.)
Michael Kay
http://www.saxonica.com/
|

[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November.
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
| RSS 2.0 |
 |
| Atom 0.3 |
 |
| |
Stylus Studio has published XML-DEV in RSS and ATOM formats,
enabling users to easily subcribe to the list from their preferred news reader application.
|
Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website.
they were not included by the author in the initial post. To view the content without the Sponsor Links please
click here.
|
|