Yes, but you need to have a schema document for each namespace that you
use.
If your "top" element is not in a namespace, your main schema document
would not have a target namespace. It would look roughly like this:
<xs:schema xmlns:anotherNa mespace="foo" ...>
<xs:import namespace="anot herNamespace"
schemaLocation= ...
<xs:element name="top">
<xs:complexType >
<xs:sequence>
<xs:element ref="anotherNam espace:a"/>
.....
The schema document that declares "a" would import the third namespace,
looking roughly like this:
<xs:schema targetNamespace ="foo"
xmlns:anotherNa mespace="foo"
xmlns:aThirdNam espace="bar" ...
<xs:import namespace="aThi rdNamespace"
schemaLocation= ...
<xs:element name="a">
<xs:complexType >
<xs:sequence>
<xs:element ref="aThirdName space:b"/>
.....
And the third schema document would look like:
<xs:schema targetNamespace ="bar"
xmlns:aThirdNam espace="bar" ...
<xs:element name="b">
.....
etc.
Hope that helps,
Priscilla
----------------------------------
Priscilla Walmsley
Author, Definitive XML Schema
http://www.datypic.com
----------------------------------
*** Sent via Developersdex
http://www.developersdex.com ***