Altova Mailing List Archives


Re: XMLSchema and XML Validation problem

From: richard@------.--.--.-- (------- -----)
To: NULL
Date: 6/28/2004 1:51:00 PM
In article <2kak5eF1mqqU2@u...>,
Robert Ludewig <schwertfischtrombose@g...> wrote:

>And why ?

We need an FAQ.  This question has been answered many times.

>I would have expected that if I don't want the namespace specification to be
>required, that I have to do it with unqualified.

Your Sitemap element has xmlns="http://www.htw-dresden.de/SitemapNS",
which makes that be the default namespace, so your unprefixed Page
element is in that namespace.

elementFormDefault="qualified" makes local element declarations apply
to elements in the target namespace (rather than in no namespace), which
is what you want.

Your schema would be right if your document looked like this:

<x:Sitemap xmlns:x="http://www.htw-dresden.de/SitemapNS"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.htw-dresden.de/SitemapNS Sitemap.xsd">
 <Page>
 </Page>
</x:Sitemap>

(i.e. if Page was in no namespace).

- Richard

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.