The usage of xsdvalidate
is
stilts <stilts-flags> xsdvalidate schemaloc=<namespace>=<location> ... topel=[{<ns-uri>}][<local-name>] verbose=true|false uselocals=true|false nsurl=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)
nsurl = true|false
(Boolean)
http://example.com/ns1
this is like assuming the presence of a
xsi:schemaLocation="http://example.com/ns1 http://example.com/ns1"
entry.
Of course the XSD must be available at the location given
by the namespace URI for this to work.
Setting this true usually does the right thing,
but it may risk hitting schema-hosting web servers too hard,
and maybe it's too lenient on XML documents that don't have
the right xsi:schemaLocation
attributes;
but XMLSchema-1 Sec 4.3.2
says it's up to the processor (i.e. this command)
to figure out where to get schemas from.
[Default: true
]
schemaloc = <namespace>=<location> ...
(String[])
<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)
uselocals = true|false
(Boolean)
[Default: false
]
verbose = true|false
(Boolean)
[Default: false
]