I've got a strange problem,

in my program I get a:

org.xml.sax.SAXParseException: Schema error: could not resolve URI :
http://www.gambit-gmbh.de/XMLSchema to a SchemaGrammar in
getTypeInfoFromNS.


The strange thing is, that Netbeans 3.4 can validate the XML-file if i copy
files and definitions into the same directory.
What i would like to know, is there something wrong with my Schema or is
the Xerces misconfigured?

I tracked it down and found the problem in the import statement. It seems
to use the current
working dir instead of DefaultHandler.resolveEntity(String publicId, String
systemId). How
to make Xerces use another directory to find the GamTypes.xsd files?

Thanks
     Haug


<?xml version="1.0" encoding="UTF-8"?>
<!-- Document   : WarehouseProductInReceiver.xml -->
<WarehousedProduct
  xmlns='Argos'
  xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
  xsi:schemaLocation='Argos WarehousedProduct.xsd' >
     ...
</WarehousedProduct>


<?xml version="1.0" encoding="UTF-8"?>
<!-- Document   : WarehousedProduct.xsd -->
<xs:schema targetNamespace="Amos"
           xmlns="Amos"
           xmlns:gam="http://www.gambit-gmbh.de/XMLSchema";
           xmlns:xs="http://www.w3.org/2001/XMLSchema";
           elementFormDefault="qualified" >
  <!-- Import the GamBit types. -->

  <xs:import namespace="http://www.gambit-gmbh.de/XMLSchema";
             schemaLocation="GamTypes.xsd" />

  <xs:element name="WarehousedProduct" type="ItemBase" />
  <xs:complexType name="ItemBase">
     ...
  </xs:complexType>
</xs:schema>


<?xml version="1.0" encoding="UTF-8"?>
<!--  Document   : GamTypes.xsd -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
           targetNamespace="http://www.gambit-gmbh.de/XMLSchema";
           elementFormDefault="qualified" >
    ...
</xs:schema>





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

Reply via email to