- From: Martin Gudgin <marting@develop.com>
- Date: Wed, 9 Aug 2000 23:25:58 +0100
- To: <www-xml-schema-comments@w3.org>
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. The second problem is that it is illegal to have declarations for attributes in the http://www.w3.org/1999/XMLSchema-instance namespace. Check out http://marting.develop.com/xsd/simple.xml http://marting.develop.com/xsd/simple.xsd for amended version of your instance ( the schema doc is just a copy of yours minus the xsi:type etc attribute decls ) Regards Martin ----- Original Message ----- From: "Liz Castro" <lcastro@cookwood.com> To: <www-xml-schema-comments@w3.org> Sent: Wednesday, August 09, 2000 8:42 PM Subject: namespaces and schemaLocation > Well, I thought I had it, though I had gotten it to validate right, and > then all of a sudden it stopped working. XML Spy still says everything > is peachy, so maybe it's just a bug in XSV? > > When my more complicated example started not to work, I pared it down > into nothingness, to make sure I wasn't getting tripped up by some dumb > typo: > > http://www.cookwood.com/xmltests/simple.xml > http://www.cookwood.com/xmltests/simple.xsd > > What I'm trying to do is declare the namespaces in the xsd doc and then > use xsi:schemaLocation in the xml doc. When I got to XSV, I only give > the XML document location. And although it seems that XSV finds the > schema just fine, I get weird errors about my elements not being > declared, even though they are. > > Is it XSV or me? > > Many thanks, > Liz > > Liz Castro > Cookwood Press > Author of > HTML 4 for the World Wide Web: Visual QuickStart Guide --#1 > bestseller!--
Received on Wednesday, 9 August 2000 18:27:51 UTC