Bug #2529
closedValidation report missing meta-data fragment missing name of XML file
100%
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
Updated by O'Neil Delpratt almost 9 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.
Updated by O'Neil Delpratt almost 9 years ago
- Applies to branch 9.7 added
- Fix Committed on Branch 9.7 added
Updated by O'Neil Delpratt almost 9 years ago
- Fixed in Maintenance Release 9.7.0.2 added
Bug fix applied in the Saxon 9.7.0.2 maintenance release
Updated by Yitzhak Khabinsky almost 9 years ago
- File report.xml report.xml added
Issues with the 9.7.0.2 version:
- XML file name should be inside in the meta-data fragment
XML and XSD file names should be next to each other.
-
file:/ prefix is not needed.
-
Fully qualified path separator, i.e. slash, should be back slash like for the XSD file and compliant with Windows OS.
Updated by Michael Kay almost 9 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.
Updated by Yitzhak Khabinsky almost 9 years ago
IMHO,
-
URIs is a good suggestion. Both XML and XSD files should use them.
-
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.
Updated by Yitzhak Khabinsky almost 9 years ago
- File report.xml report.xml added
Also, I agree that the namespaces in the report are very confusing. I am referring to the error's element path attribute.
Updated by O'Neil Delpratt almost 9 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.
Updated by O'Neil Delpratt almost 9 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