Project

Profile

Help

Bug #5167

Saxon/.NET 10: DocumentBuilder.DtdValidation option has no effect if JAXP parser is used

Added by Michael Kay 11 days ago. Updated 11 days ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
-
Sprint/Milestone:
-
Start date:
2021-11-17
Due date:
% Done:

0%

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

Description

Using the Saxon.Api.DocumentBuilder, the option DocumentBuilder.DtdValidation has no effect if JAXP parser is used - the document is parsed without validation.

History

#1 Updated by Michael Kay 11 days ago

The problem is actually in the Java code of ParseOptions.merge(). This code attempts to combine two sets of parser options (for example those set in the configuration file and those set on the document builder) by taking non-default values in preference to default values. However, for the ParserFeatures field, we're simply taking the union of the two sets of ParserFeatures, which in this case includes both http://xml.org/sax/features/validation=false and http://xml.org/sax/features/validation=true so the result is arbitrary.

Please register to edit this issue

Also available in: Atom PDF