Opened 14 years ago
Closed 14 years ago
#442 closed enhancement (fixed)
Validation report / Improve XML validation service
Reported by: | fxp | Owned by: | fxp |
---|---|---|---|
Priority: | minor | Milestone: | v2.7.0 |
Component: | General | Version: | |
Keywords: | Cc: |
Description
Currently xml.metadata.validate return complex XML document not really usable for other applications (eg. JS widget). It requires to deal a lot with namespaces and complex Schematron Validation Report Language (SVRL) format.
<geonet:report xmlns:geonet="http://www.fao.org/geonetwork" geonet:id="43"> <geonet:xsderrors> <geonet:error> <geonet:typeOfError>ERROR</geonet:typeOfError> <geonet:errorNumber>1</geonet:errorNumber> <geonet:message>cvc-datatype-valid.1. ... <geonet:report geonet:rule="schematron-rules-inspire"> <svrl:schematron-output> <svrl:fired-rule context="//gmd:MD_DataIdentification| //*[@gco:isoType='gmd:MD_DataIdentification']| //srv:SV_ServiceIdentification| //*[@gco:isoType='srv:SV_ServiceIdentification']" /> <svrl:successful-report ref="#_55" test="not($noResourceAbstract)" location="/*:MD_Metadata[namespace-uri()='http://www.isotc211.org/2005/gmd'] [1]/*:identificationInfo[namespace-uri()='http://www.isotc211.org/2005/gmd'] [1]/*:MD_DataIdentification[namespace-uri()='http://www.isotc211.org/2005/gmd'][1]"> <svrl:text>
This patch produce a much more simple output with same informations. The format is :
<rules> <rule group="xsd" type="error" id=""> <title/> <details/> <msg/> </rule> <rule group="schematron-rules-XYZ" type="success|error" id="" ref="#_1"> <title/> <details/> <msg/> </rule>
xml.metadata.validate was added in r6971 (trunk only). Only the JS widget is using that service probably.
Attachments (1)
Change History (2)
by , 14 years ago
Attachment: | xml-validation-report.patch added |
---|
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
r7242