Re: [xml-dev] "Introducing MicroXML, Part 1: Explore the basicprinciples of ...
I forgot to mention one other point.
I think there are many situations where it would be useful to have a
single byte stream contain a sequence of MicroXML documents, eg log
files or XMPP-like applications.
Yes, this is something I've long wished XML had. Of course there have been all the old, transport layer tricks such as separating them with form feed characters and having a pre-processor separating by that signal and sending them serially to a parser, but it would be useful to have a way to describe the parsing of such documents in XML terms.
If you allow PIs both before and
after the root element, you can't unambiguously parse such a byte
stream because you don't know whether a PI between two root elements
goes with the preceding or following element.
I'm still mulling over your thoughts on PIs, and at first consideration your suggestions seem very sound, but I'm not sure about the document series use-case argument. I would tend to think there should be some sort of separator. Since the DTDecls has been so greatly simplified, one could simply mandate that at the beginning of each document for the serial use-case. Or pick form feed or other such control character as a separator.
Sure without a separator, you would simply have an closing document tag switch the serial docs parser to a state of looking for new start tag, DTDecl, PI or end of stream, but I think an explicit separator would reduce the cases where what we would think of now as malformedness from user error winds up looking like an intentional sequence of two or more documents.
--