0

Now I am using a namespace "http://..." which includes some schemas definition, my question is, Assuming this URI is offline, If I can't use it to validate my xml file anymore? or any other solution for validating? thanks for your help!

paul cheung
  • 748
  • 2
  • 13
  • 32

1 Answers1

0

The namespace uri does not point to a location of xsd. It is just a namespace and it does not have to be an url. Either you have the schema to validate your xml or you don't. Even if there is no schema you are free to use namespaces. The convention of using urls as uris is supposed to ensure that the namespace uri is unique.

Pawel
  • 31,342
  • 4
  • 73
  • 104
  • thanks for your help; I want to use the Type defined in a remote .xsd file(on different machine), should I get a copy of that schema? – paul cheung Jun 08 '13 at 11:46
  • I believe so. Here is how you do it in .NET http://stackoverflow.com/questions/4134553/c-sharp-validate-xml-against-xsd – Pawel Jun 08 '13 at 17:04