Clipboard/Selection Target Types

Dave Malcolm david at davemalcolm.demon.co.uk
Wed Dec 31 02:20:29 EET 2003


Does Freedesktop.org maintain a list of "well-known" X selection target
atoms?  Or can someone direct me to an up-to-date one?

The lists I've found so far are: 
(i) in section 2.6.2 of the ICCCM here:
http://tronche.com/gui/x/icccm/sec-2.html
(ii) ftp://ftp.x.org/pub/R6.6/xc/registry

These don't seem particularly up-to-date or comprehensive, for instance,
what target should I use for fragments of HTML?  (or am I just being
dumb?)

In particular, I'm writing an XML editor (www.conglomerate.org) which
can support multiple XML formats, although it's primarily aimed at
DocBook editing.

I want to interoperate with other XML editors, and with web browsers. 
I'd like to be able to distinguish between different XML types when
copying/pasting fragments of XML source.  For example if a user pastes a
fragment of Kernel Cousin XML Source into a DocBook document, I'd like
the program to be able to convert all the <li> tags into <listitem> tags
automatically.  Also, when the user copies a fragment of DocBook source
to the clipboard, it would be nice to be able to offer it as HTML in
case they want to paste it into an email client.

So:
(i) Is there an atom for "fragment of XML source", with some agreed-upon
encoding (probably UTF-8)?
(ii) Is there a smart target atom that's more that just "XML Source" and
that carries some kind of DTD information - perhaps the Public ID of the
DTD?
(iii) Is there an agreed-upon atom for fragments of HTML source?

Should I write some kind of proposal for (ii) above, similar to the one
for UTF8_STRING?
http://www.pps.jussieu.fr/~jch/software/UTF8_STRING/UTF8_STRING.text

Thoughts?  Links?  Flames?

-- 
David Malcolm
www.conglomerate.org




More information about the xdg mailing list