Showing posts with label xsd. Show all posts

gravatar

Validating an XML file using XSD

The following document talks about the diferrent ways in which you can validate an XML file using XSD in your application.

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JAXPDOM8.html

gravatar

Basic information about xsd's and namespace

An xsd file can refer to another xsd file in two ways..

  • using <import> tags
  • using <include> tags
The <import> tag has to be used, when an xsd wants to refer another xsd whose "targetNamespace" values is different.
The <include> tag has to be used, when the "targetNamespace" of the referred xsd is same as the "targetNamespace" of the referring xsd..
You cannot "import" an xsd whose "targetNamespace" is same as the "targeNamespace" of the referring xsd file...
Similarly, you cannot "include" an xsd whose "targetNamespace" is different from the "targetNamespace" of the referring xsd file.