Project

Profile

Help

Bug #6086

open

Is the schema validation-reports.xsd up to date?

Added by Martin Honnen 5 months ago. Updated about 19 hours ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
-
Start date:
2023-06-20
Due date:
% Done:

100%

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

Description

The documentation at https://www.saxonica.com/html/documentation12/schema-processing/commandline.html says:

-report:filename

This option switches on the capture of validation reporting. Here filename specifies where the validation report should be written to on disk. The validation report is in XML format. The format of the validation report is defined in a schema which is available in the saxon-resources download file (see validation-reports.xsd).

However, the schema I find in the Saxon 12 resources download has <xs:attribute name="path" use="optional" type="xs:anyURI"> and the XPath Saxon outputs is neither by Xerces nor by Saxon itself considered as a valid xs:anyURI value.

Furthermore, there is an annotation

     <xs:attribute name="column" use="optional" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Defines the column number where the error occurs. 
            This attribute and the path attribute are mutually exclusive.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="path" use="optional" type="xs:anyURI">
        <xs:annotation>
          <xs:documentation>Defines the path where the error occurs if the column number is unavailable.
            This attribute and the path attribute are mutually exclusive.</xs:documentation>
        </xs:annotation>
      </xs:attribute>

but I see column and path in validation reports.

Actions #1

Updated by Michael Kay 5 months ago

Indeed you are right, the schema is not up to date.

Most notably, the <error> element may now contain, as well as the error message text, a sequence of <contributing-node> elements giving details of nodes contributing to the error, used in particular for xs:assert failures.

Actions #2

Updated by Michael Kay 5 months ago

  • Tracker changed from Support to Bug
  • Category changed from Command Line to Diagnostics
  • Status changed from New to Resolved
  • Assignee set to Michael Kay
  • Applies to branch 11, 12, trunk added
  • Fix Committed on Branch 11, 12, trunk added
Actions #3

Updated by O'Neil Delpratt 5 months ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in Maintenance Release 12.3 added

Bug fix applied in the Saxon 12.3 maintenance release.

Actions #4

Updated by O'Neil Delpratt 5 months ago

  • Status changed from Closed to Resolved

Leaving this bug issue as resolved until resolved against Saxon 11.

Actions #5

Updated by Debbie Lockett 3 months ago

  • Status changed from Resolved to Closed
  • Fixed in Maintenance Release 11.6 added

Bug fix applied in the Saxon 11.6 maintenance release.

Actions #6

Updated by Debbie Lockett about 19 hours ago

  • Status changed from Closed to In Progress

I'm reopening this bug, as it appears that there is more to do. Validation reports from successful validations are not valid against the schema validation-reports.xsd.

e.g. the validation report produced when validating books.xml against books.xsd (in the samples in the saxon-resources download) looks like:

<validation-report xmlns="http://saxon.sf.net/ns/validation"
                   system-id="file:/Users/BLAH/data/books.xml">
   <meta-data>
      <validator name="SAXON-EE" version="12.4"/>
      <results errors="0" warnings="0"/>
      <schema file="data/books.xsd" xsd-version="1.1"/>
      <run at="2023-11-30T17:50:35.465518Z"/>
   </meta-data>
</validation-report>

but validating that against validation-reports.xsd results in:

Validation error on line 4 column 15 of report_Validate_1.xml:
  FORG0001: In content of element <validation-report>: The content model does not allow
  element <meta-data> to appear as the first child. It must be preceded by <Q{.../validation}error>. 
  See https://www.w3.org/TR/xmlschema11-1/#cvc-complex-type clause 2.4
Validation complete: errors found

Discovered because I am (belatedly) adding tests of validation-reports.xsd in run-samples.gradle.

Please register to edit this issue

Also available in: Atom PDF