Lists Home |
Date Index |
- From: "Roger L. Costello" <email@example.com>
- To: firstname.lastname@example.org, email@example.com
- Date: Sat, 26 Aug 2000 12:28:44 -0400
I have three questions about creating an XML Schema with no
1. Suppose that I create a schema, BookCatalogue.xsd with no
targetNamespace. Now suppose that I want to create an instance
document, BookCatalogue.xml, which asserts that it conforms to the
schema. How do I do it? I tried two ways and both failed:
a. In the instance document, for the value of schemaLocation I put
I ran it through XSV and it gave an error "schemaLocation requires
a pair of values". "Hmm", I thought, "how can I give it a pair of
values since the first in the pair specifies a targetNamespace and
there is no targetNamespace? Perhaps the trick is to put a
bogus value in for the first value in the pair?" So, that's
what I tried next...
b. In my second attempt I put a pair of values in for schemaLocation
where the first in the pair is a bogus value:
As you might guess, this did not work either. XSV gave me the
error message, "targetNamespace mismatch: fjdkfsdklfds expected,
Can someone tell me how to do this?
2. I have seen schemas which use "noTargetNamespace". Upon examining
the specs, however, I see no mention of noTargetNamespace. Is that
something from an old working draft that is no longer present?
3. Can someone give me a reason why you would ever want to have no
targetNamespace (i.e., why you would want your schema to have no
namespace for the elements that it declares)?