Lists Home |
Date Index |
- To: email@example.com
- Subject: XML Fragments
- From: Daniel Schierbeck <firstname.lastname@example.org>
- Date: Sat, 25 Feb 2006 16:21:04 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:subject:content-type:content-transfer-encoding; b=tlPF8D46Yk3/RKv2JfgbEFO7aYkdMw44RPEZySwDkrmdR6ATEMvl+QbK5i46qWNNy/vjukCT9KJX61aHvtNW8tcMDysve9TFmKI2uPcqNgoTv2tIC+c/ogLbEcj/1CwVgLleIoz1aAP2+DKwqKrSV6nLfC8z2U12Bh5yKcMVVnY=
- User-agent: Thunderbird 1.5 (X11/20051201)
Some time ago there was a discussion on the W3C XHTML mailing list
about the content type of XHTML fragments. That discussion made me
wonder if it wouldn't be better to have a more generic solution, one
that covers all XML dialects.
I've read the W3C XML Fragment Interchange Candidate Recommendation,
which I've never seen implemented (that may just be because I'm
ignorant.) The specification seems verbose, and is therefore in my
opinion unfit as a generic way of transferring XML fragments.
What I think would be optimal is a simple, encapsulating root element in
the XML namespace, such as this:
Such a document could be sent with a content type other than */xml,
maybe */xml-fragment. That would allow the receiving application to
treat the document as a DocumentFragment instead of a Document
(DOM-wise), which would make the insertion of the fragment much easier.
Instead of having to extract the children of a received document and
then insert it into the local document, one can just insert the received
DocumentFragment. I hope that my idea of DocumentFragment corresponds to
I posted this message to xml-dev because I'd like to get some feedback,
and maybe further develop this, though I'd like like to keep it as
simple as possible.