Lists Home |
Date Index |
I think this one important reason that many people can't wait until DTDs are
dead. They really make it hard to embed one XML document into another. If
DTDs are dead, it's trivial to embed one document into another.
If you need to do this, the best options I can think of are:
1. Bin64 the embedded document. This makes it hard to read, but does give
you the best fidelity with the original document.
2. Stick the Prolog of the document in a CDATA section. Stick the rest of
the document in a container element. An Internal Subset prolog _might_
contain "]]>", but it's pretty unlikely. If you car about namespaces, you
should also put a xmlns="" on the container element.
>From: Michael Brennan <Michael_Brennan@Allegis.com>
>To: "'email@example.com'" <firstname.lastname@example.org>,
>Subject: RE: [xml-dev] Documents within documents
>Date: Thu, 7 Feb 2002 12:15:26 -0800
> > From: Michael Kay [mailto:email@example.com]
> > The usual excuse for doing it seems to be that the inner
> > document has a
> > <!DOCTYPE..> declaration that people want to preserve while
> > carrying an XML
> > document over some protocol like SOAP.
> > Is there a better solution that we can point them to?
>Are they using internal DTD subsets or just referencing external DTD
>entities? If the latter, perhaps some sort of XLink based annotation that
>would let the recipient fetch the DTD separately (and add the DOCTYPE back
>into the document, if needed). If using SOAP With Attachments, the DTD
>even be included as an attachment and referenced via a "cid:" href.
>The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
>initiative of OASIS <http://www.oasis-open.org>
>The list archives are at http://lists.xml.org/archives/xml-dev/
>To subscribe or unsubscribe from this list use the subscription
Chat with friends online, try MSN Messenger: http://messenger.msn.com