OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   XML Fragments

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: XML Fragments
  • From: Daniel Schierbeck <daniel.schierbeck@gmail.com>
  • 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)

Hi everybody,

Some time ago there was a discussion[1] 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[2], 
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:

  <xml:fragment xmlns="http://www.w3.org/1999/xhtml";>
    <li>Foo</li>
    <li>Bar</li>
    <li>Baz</li>
  </xml:fragment>

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 
yours.

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.


Cheers,
Daniel Schierbeck


[1]: http://lists.w3.org/Archives/Public/www-html/2006Jan/0031.html
[2]: http://www.w3.org/TR/xml-fragment




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS