Project

Profile

Help

Bug #2551

closed

Reused source parser may be configured incorrectly

Added by Michael Kay almost 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Internals
Sprint/Milestone:
-
Start date:
2015-12-17
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.7
Fix Committed on Branch:
9.7
Fixed in Maintenance Release:
Platforms:

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

Related to Saxon - Bug #2540: Unwanted warning with JAXBSourceClosedO'Neil Delpratt2015-12-15

Actions
Actions #1

Updated by Michael Kay almost 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.

Actions #2

Updated by Michael Kay almost 9 years ago

  • Related to Bug #2540: Unwanted warning with JAXBSource added
Actions #3

Updated by Michael Kay almost 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.

Actions #4

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

Actions #5

Updated by O'Neil Delpratt almost 9 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF