Bug #2551
closedReused source parser may be configured incorrectly
100%
Description
There is a problem which manifests itself particularly on .NET, but I think that under contrived circumstances it can also arise on the Java platform.
When the Sender calls the Configuration to get a SourceParser, the DTD validation feature on that parser will be enabled if DTD validation is requested at the Configuration level, whether or not it is requested in the particular call to the Sender. Moreover, if the source parser is reused, it appears that the option is not reset.
On .NET it seems that the SourceParser is being used for parsing stylesheets as well as source documents. I'm not sure why, or whether it matters, but the effect in one test case (XsltUsingIdFunction in ExamplesHE in the samples folder) is that the system attempts to parse the stylesheet with DTD validation enabled, and this fails.
Related issues
Updated by Michael Kay about 9 years ago
On reflection I think this may be (at least in part) a side-effect of the change made for bug #2540. That fix had the effect that when DTD validation is NOT requested, we avoid setting the validation property to false, in case the parser does not support this property. But if we are reusing the parser and the property was previously set to true, then resetting it to false is essential.
Updated by Michael Kay about 9 years ago
- Related to Bug #2540: Unwanted warning with JAXBSource added
Updated by Michael Kay about 9 years ago
- Status changed from New to Resolved
- Fix Committed on Branch 9.7 added
Now fixed, by changing the fix for bug #2540.
Updated by O'Neil Delpratt almost 9 years ago
- % Done changed from 0 to 100
- Fixed in Maintenance Release 9.7.0.2 added
Bug fix applied in the Saxon 9.7.0.2 maintenance release
Updated by O'Neil Delpratt almost 9 years ago
- Status changed from Resolved to Closed
Please register to edit this issue