Hi again,

Thanks for your response Neil. Still I don't want to import anything into the schema, I want to be able to use the flexibility ##order allows. Using ##order I don't know (want to know) anything about test.xsd inside other.xsd.

I got it working after a few adjustments. It was basically a problem of using targetNamespace and schemaLocation in a correct manner. See below:

/Peter

----------------other.xml----------------------------
<?xml version="1.0" encoding="UTF-8"?>
<aaa:elem xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
      xmlns:aaa="http://other.com";
      xsi:schemaLocation="http://other.com http://kai/other.xsd";>

<other:test xmlns:other="http://test.com"; xsi:schemaLocation="http://test.com http://kai/test.xsd";>
<kaka>Bulle</kaka>
<bulle>1234</bulle>
</other:test>


</aaa:elem>


----------------other.xsd---------------------------- <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://kaka.com"; xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";>

<xsd:element name="elem">
<xsd:complexType>
<xsd:sequence>
<xsd:any namespace = "##other" processContents = "strict" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>


</xsd:schema>


---------------------test.xsd------------------------------- <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://test.com"; xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";>

  <xsd:element name="test">
        <xsd:complexType>
                <xsd:sequence>
                        <xsd:element name="kaka" type="xsd:string"/>
                        <xsd:element name="bulle" type="xsd:integer"/>
                </xsd:sequence>
        </xsd:complexType>
  </xsd:element>

</xsd:schema>



At 09:23 2001-04-26 -0400, you wrote:


Hi Peter,

You need to explicitly <import> the test.xsd schema in side your other.xsd
schema.  You should also be able to specify a schemaLocation attribute on
your instance document--along with the noNamespaceSchemaLocation attribute
you already have--but I don't rate the chances of this working as very
high:  someone needs to get this feature working...

Using <import> things should work fine for you though.

Hope that helps,
Neil

Neil Graham
XML Parser Development
IBM Toronto Lab
Phone:  416-448-3519, T/L 778-3519
E-mail:  [EMAIL PROTECTED]



Peter Tornberg <[EMAIL PROTECTED]> on 04/26/2001 03:43:09 AM

Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:
Subject:  ##other problems


Hi,

I have an application where I want to use the <xsd:any namespace =
"##other" ... mechanism. Unfortunaltely I'm not able to get this to work.
What am I doing wrong?

---------------other.xml-----------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<elem xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance";
xsi:noNamespaceSchemaLocation="other.xsd">
         <other:test xmlns:other = "http://kai/test.xsd";>
                  <other:kaka>Bulle</other:kaka>
           </other:test>
</elem>


--------------other.xsd------------------------------------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema";>
           <xsd:element name="elem">
                     <xsd:complexType>
                               <xsd:sequence>
                                          <xsd:any namespace = "##other"
processConetents = "strict" />
                               </xsd:sequence>
                     </xsd:complexType>
           </xsd:element>
</xsd:schema>

I  get the error messages:
[Error] Element type "other:test" must be declared.
[Error] Element type "other:kaka" must be declared.

If I snoop the network I see that no request is made to http://kai to get
the test.xsd to verify the other:* stuff. How do I force the parser to get
the test.xsd to verify the data?

Thanks!

/Peter


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to