Hi all, I've been playing around with the latest XSD 1.1 branch and ran into the following. I'm attaching a schema and instance document as a reference.
The first error deals with an assertion going off somewhere out in the XPath 2 implementation. If I do: java -cp $CLASSPATH jaxp.SourceValidator -fx -xsd11 -a simple.xsd -i simple.xml things validate correctly. However if I enable assertion checks java -ea -cp $CLASSPATH jaxp.SourceValidator -fx -xsd11 -a simple.xsd -i simple.xml I get the following: Exception in thread "main" java.lang.AssertionError at org.eclipse.wst.xml.xpath2.processor.internal.types.QName.namespace(QName.java:236) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.name_test(DefaultEvaluator.java:1407) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1470) at org.eclipse.wst.xml.xpath2.processor.internal.ast.NameTest.accept(NameTest.java:39) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1298) at org.eclipse.wst.xml.xpath2.processor.internal.ast.ForwardStep.accept(ForwardStep.java:141) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:2099) at org.eclipse.wst.xml.xpath2.processor.internal.ast.AxisStep.accept(AxisStep.java:46) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1251) at org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathExpr.accept(XPathExpr.java:43) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_bin_args(DefaultEvaluator.java:802) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:613) at org.eclipse.wst.xml.xpath2.processor.internal.ast.CmpExpr.accept(CmpExpr.java:106) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1600) at org.eclipse.wst.xml.xpath2.processor.internal.ast.FunctionCall.accept(FunctionCall.java:46) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:2132) at org.eclipse.wst.xml.xpath2.processor.internal.ast.FilterExpr.accept(FilterExpr.java:52) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:1251) at org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathExpr.accept(XPathExpr.java:43) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.do_expr(DefaultEvaluator.java:314) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.visit(DefaultEvaluator.java:335) at org.eclipse.wst.xml.xpath2.processor.ast.XPath.accept(XPath.java:43) at org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator.evaluate(DefaultEvaluator.java:289) at org.apache.xerces.impl.xs.AbstractPsychoPathXPath2Impl.evaluateXPathExpr(Unknown Source) at org.apache.xerces.impl.xs.alternative.Test.evaluateTestWithPsychoPathXPathEngine(Unknown Source) at org.apache.xerces.impl.xs.alternative.Test.evaluateTest(Unknown Source) at org.apache.xerces.impl.xs.XSDTypeAlternativeValidator.getTypeAlternative(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source) at org.apache.xerces.impl.xs.XMLSchemaValidator.startElement(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source) at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorHandlerImpl.validate(Unknown Source) at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source) at javax.xml.validation.Validator.validate(Validator.java:127) at jaxp.SourceValidator.validate(Unknown Source) at jaxp.SourceValidator.main(Unknown Source) The other error deals when handling xs:ID attributes, when you ask the source validator to run the query multiple times: java -cp $CLASSPATH jaxp.SourceValidator -x 2 -fx -xsd11 -a simple.xsd -i simple.xml I get the following: [Error] simple.xml:2:46: cvc-id.2: There are multiple occurrences of ID value 'id29299'. [Error] simple.xml:2:46: cvc-attribute.3: The value 'id29299' of attribute 'id' on element 'simple' is not valid with respect to its type, 'ID'. [Error] simple.xml:3:45: cvc-id.2: There are multiple occurrences of ID value 'id29300'. [Error] simple.xml:3:45: cvc-attribute.3: The value 'id29300' of attribute 'id' on element 'simple' is not valid with respect to its type, 'ID'. simple.xml: 115/2=57.5 ms Thanks, jOrGe W.
simple.xml
Description: simple.xml
simple.xsd
Description: simple.xsd
--------------------------------------------------------------------- To unsubscribe, e-mail: j-users-unsubscr...@xerces.apache.org For additional commands, e-mail: j-users-h...@xerces.apache.org