Change the "elementFormDefault" to "unqualified", the problem will be gone. It is not just because of the scoping issue, mostly is related with "form" attribute for element decls. The current implementation is based our own interpretation of "form" attribute for element decls, it turns out W3C has different intention for that. We are currently working with them to get this straighten out. _____
Eric Ye * IBM, JTC - Silicon Valley * [EMAIL PROTECTED] ----- Original Message ----- From: "Andreas Junghans" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, July 06, 2000 11:37 PM Subject: Re: Scope of element declarations > Hi there, > > Eric Ye wrote: > > it is sort of a pending issue. but only when you use > > "noTargetNamespaceLocation". > > Please use a schema with targetNameSpace defined for you sample to avoid > > this problem. > > I actually do want to use a targetNamespace, I just thought I'd send in > a simplified example. Below are the documents again, this time with > namespaces. The problem is still the same. > > > about how to bind unprefixed names in the instance document. Anyway, if you > > want to use noTargetNamespaceLocation, for now, don't use any duplicate > > names for elements and types, this issue will be solved after W3C wg clearly > > I think it's a scope problem. The two elements with the same name are > declared locally in two different complexTypes. I looked again in the > spec (http://www.w3.org/TR/xmlschema-1) and section 2.5 explicitly > states in the last paragraph that what I'm doing is allowed. > > Xerces version used: 1.1.2 > > Documents to reproduce behaviour: > > <?xml version="1.0"?> > <schema version="1.0" > targetNamespace="test" > xmlns="http://www.w3.org/1999/XMLSchema" > xmlns:tst="test" > elementFormDefault="qualified" > > > <complexType name="a-type"> > <element name="elem" type="string"/> > </complexType> > <element name="a" type="tst:a-type"/> > <complexType name="b-type"> > <element name="elem" type="string"/> > </complexType> > <element name="b" type="tst:b-type"/> > </schema> > > <?xml version="1.0"?> > <a > xmlns="test" > xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" > xsi:schemaLocation="test test.xsd" > > > <elem>hello</elem> > </a> > > Best regards > > Andreas > > -- > ISB GmbH Phone ++49 721 82800-40 or -0 > Karlstraße 52-54 Fax ++49 721 82800-82 > 76133 Karlsruhe mailto:[EMAIL PROTECTED] > Germany http://www.isb-ka.de >