2010/6/15 Hussein Shafie <[email protected]>

> Benoit Maisonny wrote:
> >
> > I have 2 XXE configurations (say, A and B), with different "detect"
> > elements, using the same standard XInclude inclusionScheme. I load 2
> > documents in XXE, say a.xml which is detected by config A and b.xml
> > detected by B. Both documents contain the same xi:include element with
> > the same attributes. XXE displays a.xml with xincluded data, but it
> > displays b.xml with the xi:include element unincluded. I can select the
> > xi:include element in b.xml and do Edit, Reference, Retransclude to see
> > the xincluded data. Saving b.xml then doesn't make any difference: next
> > time I re-open b.xml, xinclude's are unincluded again.
> >
> > What can I have done wrong in configuration B, so that xinclusions are
> > not active immediately on document load?
> >
> > Both configs use:
> >
> >     * <cfg:inclusionScheme name="XInclude">
> >           <cfg:class>com.xmlmind.xml.xinclude.XIncludeScheme</cfg:class>
> >         </cfg:inclusionScheme>
> >     * and the same CSS to style the xi:include element and also its
> >       parent element
> >
> > They notably differ in that config A and a.xml have a DTD defined while
> > config B and b.xml don't have any schema defined.
> >
>
> It seems that it's an obscure limitation in our document loader.
>
> The only workaround is to declare a DTD/W3C XML Schema/RELAX NG in
> configuration B.
>
> This schema may be very crude (e.g. full of wildcards). However, this
> schema will actually be used to find the IDs of B elements. Therefore
> the definitions of what is an ID must be correct.
>
>
Thank you, it worked!

I didn't expect it at first, because I'm not using the simple element()
scheme for xinclude's, but the xpointer() scheme with long xpath expressions
that don't rely on the ID. But anyway, simply adding cfg:schema and its
location did the trick.
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to