Hi Hussein,

Thanks very much for your help.
Attached are the desired files.
"normen.zip" should be dezipped into the config folder of XXE

wbr,
Roman

> -----Urspr?ngliche Nachricht-----
> Von: Hussein Shafie [mailto:hussein at pixware.fr] 
> Gesendet: Donnerstag, 19. Mai 2005 16:02
> An: Huditsch Roman
> Cc: xmleditor-support at xmlmind.com
> Betreff: Re: AW: WG: [XXE] command for inserting 2 elements
> 
> Please send me your schema, a document conforming to this 
> schema and your prototype configuration file.
> 
> Huditsch Roman wrote:
> > Hi,
> > 
> > I just tried to implement the solution below for a similar problem.
> > But unfortunately, I can't get it to work.
> > 
> > My current Node is called - with ist full qualified name - 
> "{http://www.lexisnexis.at/schema/norm}listeneintrag"; 
> > I want now want to insert two nodes after listeneintrag.
> > I used the paste command, but failed miserably....
> > 
> > Here is my code: 
> > 
> > <cfg:command name="insertNumListenPunkt">
> >             <cfg:macro>
> >                     <cfg:sequence>
> >                             <cfg:command name="selectNode" 
> parameter="ancestor[implicitElement] 
> {http://www.lexisnexis.at/schema/norm}listeneintrag"/>
> >                             <cfg:command name="paste" 
> parameter="after &lt;?xml version='1.0'?&gt; &lt;ns:clipboard 
> xmlns:ns='http://www.xmlmind.com/xmleditor/namespace/clipboard
> '&gt;&lt;listnum&gt;&lt;/listnum&gt;&lt;listeneintrag&gt;&lt;a
> bsatz&gt;&lt;/absatz&gt;&lt;/listeneintrag&gt;&lt;/ns:clipboard&gt;"/>
> >                     </cfg:sequence>
> >             </cfg:macro>
> >     </cfg:command>
> > 
> > 
> > It works fine till the selectNode. The desired node gets 
> selected, but no insertion is done....
> > I also tried to qualify all element names in the paste command, like
> > 
> > <cfg:command name="insertNumListenPunkt">
> >             <cfg:macro>
> >                     <cfg:sequence>
> >                             <cfg:command name="selectNode" 
> parameter="ancestor[implicitElement] 
> {http://www.lexisnexis.at/schema/norm}listeneintrag"/>
> >                             <cfg:command name="paste" 
> parameter="after &lt;?xml version='1.0'?&gt; &lt;ns:clipboard 
> xmlns:ns='http://www.xmlmind.com/xmleditor/namespace/clipboard
> '&gt;&lt;{http://www.lexisnexis.at/schema/norm}listnum&gt;&lt;
/{http://www.lexisnexis.at/schema/norm}listnum&gt;> 
&lt;{http://www.lexisnexis.at/schema/norm}listeneintrag&gt;&lt
;{http://www.lexisnexis.at/schema/norm}absatz&gt;> 
&lt;/{http://www.lexisnexis.at/schema/norm}absatz&gt;&lt;/{htt
p://www.lexisnexis.at/schema/norm}listeneintrag&gt;&lt;/ns:clipboard&gt;"/>
> >                     </cfg:sequence>
> >             </cfg:macro>
> >     </cfg:command>
> > 
> > But it didn't work either.
> > My schema allows the insertion of the two nodes at the 
> desired position.
> > Can you help me?
> > 
> > wbr,
> > Roman
> > 
> > 
> >>-----Urspr?ngliche Nachricht-----
> >>Von: xmleditor-support-bounces at xmlmind.com
> >>[mailto:xmleditor-support-bounces at xmlmind.com] Im Auftrag 
> von Hussein 
> >>Shafie
> >>Gesendet: Dienstag, 17. Mai 2005 15:16
> >>An: Klocker Christoph
> >>Cc: xmleditor-support at xmlmind.com
> >>Betreff: Re: WG: [XXE] command for inserting 2 elements
> >>
> >>Klocker Christoph wrote:
> >>
> >>>Hi,
> >>>
> >>>tried now different ways, couldn't get it working....
> >>>
> >>>my macro looks like you said,
> >>>
> >>><cfg:command name="insertNumListenPunkt">
> >>>         <cfg:macro>
> >>>                   <cfg:sequence>
> >>>             <cfg:command name="selectNode" 
> >>
> >>parameter="ancestor[implicitElement] punkt"/>                       
> >>
> >>>                   <cfg:command name="paste" 
> >>
> >>parameter="after &lt;?xml
> >>version='1.0'?&gt;listnum&gt;&lt;/listnum&gt;&lt;punkt&gt;&lt;
> >>absatz&gt;&lt;/absatz&gt;&lt;/punkt&gt;"/>
> >>
> >>>            </cfg:sequence>
> >>>             </cfg:macro>
> >>>    </cfg:command>
> >>>
> >>>It stops working after the first command.
> >>>I suppose it has something to do with my schema, as if I
> >>
> >>change it a bit, the command executes.
> >>
> >>>my schema looks like this
> >>><xs:element name="nummerierte_liste">
> >>>           <xs:complexType>
> >>>                   <xs:sequence>
> >>>                           <xs:element name="ueberschrift" 
> >>
> >>minOccurs="0"/>
> >>
> >>>                           <xs:sequence maxOccurs="unbounded">
> >>>                                   <xs:element name="listnum"/>
> >>>                                   <xs:element ref="punkt"/>
> >>>                           </xs:sequence>
> >>>                   </xs:sequence>
> >>>           </xs:complexType>
> >>>   </xs:element>
> >>>
> >>>I think the problem is, that I can't even insert a new
> >>
> >>listnum and punkt, by pressing the "InsertAfter" button. 
> >>While the punkt node() is selected I cannot even select the 
> >>InsertAfter button as it is greyed out,.
> >>
> >>No. "Insert After" simply cannot be used to insert *two* 
> elements at 
> >>the same time (listnum and punkt).
> >>
> >>But the above macro-command based on "Paste After" can 
> paste these two 
> >>elements at the same time.
> >>
> >>Now, your macro-command cannot work because:
> >>
> >>[1] The parameter of the command is not well-formed XML 
> (you forgot a 
> >>"&lt;" before first "listnum").
> >>
> >>[2] I forgot to wrap the two elements in a 
> >>{http://www.xmlmind.com/xmleditor/namespace/clipboard}clipboar
> >>d envelope.
> >>
> >>Try this version:
> >>---
> >><cfg:command name="insertNumListenPunkt">
> >>   <cfg:macro>
> >>     <cfg:sequence>
> >>       <cfg:command name="selectNode"
> >>                    parameter="ancestor[implicitElement] punkt"/>
> >>                    
> >>       <cfg:command name="paste" parameter="after &lt;?xml 
> >>version='1.0'?&gt; &lt;ns:clipboard 
> >>xmlns:ns='http://www.xmlmind.com/xmleditor/namespace/clipboard'&gt;
> >>&lt;listnum&gt;
> >>&lt;/listnum&gt;
> >>&lt;punkt&gt;
> >>&lt;absatz&gt;
> >>&lt;/absatz&gt;
> >>&lt;/punkt&gt;
> >>&lt;/ns:clipboard&gt;"/>
> >>     </cfg:sequence>
> >>   </cfg:macro>
> >></cfg:command>
> >>---
> >>
> >>Note that if listnum and punkt have a namespace, a proper xmlns 
> >>attribute must be added to the parameter of the "Paste 
> After" command.
> >>
> >> 
> >>--
> >>XMLmind XML Editor Support List
> >>xmleditor-support at xmlmind.com
> >>http://www.xmlmind.com/mailman/listinfo/xmleditor-support
> >>
> > 
> >  
> > --
> > XMLmind XML Editor Support List
> > xmleditor-support at xmlmind.com
> > http://www.xmlmind.com/mailman/listinfo/xmleditor-support
> > 
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: normen.zip
Type: application/x-zip-compressed
Size: 55063 bytes
Desc: normen.zip
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050519/4930ee98/attachment.bin
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: anmeldeg_irak.xml
Type: text/xml
Size: 2023 bytes
Desc: anmeldeg_irak.xml
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050519/4930ee98/attachment.xml
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: norm.xsd
Type: application/octet-stream
Size: 93676 bytes
Desc: norm.xsd
Url : 
http://www.xmlmind.com/pipermail/xmleditor-support/attachments/20050519/4930ee98/attachment.dll
 

Reply via email to