- From: Liz Castro <lcastro@cookwood.com>
- Date: Wed, 09 Aug 2000 21:36:32 -0400
- To: www-xml-schema-comments@w3.org
> Re: namespaces and schemaLocation > > From: Martin Gudgin (marting@develop.com) > Date: Wed, Aug 09 2000 > > There are two problems. The main one is that your 'contents' element is > unqualified in the schema ( in 'no namespace' ) and qualified in the > instance ( in the > http://www.cookwood.com/ns/content namespace ). > > You can modify this by setting from='qualified' on the local element > declaration. Or you can modify it for an entire schema by specifying > elementFormDefault='qualified' on the schema element. I guess there's something else I'm not getting. In your new schema, you declared the "tns" prefix but never used it. I thought if you declared a namespace with xmlns="url" then that namespace was the default. But you're saying that my content declaration was in "no namespace" (and not in the default namespace as I intended). How can that be? And how can it be solved by declaring a namespace with a prefix but never using that prefix? In the XML document, it looks like you again add a prefix ("p" this time) and use it only for test, not for content. Aren't test and contents part of the same namespace? And if not, how did that happen. Certainly, my intention was to create one particular namespace with both elements in it, and then to use those elements in an instance. I have the feeling I'm going about this the wrong way. I have been reading and rereading those specs, but I find them very hard to decipher. I hope these aren't terribly stupid questions! And thanks so much for helping me through them. > > > The second problem is that it is illegal to have declarations for attributes > in the http://www.w3.org/1999/XMLSchema-instance namespace. Also curious. Those were added automatically by XML Spy and I thought that they were necessary (and legal). Thanks, Liz Liz Castro Cookwood Press http://www.cookwood.com/
Received on Wednesday, 9 August 2000 21:30:14 UTC