Hello,

the problem is also related to version 4, so i think the code is at least
similiar.

As i mentioned earlier the problem is not there for insertion the element
directly.
In this case the required code for using wildcards in content model is
available.

Excerpt of CommandUtil.findField
-----------------------------
            if (name != null) {
                if (name == searchedName) {
                    found = field;
                    break;
                }
            } else {
                hasWildcards = true;
            }
        }

        if (found == null && hasWildcards) {
            for (int i = 0; i < count; ++i) {
                Field field = (Field) fieldList.get(i);

                NameClass nameClass = field.getFieldNameClass();
                if (nameClass != null &&
                    nameClass.containsName(searchedName)) {
                    found = field;
                    break;
                }
            }
        }
--------------------------------

You just have to add a similiar code to FieldChoice.findField(Field[] fields,
                                        ElementTemplate template,
                                        Element parent,
                                        ElementTemplates templateSet)

That's not really difficult, isn't it?

BTW every bug is a limitation




|------------>
| 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 16:04                                                             
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Betreff:   |
|------------>
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [XXE] Antwort: Re:  elementTemplate Bug                                  
                                                                               |
  
>------------------------------------------------------------------------------------------------------------------------------------------------------------|





Ulrich_Laegeler at arburg.com wrote:
>
> i debugged it on version 3 of xmlmind because there i have the source code.
>

* The source code of v4 is substantially different from the source code
of v3.

* In all cases, version 3 is no longer supported by us. (In fact, even a
v4 older than the 2-3 latest versions are not.) Therefore, it is not
useful to refer to this version.




> 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.
>

I'm not sure to understand. If the problem is related to the use of a
wildcard in the content model, then please consider this as a limitation
and not as a bug. We currently do not plan to remove such limitation.

Sorry for the annoyance.







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