Hello,

 

I am successfully using BaseX Validation Module.

Along the following lines:

let $xml := 'd:\Temp\CDW\HOME\id4879_BO201801_HomeSubscriberMovementFact.xml'

let $xsd := 'd:\Temp\CDW\HOME\HomeSubscriberMovementFact.xsd'

return validate:xsd-report($xml, $xsd, '1.1')

 

My XML files have multi-megabyte size and lots of validation errors. In tens or hundreds of thousands of errors.

Behind the scenes, Saxon validator 9.8.0.11 is running.

 

Unfortunately, the output structure contains a repeating url attribute.

The BaseX output pane cannot present all the errors.

It says: “(Chopped) Results”.

 

<report>
    <status>invalid</status>
    <message level="Error" line="10" column="26" url="file:///D:/Temp/CDW/HOME/id4879_BO201801_HomeSubscriberMovementFact.xml">The content "N/A" of element &lt;CommercialServiceCode&gt; does not match the required simple type. Value "N/A" contravenes the enumeration facet "R60080-X00162, R60080-X00163, ..." of the type Q{http://www.millicom.com}CommercialServiceCodeType</message>
    <message level="Error" line="19" column="23" url="file:///D:/Temp/CDW/HOME/id4879_BO201801_HomeSubscriberMovementFact.xml">The content "TBD" of element &lt;MovementTechnology&gt; does not match the required simple type. Value "TBD" contravenes the enumeration facet "N/A, HFC, GPON, MMDS, FIBER, C..." of the type Q{http://www.millicom.com}MovementTechnologyType</message>
    <message level="Error" line="24" column="18" url="file:///D:/Temp/CDW/HOME/id4879_BO201801_HomeSubscriberMovementFact.xml">The content "-1.0000" of element &lt;DownloadSpeed&gt; does not match the required simple type. Value "-1" contravenes the minExclusive facet "0" of the type Q{http://www.millicom.com}DownloadSpeedType</message>
    <message level="Error" line="26" column="6" url="file:///D:/Temp/CDW/HOME/id4879_BO201801_HomeSubscriberMovementFact.xml">The 7th field in constraint {PK} has no value</message>
    ...
</report>

 

My proposal is to eliminate the repeated url attribute from the each message and elevate it to its own element just once under the root report tag.

Along the following output structure:


<report>
    <status>invalid</status>
    <url>file:///D:/Temp/CDW/HOME/id4879_BO201801_HomeSubscriberMovementFact.xml</url>
    <message level="Error" line="10" column="26">The content "N/A" of element &lt;CommercialServiceCode&gt; does not match the required simple type. Value "N/A" contravenes the enumeration facet "R60080-X00162, R60080-X00163, ..." of the type Q{http://www.millicom.com}CommercialServiceCodeType</message>
    <message level="Error" line="19" column="23">The content "TBD" of element &lt;MovementTechnology&gt; does not match the required simple type. Value "TBD" contravenes the enumeration facet "N/A, HFC, GPON, MMDS, FIBER, C..." of the type Q{http://www.millicom.com}MovementTechnologyType</message>
    <message level="Error" line="24" column="18">The content "-1.0000" of element &lt;DownloadSpeed&gt; does not match the required simple type. Value "-1" contravenes the minExclusive facet "0" of the type Q{http://www.millicom.com}DownloadSpeedType</message>
    <message level="Error" line="26" column="6">The 7th field in constraint {PK} has no value</message>
    ...
</report>

 

This way the output of the validation is much more readable and hopefully will fit in its entirety to the output pane.

 

Regards,

Yitzhak Khabinsky

Technical Services Lead

Millicom International Services LLC

396 Alhambra Circle, Suite 1100

Coral Gables, FL  33134

Skype4B: +1 (305) 445-4172

Tel: (954) 684-8673

yitzhak.khabinsky@millicom.com

www.millicom.com