Bug #5949
closedA 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