>This is _not_ a well-formed XML (or HTML)
>document, and may not be represented in the DOM.

Actually, I've overstated that just slightly. If you _had_ to represent
this sort of "xml fragment" in the DOM, you'd do so by either making it
content of a dummy element or of a DocumentFragment (which is essentially
an anonymous orphan element with no attributes).

I suppose we _could_ change our output DOMbuilder so it recognizes an
attempt to create a second root element (or text, which is also forbidden
at the root) and takes time out to restructure the document per one of
those two approaches. You'd wind up with something that would either have
to be serialized as an external entity rather than a "real" document, or
that would have a root element you hadn't actually asked for.

On the other hand, warning folks that they've produced something which
isn't a proper XML Document is also useful, since in most cases I expect
that will be unintentional. So the current behavior can certainly be
defended.

Is there a real need to be able to use XSLT-into-a-DOM to build an External
Entity rather than a Document?

Reply via email to