On 07/05/2012 06:15 PM, Philippe Nobili wrote: > > [NB: We might have already asked this, but we cannot retrieve what your > answer was at that time...] > > Here is our problem: > > We have written a simple XXE add-on to edit some of our XML processing > files. These files can be validated against an XML schema -- which we > have also declared in this add-on --. > > Unfortunately, for historical reasons, many of our XML instances do not > refer to this schema, they are just plain XML files without any > namespace mentioned. > > Our add-on takes the necessary action to let XXE recognize these files > and use the add-on (using a proper<detect> statement), but > unfortunately there is no way to use the nice schema-driven features of > XXE in this case. > > Is there any workaround for this situation ? (adding the namespace in > these files being -- we are afraid -- not an option). By workaround we > mean a declaration that could associate the files matching the<detect> > statement and the XML schema itself... > > We hope that is clear,
[I'm not sure to have fully understood your problem.] [1] Create another configuration file, just for the legacy XML files having no namespace. Let's call this configuration file legacy.xxe. [2] Detect these legacy XML files using the proper <detect> configuration element (may be base on the local name of the root element and on the fact that this root element has no namespace). [3] Create another XML schema (based your real XML schema), this time having no target namespace. Let's call this schema legacy.xsd. [4] Declare this schema in legacy.xxe as follows: <schema> <noNamespaceLocation>legacy.xsd</noNamespaceLocation> </schema> References: * http://www.xmlmind.com/xmleditor/_distrib/doc/configure/detect.html * http://www.xmlmind.com/xmleditor/_distrib/doc/configure/schema.html -- XMLmind XML Editor Support List [email protected] http://www.xmlmind.com/mailman/listinfo/xmleditor-support

