Hello Hussein,

i debugged it on version 3 of xmlmind because there i have the source code.

When i insert the new element directly via {namespace}name
the correctness is checked in CommandUtil.findField.
In this Method there are also Wildcard elements like any respected.

But if i use templates the correctness is checked in FieldChoice.findField
and there are no Wildcard elements respected.
So in this Method the wildcard code from CommandUtil.findField
should be inserted.

Best regards, Uli





|------------>
| 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:     |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |21.01.2010 13:28                                                             
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Betreff:   |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [XXE] elementTemplate Bug                                                
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|





Ulrich_Laegeler at arburg.com wrote:
> Hello,
>
> i have a schema whith an any element
>
> <xs:element name="Content">
>     <xs:complexType>
>         <xs:sequence>
>             <xs:any namespace="##other" maxOccurs="unbounded"/>
>         </xs:sequence>
>     </xs:complexType>
> </xs:element>
>
> If i now insert other elements via the xmlmind command
>
> <command name="insert" parameter="into {http://www.arburg.com/other}Test"/>
>
> it works fine.
>
> But if i insert the same via a templete it doesn't work
>
> <command name="insert" parameter="into #template
> ({http://www.arburg.com/other}Test,Test)"/>
>
> <cfg:elementTemplate xmlns="http://www.arburg.com/other"; name="Test"
> selectable="override">
>     <Test/>
> </cfg:elementTemplate>
>
> Any idea's?
>

Not sure. However I doubt that we have a bug related to element
templates because this feature is extensively used in all the stock
configurations.

--> With selectable="override", #template(XXX,YYY) is *not* needed (and
may be it is harmful):

<command name="insert"
parameter="into {http://www.arburg.com/other}Test"/>

will insert your element template.

--> Without selectable="override", #template(XXX,YYY) is indeed needed
and what follows should work fine.

<command name="insert"
parameter="into #template({http://www.arburg.com/other}Test,Test)"/>







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