You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When called in an XSLT stylesheet, which is executed via XSLTServlet within the database, the doc() function fails with following error:
SAX exception while transforming node: Exception thrown by URIResolver
Yet, the URI does resolve, and the same XSLT stylesheet is working without errors when called with the transform:transform() function, and when executed via XSLTServlet on the file system.
Moreover, execution order seems to matter (see below).
What did you expect
In the sample app (see below), I'd expect the call to doc('http://localhost:8080/exist/apps/doc-test/test.xml') to be resolved properly, and to get following output from the simple XSLT stylesheet, irrespective of the execution context / order:
<xslt-output><h1>doc() has succeeded!</h1></xslt-output>
Describe how to reproduce or add a test
The zip file attached doc-test.zip contains a sample web application demonstrating the problem, which can be reproduced by following steps:
An error occurred: SAX exception while transforming node: Exception thrown by URIResolver
Additional remarks:
1. execution context matters
The error only occurs when the XSLT transformation is executed via XSLTServlet within the database.
If the same XSLT transformation is executed via the transform:transform() function in an XQuery script stored in the database, it succeeds without errors. See http://localhost:8080/exist/apps/doc-test/test-transform/ for an example.
If the same XSLT transformation is executed via XSLTServlet on the file system, it succeeds without errors. See http://localhost:8080/exist/doc-test/test-XSLTServlet/ for an example (this requires that the zip file is extracted in the ${exist.home}/webapps/ directory.
2. execution order matters
The error occurs when the XSLT transformation is executed via XSLTServlet within the database, but once the same transformation is executed via the transform:transform() function in an XQuery script stored in the database, subsequent executions via XSLTServlet succeed without errors. See following steps:
Since this error doesn't occur in eXist-3.0.RC1 (nor in eXist-3.0.RC2, although that version is giving me troubles with local paths to doc() that I couldn't reproduce, unfortunately), I suspect that it might be related to the issues that have been addressed recently in #1221.
I've finally had the chance to test, and can confirm this issue is fixed by @shabanovd's PR #1316. What are the prospects for merging it into trunk? Even if it won't make it into the next eXist release, being able to update my webapps to the latest eXist development code would be a great temporary solution in the mean time.
What is the problem
When called in an XSLT stylesheet, which is executed via XSLTServlet within the database, the
doc()
function fails with following error:Yet, the URI does resolve, and the same XSLT stylesheet is working without errors when called with the
transform:transform()
function, and when executed via XSLTServlet on the file system.Moreover, execution order seems to matter (see below).
What did you expect
In the sample app (see below), I'd expect the call to
doc('http://localhost:8080/exist/apps/doc-test/test.xml')
to be resolved properly, and to get following output from the simple XSLT stylesheet, irrespective of the execution context / order:Describe how to reproduce or add a test
The zip file attached doc-test.zip contains a sample web application demonstrating the problem, which can be reproduced by following steps:
doc-test-0.1.xar
file in the databaseThis will cause an HTTP ERROR 500, stating that
Additional remarks:
1. execution context matters
The error only occurs when the XSLT transformation is executed via XSLTServlet within the database.
transform:transform()
function in an XQuery script stored in the database, it succeeds without errors. See http://localhost:8080/exist/apps/doc-test/test-transform/ for an example.${exist.home}/webapps/
directory.2. execution order matters
The error occurs when the XSLT transformation is executed via XSLTServlet within the database, but once the same transformation is executed via the
transform:transform()
function in an XQuery script stored in the database, subsequent executions via XSLTServlet succeed without errors. See following steps:transform:transform()
: http://localhost:8080/exist/apps/doc-test/test-transform/ --> successSince this error doesn't occur in eXist-3.0.RC1 (nor in eXist-3.0.RC2, although that version is giving me troubles with local paths to
doc()
that I couldn't reproduce, unfortunately), I suspect that it might be related to the issues that have been addressed recently in #1221.Context information
The text was updated successfully, but these errors were encountered: