No, bar and baz need not be global elements (direct children of schema) in order to be in the target namespace of the schema, if their 'form' infoset property is "qualified". This can be done overall for the schema, using elementFormDefault="qualified" or on individual element declarations.
The root element of the document, foo, can only be in the target namespace if it is global. Jeff ----- Original Message ----- From: "Anne Thomas Manes" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 02, 2003 9:50 AM Subject: RE: xmlns=" " in the doc\literal SOAP message > There are a number of ways to do it, but essentially, you have to define > each element as a direct child of the <schema> element. Here's one example: > > <schema targetName="http://www.foo.com" > xmlns:tns="http://www.foo.com"/> > <element name="foo"> > <complexType> > <sequence> > <element ref="tns:bar" /> > <element ref="tns:baz" /> > </sequence> > <complexType> > </element> > <element name="bar" type="xsd:string"/> > <element name="baz" type="xsd:string"/> > </schema> >