xsd - Validating an XML structure against a local XML Schema -


My code is making an XML document (with JDOM 1.1) which I want to validate against an XSD file. However, according to, the schema space property only works with accessible URLs to give to the parser

Is there no way to refer to the local XSD file? Is legal against XSD, which is not universally accessible impossible? I do not get it ...

First of all, there is a way to specify the schema location feature only The location of the schema, and in many cases, this is not the best way (if you do not believe the document is valid, why do you have to trust that where its schema is?). Most schema vendors can provide an option to provide externally a schema, e.g. On the command line or via API or GUI. Second, the schema space is a URI, so it can be a relative URL, for example "test.xsd" identifies the schema document sitting in the same directory as the source document.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -