You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by h....@gambit-gmbh.de on 2002/11/08 08:53:36 UTC
import schemaLocation
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: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org