Project

Profile

Help

Bug #2529

closed

Validation report missing meta-data fragment missing name of XML file

Added by O'Neil Delpratt over 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Category:
Schema-Aware processing
Sprint/Milestone:
-
Start date:
2015-12-04
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

Reported by user Yitzhak Khabinsky:

meta-data fragment is missing one particular element to specify name of the XML file that was validated.
This is very important, otherwise it is unknown what XML file was validated against the XSD file.

Files

report.xml (2.92 KB) report.xml Yitzhak Khabinsky, 2016-01-19 21:23
report.xml (2.92 KB) report.xml Yitzhak Khabinsky, 2016-01-19 21:57
Actions #1

Updated by O'Neil Delpratt over 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

The name of XML file that is being validated should appear on the element 'validation-report'. This information was not being passed through in the ValidationContext class. I have changed the signature of the method 'startValidation' to pass as an argument the systemId of the source.

This change means we need to regenerate the Javadoc.

Actions #2

Updated by O'Neil Delpratt over 8 years ago

  • Applies to branch 9.7 added
  • Fix Committed on Branch 9.7 added
Actions #3

Updated by O'Neil Delpratt over 8 years ago

  • Fixed in Maintenance Release 9.7.0.2 added

Bug fix applied in the Saxon 9.7.0.2 maintenance release

Actions #4

Updated by Yitzhak Khabinsky over 8 years ago

Issues with the 9.7.0.2 version:

  1. XML file name should be inside in the meta-data fragment

XML and XSD file names should be next to each other.

  1. file:/ prefix is not needed.

  2. Fully qualified path separator, i.e. slash, should be back slash like for the XSD file and compliant with Windows OS.

Actions #5

Updated by Michael Kay over 8 years ago

  • Status changed from Resolved to In Progress

I agree there's room for further improvements in the design of the report.

I think we should be using URIs throughout, not Windows filenames. URIs are much more the XML way of doing things, and it's better for the report to be platform-independent.

I think the reason the schema and source URIs are in different places is because the report can potentially cover multiple source documents validated against a single schema.

The use of namespaces in the report seems to be confused: I think all elements should be in the http://saxon.sf.net/ns/validation namespace.

Actions #6

Updated by Yitzhak Khabinsky over 8 years ago

IMHO,

  1. URIs is a good suggestion. Both XML and XSD files should use them.

  2. XML and XSD should be next to each other. I look at the report file mentally as follows: " XML file(s) was/were validated against XSD schema such and such, and here are the errors. Also, when there are many errors, XML and XSD separated by a long list of errors, a report file needs extensive scrolling to see them together.

Actions #7

Updated by Yitzhak Khabinsky over 8 years ago

Also, I agree that the namespaces in the report are very confusing. I am referring to the error's element path attribute.

Actions #8

Updated by O'Neil Delpratt about 8 years ago

  • Status changed from In Progress to Resolved

Bug fixed and committed to subversion. We now convert the systemId to URIs. In terms of adding the file name to the meta-data I am sticking to comment #1 where we can access the systemId variable in the user written validation listeners.

Actions #9

Updated by O'Neil Delpratt about 8 years ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 9.7.0.3 added
  • Fixed in Maintenance Release deleted (9.7.0.2)

Bug fix applied in the Saxon 9.7.0.3 maintenance release

Please register to edit this issue

Also available in: Atom PDF