- From: Gino Basso <GBasso@ware2.com>
- Date: Wed, 6 Dec 2000 10:27:08 -0500
- To: "'xmlschema-dev@w3.org'" <xmlschema-dev@w3.org>
- Cc: "'hlitani@jtcsv.com'" <hlitani@jtcsv.com>, "'Michael.Burns@sas.com'" <Michael.Burns@sas.com>
Hi Michael/Elena, Elena is basically correct. By specifying a default namespace "xmlns:http://www.sas.com/Critters" in your XML instance you are saying that any unprefixed elements belong to this default namespace (which in this case means all elements, as none are prefixed). However the "elementFormDefault="unqualified" statement from your schema requires that only global elements (i.e. Vertebrate) by qualified in an instance, not local elements (i.e. PreyList). The only thing I'm not sure about is the XML form Elena's second suggestion. You might need to qualify the inner 'Vertebrate' as well (perhaps Henry can comment here). Also, you'll need to specify a "LimbType' attribute as this is required according to your schema. Here is an attempt at a correct instance: <foo:Vertebrate xmlns:foo="http://www.sas.com/Critters" xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" xsi:schemaLocation="http://www.sas.com/Critters Vertebrate.xsd" Name="MarshHawk" LimbType="wing"> <PreyList> <foo:Vertebrate Name="Mickey" LimbType="leg" /> </PreyList> </foo:Vertebrate> Suggest you read through Section 3 of the Primer for further clarification. Also, unless you've left something out think you can simplify your definition for the Vertebrate element as follows: <element name="Vertebrate" type="critters:VertebrateType" /> Regards, Gino Basso Ware2 Software Corp. Toronto
Received on Wednesday, 6 December 2000 10:27:26 UTC