Bug #2386
closed
Validation errors missing column number
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Description
In some cases (unspecified) validation of a source document against a schema produces validation error messages with a line number but no column number identifying the location of the error.
In some cases (unspecified) the following change to ExpressionLocation.getSourceLocator() fixes the problem:
public static SourceLocator getSourceLocator(int locationId, LocationProvider locationProvider) {
if (locationProvider instanceof SourceLocator) {
// this is typically true when validating input documents
return (SourceLocator) locationProvider;
} else if (locationId == -1) {
return null;
} else {
ExpressionLocation loc = new ExpressionLocation();
loc.setLineNumber(locationProvider.getLineNumber(locationId));
// following line added...
loc.setColumnNumber(locationProvider.getColumnNumber(locationId));
loc.setSystemId(locationProvider.getSystemId(locationId));
return loc;
}
}
The change has been applied to 9.7 but needs more testing before applying it to 9.6.
- Status changed from New to Resolved
- Found in version set to 9.6
The above change adds column numbers to the error messages for a straightforward command-line validation run, so I have committed it on the 9.6 branch.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 9.6.0.6
Bug fix applied in the Saxon 9.6.0.6 maintenance release.
- Status changed from Closed to In Progress
- Fixed in version deleted (
9.6.0.6)
I am reopening this bug issue as the problem still exists on .NET.
- Status changed from In Progress to Closed
- Fixed in version set to 9.6.0.6
False alarm. Confirmed bug fixed in the maintenance release for .NET
- Sprint/Milestone set to 9.6.0.6
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.6 added
Please register to edit this issue
Also available in: Atom
PDF