how do schema validators know where to find the xsd associated with the namespace in xmlns?

I'm calling an external (3rd party) web service which is returning xml containing namespaces like such:


I'm interested in the last namespace that starts with urn:oasis.

how do validators know how to validate the file if there is no location specified?

I know the first ones don't have location specified either as they are just a namespace.

Could you elaborate on the following statement made in this article:

use URNs if your organization has a means of managing and resolving a suitable class of URN

How do these validators work without locations?


To specify a schema location for validation purposes, you have different approaches :

With XML Schema :

  1. you tell your parser wich schema you want to use for validation (all implementations I know propose such mechanism). During the process, schema will be resolved given the namespaces in the instance. No need here to change your XML file.
  2. You add information about schemas location in your XML file.

For this second case, you have to use the following namespace : xmlns:xsi="". In this namespace, you have two attributes dedicated to validation : schemaLocation and noNamespaceSchemaLocation.

  1. If you don't have any namespaces, use the second (it's not your case).
  2. If you have namespaces, you use schemaLocation with the following syntax : xsi:schemaLocation="namespaceURI1 linkToTheSchema1 namespaceURI2 linkToTheSchema2...". Each schema declaration is composed of 2 parts separated with a space character: the namespace and the URI that pointed to the file.

With other schema langages (Relax NG, schematron)

  1. You can always use the first point above : telling your implementation with schema you want to use.

  2. In the XML file : W3C has published a note already implemented in some XML IDE that allows to add a processiog instruction called xml-model to give access to shcemas. See here :

Need Your Help

Returning IEnumerable with using

.net delegates using-statement deferred-execution

Interesting problem I ran across which makes total sense. I have a generic method like so:

MVVM ViewModel and static methods

c# wpf mvvm static

I try to rewrite my Application using the MVVM pattern.