model group and targetNamespace

Hi,

 

I have following model group definition in one schema and it is
referenced in another schema with a different targetNamespace. What
should ##targetNamesapce refer to when this group is referenced: the
namespace where it is defined, or the namespace where it is referenced?
What is the namespace of "foo"?

 

   <xs:group name="MyGroup">

     <xs:sequence minOccurs="0" maxOccurs="unbounded">

        <xs:element name="foo" type=" xs:int" />

        <xs:any minOccurs="0" maxOccurs="unbounded"
namespace="##targetNamespace" processContents="lax" />

     </xs:sequence>

   </xs:group>

 

I think it is the namespace of the referecing schema (not that of the
schema where it is defined). However, I can not find w3c recommendations
on schema that clearly say so. It actually says "It provides for naming
a model group for use by reference in the XML representation of complex
type definitions and model groups."

 

Thanks,

Zhisheng

Received on Wednesday, 1 December 2004 09:58:47 UTC