Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Validating XML against Schema >Thread Next - Re: Validating XML against Schema Re: Validating XML against SchemaTo: NULL Date: 7/2/2004 6:13:00 PM Hi Murali, If you specify a target namespace for a schema document, the globally declared elements in that document are in that namespace. (Globally declared elements are the ones where the xs:element element is a direct child of the xs:schema element. ) This means that in your XML instance document, those elements must be qualified with a namespace, using a namespace declaration. If you specify elementFormDefault="qualified", locally declared elements are also in that target namespace. (Locally declared elements are the ones that are declared within a complex type.) If you specify elementFormDefault="unqualified", or leave this attribute off entirely, the locally declared elements are in NO namespace. In your case, your root element AccountUpdate was declared in a schema document that has no target namespace, so it is in no namespace. The other elements are all locally declared, and you used elementFormDefault="unqualified", so they too are in no namespace. Even though some of them were declared in a schema that had a target namespace. So, since all your elements are in no namespace, you did not need any namespace declarations in your instance XML. Hope that helps, Priscilla ------------------------------------------------------------------ Priscilla Walmsley Author, Definitive XML Schema / XML in Office 2003 http://www.datypic.com ------------------------------------------------------------------ "Murali Maddali" <maddalimurali@y...> wrote in message news:ukyuw$HYEHA.3012@t...... > Thank you Priscilla for all your help, noNamespaceSchemaLocation and > removing xmlns:cisGlobals did the trick. Now the xml file validates > according to schema. > > I have one final question, what does targetNamespace do? and what does > elementFormDefault="unqualified" imply? > > Thank you. > murali. > > > > > *** Sent via Devdex http://www.devdex.com *** > Don't just participate in USENET...get rewarded for it! | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
