Mark Fletcher wrote:
> Hmm. Well, something's not working as expected. The public ID in the
> file referenced by document() is valid and is recognized by XXE. (I can
> open the file in XXE without a problem.) But, as I said, the XSLT
> process can't resolve the public ID.
> 
> Can I send you some sample files to try and reproduce?
> 

Yes, please, if you have something not too complicated.

I think I understand what happens.

When an XSLT processor processes document("http://www.acme.com/foo.xml";),
it will use this kind of XML catalog entry:
---
  <uri name="http://www.acme.com/foo.xml";
       uri="resources/foo.xml"/>
---

But if foo.xml starts with:
---
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN"
"http://docs.oasis-open.org/dita/v1.0.1/dtd/topic.dtd";>
---
XML catalog entries based on public IDs like this one:
---
  <public publicId="-//OASIS//DTD DITA Topic//EN"
          uri="dtd/topic.dtd"/>
---
are *not* used.

For now, the above XML catalog entries are only used to resolve the
system ID of the <!DOCTYPE> found in the *source* XML file to be
transformed.

This is a bug of course. We'll try to fix it in next release.


---
PS: There is no such bug when the document() function is used in an
XPath expression evaluated by XXE itself (i.e. outside an XSLT
transform. Inside a CSS or inside a macro-command).







Reply via email to