Hussein, thanks for your answers, my remarks between lines:

On Fri, May 3, 2013 at 5:09 AM, Hussein Shafie <[email protected]> wrote:

> On 05/02/2013 04:21 PM, Fabián Mandelbaum wrote:
>
>>
>> we've implemented a copy-as-reference from our web application by
>> generating the same text generated by XXE on the clipboard for the same
>> operation (Open a file, select the root node, Copy as reference, open an
>> ASCII text editor, paste).
>>
>
>
>
>> Please find below an excerpt of the clipboard contents for one of our
>> tests. Why is it not working anymore on XXE 5.6.0?
>>
>> Is the clipboard format documented somewhere?
>>
>> Thanks in advance for your answer.
>>
>
>
> This is not a problem of the format. The clipboard format has not changed
> in XXE 5.6.0.
>
> An external application copying some XML to the clipboard for use by XXE
> must now declare the copied data as being "application/xml" (or "text/xml").
>
> In a nutshell, XXE 5.6.0 makes a difference between "text/plain" and
> "application/xml", while XXE 5.4.0 ignored "application/xml" and
> ``sniffed'' the "text/plain" in order the detect the case where this text
> was actually XML (starts with "<?xml ").
>
> References:
>
> * http://www.xmlmind.com/**xmleditor/_distrib/doc/api/**
> com/xmlmind/xmledit/edit/**XMLClipboard.html<http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/edit/XMLClipboard.html>
>
> * http://www.xmlmind.com/**xmleditor/_distrib/doc/api/**
> com/xmlmind/xmledit/edit/**XMLTransferable.html<http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xmledit/edit/XMLTransferable.html>
>
>
So, we're kind of stuck... because it's not easy (or even possible?) from
Javascript to copy stuff to the clipboard, much less being able to specify
the media type (text/xml, for example) of the copied object...

I'm sure there's a very valid and well thought rationale behind this
change, but this is a feature breaker for us...

We're currently investigating the possibility to implement a small java
applet that will perform this copy-to-clipboard function to replace the
JavaScript implemented feature on our UI, but having an applet (on an
otherwise html+css+javascript-ONLY UI) just for this is not a very elegant
solution.

Will keep investigating about JavaScript and the clipboard (which seems
rather dead because, mainly, security constraints).

-- 
Fabián Mandelbaum
IS Engineer
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to