Project

Profile

Help

Bug #2351

closed

Validating an XSD from command line gives a stacktrace

Added by Michael Kay over 9 years ago. Updated almost 9 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Diagnostics
Sprint/Milestone:
Start date:
2015-04-05
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

Description

When running

net.sf.saxon.Validate xsd:test.xsd

from the command line, if test.xsd is invalid, appropriate error messages are output, followed by an inappropriate stack trace:

Saxon-EE 9.6.0.5J from Saxonica

Java version 1.6.0_27

Using license serial number V001824

Loading schema document file:/Users/mike/Desktop/temp/test.xsd

Finished loading schema document file:/Users/mike/Desktop/temp/test.xsd

Error on line 21 of test.xsd:

Element f cannot be in the substitution group of e. Type u is not validly derived from

type xs:positiveInteger

net.sf.saxon.s9api.SaxonApiException: The schema is invalid

at com.saxonica.ee.s9api.SchemaManagerImpl.load(SchemaManagerImpl.java:120)

at com.saxonica.Validate.doValidate(Validate.java:315)

at com.saxonica.Validate.main(Validate.java:56)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)

Caused by: net.sf.saxon.type.SchemaException: The schema is invalid

at com.saxonica.ee.schema.SchemaCompiler.compile(SchemaCompiler.java:498)

at com.saxonica.ee.schema.SchemaCompiler.validate(SchemaCompiler.java:527)

at com.saxonica.config.EnterpriseConfiguration.addSchemaSource(EnterpriseConfiguration.java:500)

at com.saxonica.ee.s9api.SchemaManagerImpl.load(SchemaManagerImpl.java:118)

Please register to edit this issue

Also available in: Atom PDF