Bug #5949
closed![Author: Norm Tovey-Walsh](https://www.gravatar.com/avatar/3de1450075377c998ad80d1ede6e0712?rating=PG&size=50&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
![Assignee: Michael Kay](https://www.gravatar.com/avatar/db6526d63053f09b62e52c2da8b2230a?rating=PG&size=22&default=https%3A%2F%2Fassets.plan.io%2Fimages%2Fdefault_avatar.png)
A resource loaded via the resolver vs one loaded "directly" is a different source with different options
100%
Description
The resolveWithFileURI()
and resolveWithHttpURI()
tests in src/tests/java/resolvers/CatalogResolverTest
demonstrate this bug.
The test enables DTD validation for the input source. The stylesheet also loads an ancillary document with the doc()
function.
When doc()
loads a file off disk (another XSL stylesheet, in this case), the DirectResourceResolver
loads it and returns an AugmentedSource
. When that source configures a parser, it does so with options that have been passed through options.merge()
that also specify a bunch of settings, including DTD validation (off).
When doc()
loads (the same file) but with a resource returned by the resolver, the catalog resolver returns a TypedStreamSource
. When that source configures a parser, it doesn't use merging and seems to inherit a bunch of options from the builder. Including DTD validation which causes doc()
to fail because there's no doctype declaration in the XSL file.
Please register to edit this issue