Kevin Flynn wrote: > > I'm really pleased with the release version of XXE 2 - the inclusion of > support for external entities is a BIG improvement for me, and combined with > the <dtd> element in the config file for assigning DTDs to untyped > documents, it makes XXE really useful for editing modular documents. > > However, I think I've located a bug in this functionality. I took the > "example1" you describe in the Power User's Guide, and modified the .XXE > file slightly, so that it detects the root element <doc> and automatically > applies the correct DTD and CSS file: > > <?xml version='1.0' encoding='ISO-8859-1'?> > <configuration name="Example1" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" > xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration"> > > <detect> > <rootElementLocalName>doc</rootElementLocalName> > </detect> > <dtd publicId="-//XMLmind//DTD Example1//EN" systemId="example1.dtd" /> > <css name="Style sheet" location="example1.css" /> > <template name="Template" location="example1.xml" /> > > </configuration> > > This works perfectly. If, however, I try to narrow the selection process a > bit, and add a second detection condition: > > <?xml version='1.0' encoding='ISO-8859-1'?> > <configuration name="Example1" > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > xmlns="http://www.xmlmind.com/xmleditor/schema/configuration" > xmlns:cfg="http://www.xmlmind.com/xmleditor/schema/configuration"> > > <detect> > <and> > <rootElementLocalName>doc</rootElementLocalName> > <fileNameExtension>xml</fileNameExtension> > </and> > </detect> > <dtd publicId="-//XMLmind//DTD Example1//EN" systemId="example1.dtd" /> > <css name="Style sheet" location="example1.css" /> > <template name="Template" location="example1.xml" /> > > </configuration> > > Then the CSS file is still applied, but the DTD isn't. > > Hope you can explain this.
It is a bug, very well described in your email. Thanks. It is fixed now but the fix will show up in V2.0 Patch 1 released at the end of this month. For now, please do not use <fileNameExtension> to autodetect the type of a document. PS: We will also add an Example3 to the Power User's Guide describing an autodetected document type.

