Project

Profile

Help

Bug #6202

closed

Invalid attribute names in configuration files are ignored

Added by Michael Kay over 1 year ago. Updated about 1 year ago.

Status:
Closed
Priority:
Low
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2023-09-19
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
12, trunk
Fix Committed on Branch:
12, trunk
Fixed in Maintenance Release:
Platforms:
.NET, Java

Description

Unless you validate your configuration file against the published schema (which most users are unlikely to do), incorrectly-spelled attribute names (in the global section and other similar sections) will go undetected.

The code iterates over the valid attribute names and for each one tests to see if the relevant attribute exists. This simply ignores any invalid attributes.

Unfortunately configuration files are allowed in Saxon-HE so we can't simply run the file through schema validation.

A solution would be for ConfigurationReader.applyProperty() to delete the attribute from the Properties object, and then at the end if the Properties object is non-empty, it indicates that unrecognised attributes were present in the file.

Please register to edit this issue

Also available in: Atom PDF