xpointer specification came never to a clear final status. XXE itself uses an enhanced xp parser to handle xpointer and the only other tool I know of that is able to handle xpointer to this extend is xmllint/xsltproc.

So I let xsltproc/xmllint do the job of preprocessing the main file for resolving the xincludes.

xmllint.exe --version --timing --postvalid --recover --xinclude -o main-doc_resolved.xml main-doc.xml 2> error_val.log

Postvalidation is important (it switches to validate the document only after resolving is done)!

If further more you make use of profiling, you should switch to a 2-stage preprocessing scenario, because a pre-profiled document is likely not to validate:

  1. resolve xincludes and profile (profiling with xsltproc is very fast)
  2. validate the resolved and profiled document

1: xsltproc.exe --version --timing --novalid --xinclude --output main-doc_profiled_resolved.xml profile.xsl main-doc.xml 2> error_prof.log 2: xmllint.exe --version --timing --recover --noout main-doc_profiled_resolved.xml 2> error_val.log

I guess many of us are looking forward to XProc, which targets exactly these issues.

Hope you understand my approach,
Georges

mjatromp wrote:
Hi,

I am trying to get a publish flow going using xalan and fop. When
encountering partial includes generated by XXE, xerces fails to resolve an
xpointer like:

    <para><xi:include href="variables.xml"
    xpointer="element(docid)" /></para>

This seems to be a limitation in xerces. How is this resolved in a way that
is platform independent? xmllint will work, but is a pain to get running on
windows.

Marcel
--


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to