W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > July to September 2000

importing elements from multiple namespaces and defining their sc hemaLocations in a corresponding XML data file

From: <chuck.han@autodesk.com>
Date: Thu, 28 Sep 2000 15:14:55 -0700
Message-ID: <258E47267E4BD3118DCA00805FA72E080461403E@hqmsgsrf03.autodesk.com>
To: www-xml-schema-comments@w3.org
Let's say I have a complexType "twoFoosType" made up of two elements named "foo" from different namespaces and a global element "twoFoos" that uses this complexType:
    <xsd:element name="twoFoos" type="twoFoosType"/>
    <xsd:complexType name="twoFoosType">
        <xsd:element ref="ns1:foo"/>
        <xsd:element ref="ns2:foo"/>
How do I use "twoFoos" in an XML data file and give the schemaLocation of "twoFoos" and the two "foo" elements?  I assume that this structure is partially correct...
    <twoFoos xmlns="http://www.foo.com" xmlns:ns1="http://www.foo.com/ns1" xmlns:ns2="http://www.foo.com/ns2">
...but I am not clear how to define the schemaLocation for all three namespaces.
thanks in advance, Chuck
Chuck Han, Data Architect
Autodesk, Inc.
Received on Thursday, 28 September 2000 18:15:24 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:49:53 UTC