Hello Hussein,

just to understand it right.

When the clipboard is pasted the nodes with ns2:inclusion attributed are
converted
to a xi:include node.

And if i Rebuild the whole document (Ctrl+L) all Includes are reincluded and
rebuild.

If the above is correct why does the ClipboardFormat.parse() command not
automatically
reinclude a deteced Inclusion node.




|------------>
| Von:       |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |Hussein Shafie <hussein at xmlmind.com>                                      
                                                                                
  |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| An:        |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |Ulrich_Laegeler at arburg.com                                                
                                                                                
  |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Kopie:     |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |"xmleditor-support at xmlmind.com" <xmleditor-support at xmlmind.com>        
                                                                                
     |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Datum:     |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |14.01.2010 14:32                                                             
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Betreff:   |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [XXE] XInclude                                                           
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|





Ulrich_Laegeler at arburg.com wrote:
>
> if i insert a node via copy and paste which has a xi:include child
> this child is not automatically replaced with the referenced nodes
> like it is done when the document is opened.
> Is this a bug

This is not a bug. xi:include elements simply happen to have no special
meaning for the Copy and Paste commands. Moreover, we do not consider
this as being a limitation which could be removed in the future.

When I use the Copy command to copy a para containing, among other child
nodes, a *reference* to an element (and not xi:includes), here's what is
copied to the clipboard:

---
<?xml version="1.0" encoding="UTF-8"?>
<para xmlns:xi="http://www.w3.org/2001/XInclude";
xmlns:ns2="http://www.xmlmind.com/xmleditor/namespace/property";
xmlns:ns="http://www.xmlmind.com/xmleditor/namespace/clipboard";><ns:clipboard

ns2:inclusion="com.xmlmind.xml.xinclude.XInclude:href=&quot;file:/home/hussein/src/4xxe/demo/docbook-modular-book/glossary.xml&quot;

xpointer=&quot;XXE&quot;"
    ns2:readOnly="true"

ns2:sourceURL="file:/home/hussein/src/4xxe/demo/docbook-modular-book/glossary.xml">

    <phrase id="XXE">XMLmind XML Editor</phrase>
  </ns:clipboard> does not support XML entities, but you can nevertheless
create modular documents with this editor.</para>
---

See, no xi:include here. Just XML nodes decorated with properties
(serialized as XML attributes belonging to the
"http://www.xmlmind.com/xmleditor/namespace/property"; namespace).



> or do i have this to solve with custom code.
>

* You need to invoke command reinclude after pasting the contents of the
clipboard.
See http://www.xmlmind.com/xmleditor/_distrib/doc/commands/reinclude.html

* Alternatively, you may also directly copy or generate to  the
clipboard elements containing references to other elements (and not
xi:includes). In such case, the Paste command will work as you expect it.

The format of the clipboard is briefly documented here
http://www.xmlmind.com/xmleditor/_distrib/doc/api/com/xmlmind/xml/clipboard/package-summary.html










ARBURG GmbH + Co KG, Postfach 1109, D-72286 Lo?burg, Arthur-Hehl-Strasse, 
D-72290 Lossburg, Telefon: 07446 33-0, Telefax: 07446 33-3365, 
http://www.arburg.com, contact at arburg.com. 
Registergericht: AG Stuttgart, HRA 430209, USt-Id-Nr. DE 144 252 064, 
Komplement?r: Hehl Verwaltungs-GmbH, AG Stuttgart, HRB 430155. Gesch?ftsf?hrer: 
Eugen Hehl, Karl Hehl, Michael Hehl, Juliane Hehl, Renate Keinath, Herbert 
Kraib?hler, Michael Grandt, Helmut Heinson.

Diese E-Mail einschlie?lich ihrer Anh?nge ist vertraulich und daher allein f?r 
den Gebrauch durch den vorgesehenen Empf?nger bestimmt. Dritten ist das Lesen, 
Verteilen oder Weiterleiten dieser E-Mail nur mit ausdr?cklicher Zustimmung 
erlaubt. Wir bitten, eine fehlgeleitete E-Mail unverz?glich vollst?ndig zu 
l?schen und uns eine Nachricht zukommen zu lassen. Sofern diese E-Mail oder 
ihre Anh?nge Informationen enthalten, die erkennbar von Dritten stammen, 
?bernimmt ARBURG GmbH + Co KG, die Gliederungen und T?chter keine Haftung f?r 
diese. Insbesondere macht sich ARBURG GmbH + Co KG diese Informationen nicht zu 
Eigen.
This email may contain material that is confidential, privileged and for the 
sole use of the intended recipient. Any review, reliance or distribution by 
others or forwarding without express permission is strictly prohibited. If you 
are not the intended recipient, please contact the sender and delete all 
copies. ARBURG GmbH + Co KG, its branches and subsidiaries herewith exclude any 
liability for third-party information recognizably contained in this e-mail or 
its attachments. Third-party information does not necessarily reflect the 
opinion of ARBURG GmbH + Co KG. 

Reply via email to