Because of issues with schema validation (can't properly use doc() in the validate function - see https://github.com/BaseXdb/basex/issues/1324), I'm not using BaseX to do schema validation in my workflow.

But I needed it today to make some result comparisons with my own implementation of XML Validator, and I noticed that using the beta Xerces version which is documented in the wiki <http://docs.basex.org/wiki/Validation_Module#XML_Schema_Validation> can make it crash, so I thought I should report it here.

Other than that, I noticed one some XML files that it only reports fatal errors, and hides any other non-fatal error. I think it has something to do with the process <https://github.com/BaseXdb/basex/blob/86a12cf0c75010b3058c18f81c4689bc511b7c2d/basex-core/src/main/java/org/basex/query/func/validate/ValidateFn.java> method but I'm not sure.

Error:
Improper use? Potential bug? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 8.6 beta baadd29
Java: Oracle Corporation, 1.8.0_112
OS: Linux, amd64
Stack Trace: 
java.lang.ArrayIndexOutOfBoundsException: 27
        at org.apache.xerces.impl.xs.XSConstraints.overlapUPA(Unknown Source)
        at org.apache.xerces.impl.xs.XSConstraints.overlapUPA(Unknown Source)
        at 
org.apache.xerces.impl.xs.models.XSDFACM.checkUniqueParticleAttribution(Unknown 
Source)
        at org.apache.xerces.impl.xs.XSConstraints.fullSchemaChecking(Unknown 
Source)
        at 
org.apache.xerces.impl.xs.XMLSchemaValidator.handleEndElement(Unknown Source)
        at org.apache.xerces.impl.xs.XMLSchemaValidator.endElement(Unknown 
Source)
        at 
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
 Source)
        at 
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at 
org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
        at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown 
Source)
        at javax.xml.validation.Validator.validate(Validator.java:124)
        at 
org.basex.query.func.validate.ValidateXsd$1.process(ValidateXsd.java:97)
        at org.basex.query.func.validate.ValidateFn.process(ValidateFn.java:120)
        at org.basex.query.func.validate.ValidateXsd.errors(ValidateXsd.java:55)
        at org.basex.query.func.validate.ValidateFn.report(ValidateFn.java:88)
        at 
org.basex.query.func.validate.ValidateXsdReport.value(ValidateXsdReport.java:15)
        at org.basex.query.func.validate.ValidateFn.iter(ValidateFn.java:53)
        at org.basex.query.scope.MainModule.iter(MainModule.java:118)
        at org.basex.query.QueryContext.iter(QueryContext.java:331)
        at org.basex.query.QueryContext.cache(QueryContext.java:622)
        at org.basex.query.QueryProcessor.cache(QueryProcessor.java:116)
        at org.basex.core.cmd.AQuery.query(AQuery.java:87)
        at org.basex.core.cmd.XQuery.run(XQuery.java:22)
        at org.basex.core.Command.run(Command.java:255)
        at org.basex.core.Command.execute(Command.java:93)
        at org.basex.gui.GUI.exec(GUI.java:479)
        at org.basex.gui.GUI.access$3(GUI.java:433)
        at org.basex.gui.GUI$7.run(GUI.java:421)
Query:
validate:xsd-report(root())
Query plan:
<QueryPlan compiled="true">
  <ValidateXsdReport name="xsd-report(input[,schema[,version]])">
    <FnRoot name="root([node])"/>
  </ValidateXsdReport>
</QueryPlan>

Reply via email to