Project

Profile

Help

Validating scmschema.scm with itself

Added by T Hata almost 7 years ago

I'm experimenting in the SCM feature and tried this, expecting no error:

C:\test>java -cp saxon9ee.jar com.saxonica.Validate -s:https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm -t -xsd:https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm
But got some validation errors and an exception:
Saxon-EE 9.8.0.8J from Saxonica
Java version 1.6.0_45
Using license serial number V......
URIResolver.resolve href="https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm" base="null"
Loading schema document https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm
Loaded compiled schema document https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm
Schema checking successful. Time: 4506ms. Memory: 16Mb.
URIResolver.resolve href="https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm" base="null"
Processing https://dev.saxonica.com/repos/archive/opensource/latest9.8/samples/scm/scmschema.scm
Using parser com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser
Validation error on line 41 column 51 of scmschema.scm:
  FORG0001: Required attribute @inheritable is missing on element 
  See http://www.w3.org/TR/xmlschema-1/#cvc-complex-type clause 4
...
java.lang.ClassCastException: net.sf.saxon.value.BooleanValue cannot be cast to net.sf.saxon.om.NodeInfo
        at com.saxonica.ee.schema.Assertion.testComplex(Assertion.java:239)
        at com.saxonica.ee.validate.ValidationStack.testAssertions(ValidationStack.java:491)
        at com.saxonica.ee.validate.ValidationStack.endElement(ValidationStack.java:430)
        at net.sf.saxon.event.ProxyReceiver.endElement(ProxyReceiver.java:182)
        at net.sf.saxon.event.StartTagBuffer.endElement(StartTagBuffer.java:290)
        at com.saxonica.ee.validate.StartTagBufferEE.endElement(StartTagBufferEE.java:58)
        at net.sf.saxon.event.PathMaintainer.endElement(PathMaintainer.java:62)
        at net.sf.saxon.event.DocumentValidator.endElement(DocumentValidator.java:68)
        at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:459)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:427)
        at net.sf.saxon.event.Sender.send(Sender.java:138)
        at com.saxonica.ee.s9api.SchemaValidatorImpl.validate(SchemaValidatorImpl.java:587)
        at com.saxonica.Validate.processFile(Validate.java:610)
        at com.saxonica.Validate.doValidate(Validate.java:416)
        at com.saxonica.Validate.main(Validate.java:59)
Fatal error during validation: net.sf.saxon.value.BooleanValue cannot be cast to net.sf.saxon.om.NodeInfo

Is the sample stale? Or it just wouldn't work in this way?


Replies (1)

RE: Validating scmschema.scm with itself - Added by Michael Kay almost 7 years ago

I think I found recently that there might be a problem with version control on this, i.e. we've made changes and things aren't up to date. I'll check.

    (1-1/1)

    Please register to reply