Next Previous Up Contents
Next: Examples
Up: xsdvalidate: Validates against XML Schema
Previous: xsdvalidate: Validates against XML Schema

### B.46.1 Usage

The usage of `xsdvalidate` is

       stilts <stilts-flags> xsdvalidate schemaloc=<namespace>=<location> ...
                                         topel=[{<ns-uri>}][<local-name>]
                                         verbose=true|false uselocals=true|false
                                         [doc=]<location>

If you don't have the `stilts` script installed, write "`java -jar stilts.jar`" instead of "`stilts`" - see Section 3. The available `<stilts-flags>` are listed in Section 2.1. For programmatic invocation, the Task class for this command is `uk.ac.starlink.ttools.task.XsdValidate`.

Parameter values are assigned on the command line as explained in Section 2.3. They are as follows:

`doc = <location>` (InputStream)
  Location of XML document to validate.
`schemaloc = <namespace>=<location> ...` (String[])
  Assignments of override schema locations to XML namespaces. One or more assignments may be supplied, each of the form `<namespace>=<location>` where the location may be a filename or URL. Multiple assignments may be made by supplying the parameter multiple times, or using a space character as a separator.

  Each assignment causes any reference to the given namespace in the validated document to be validated with reference to the XSD schema at the given location rather than to a schema acquired in the default way (using `xsi:schemaLocation` attributes or using the namespace as a retrieval URL).

`topel = [{<ns-uri>}][<local-name>]` (String)
  Local name of the top-level element expected in the parsed document. If the actual parsed top-level element has a local name differing from this, an error will be reported. If no value is specified (the default) no checking is done.
`uselocals = true|false` (Boolean)
  Whether to use local copies of VO schemas where available. If true, copies of some IVOA schemas stored within the application are used instead of retrieving them from their http://www.ivoa.net/ URLs. Setting this true is generally faster and more robust against network issues, though it may risk retrieving out of date copies of the schemas.

  [Default: `false`]

`verbose = true|false` (Boolean)
  If true, some INFO reports will be displayed alongside any ERROR reports resulting from the parse. This may be useful for diagnosis or reassurance.

  [Default: `false`]

Next Previous Up Contents
Next: Examples
Up: xsdvalidate: Validates against XML Schema
Previous: xsdvalidate: Validates against XML Schema

STILTS - Starlink Tables Infrastructure Library Tool Set
Starlink User Note256
STILTS web page: http://www.starlink.ac.uk/stilts/
Author email: m.b.taylor@bristol.ac.uk
Mailing list: topcat-user@jiscmail.ac.uk