[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML Fragments

  • To: xml-dev@l...
  • Subject: XML Fragments
  • From: Daniel Schierbeck <daniel.schierbeck@g...>
  • 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)

xml fragments
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.