Partial XML Processors (was Re: JavaScript parser update and Questions)

Richard Light richard at
Sat Jan 17 10:41:55 GMT 1998

In message <007101bd231a$f856c580$2801a8c0 at>,
Jeremie Miller <jeremie at> writes
>More questions/issues then:
>A well-formed XML document is not required to have a DTD, internal or
>external, correct?  Is a well-formed parser not an XML parser that does not
>have access to or does not process a DTD, internal or external?  I guess I
>haven't found a clear definition of what a well-formed parser is yet.
>If this is true, then a well-formed parser doesn't even have to acknowledge
>that entities exist except for the built in ones, and absolutely all
>whitespace is preserved, right?

I don't think that this line of reasoning is going to be very helpful to

While a well-formed XML document is not required to have a DTD, it is
perfectly entitled to have one if it wants to.  If this includes an
internal DTD subset, this will be physically part of the file your
parser is trying to parse.  So it follows that _any_ XML parser has to
be able to parse the internal subset correctly, simply to arrive
reliably at the root element.

Your logic is tending towards a situation where your 'partial XML
parser' would be unable to parse valid XML documents, which is certainly
not what is intended.  The idea is that _every_ XML document is well-
formed (and ergo parsable by a 'well-formed parser'), and some go on to
the sunlit uplands of validity.

All whitespace is preserved by any XML parser.  The only refinement is
the a validating parser will flag some of this whitespace as
'ignorable'.  It's up to the XML application to decide what it does with
this information.

Richard Light.

Richard Light
SGML/XML and Museum Information Consultancy
richard at

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at
Archived as:
To (un)subscribe, mailto:majordomo at the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at

More information about the Xml-dev mailing list