visibility of imported schema
Posted: Tue Apr 19, 2005 2:15 am
hello genetlemen,
I have an instance document as follow
Expressions-XPATH.xml layer. file
<core:Layer xmlns:xpath="urn://com.eudoxus/Expressions-XPATH"
xmlns:core="urn://com.eudoxus/Core"
xmlns:java="urn://com.eudoxus/Java"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="urn://com.eudoxus/Expressions-XPATH Expressions-XPATH.xsd"
core:name="Expressions-XPATH"
core:abbreviatedName="xpath">
<core:roles>
<core:Role core:name="XPATHExpressionTypeManager" core:schemaType="xpath:XPATHExpressionTypeManager" core:extends="core:ExpressionTypeManager">
<core:attributes>
<core:Attribute core:name="functionInfo"/>
<core:Attribute core:name="predefinedVariableInfo"/>
</core:attributes>
</core:Role>
</core:roles>
......
</core:Layer>
which imports a schema Expressions-XPATH.xsd schema file
<xsd:schema xmlns="urn://com.eudoxus/Expressions-XPATH"
xmlns:xpath="urn://com.eudoxus/Expressions-XPATH"
xmlns:core="urn://com.eudoxus/Core"
xmlns:java="urn://com.eudoxus/Java"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="urn://com.eudoxus/Expressions-XPATH"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="urn://com.eudoxus/Core" schemaLocation="eudoxus:/Core/Core.xsd" />
<xsd:complexType name="XPATHFunction" abstract="true"
core:javaInterfaceName="com.eudoxus.expression.xpath.antlr.IXPATHFunction">
</xsd:complexType>
.......
</xsd:schema>
the schema above imports a another schema file in which I use the catalog
to resolve the location
I know this works because the schema validates with the import when I remove the import I obtain errors
The schema file imported is Core.xsd
<xsd:schema xmlns="urn://com.eudoxus/Core"
elementFormDefault="qualified"
xmlns:SOAP-ENV="http://www.w3.org/2002/06/soap-envelope"
targetNamespace="urn://com.eudoxus/Core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/2002/06/soap-envelope" schemaLocation="eudoxus:/SOAP-Envelope/SOAP-Envelope.xsd"/>
<xsd:include schemaLocation="Component.xsd"/>
<xsd:include schemaLocation="Remote.xsd"/>
<xsd:include schemaLocation="Runtime.xsd"/>
<xsd:include schemaLocation="Event.xsd"/>
<xsd:include schemaLocation="ComponentManager.xsd"/>
<xsd:include schemaLocation="XML.xsd"/>
<xsd:include schemaLocation="Collection.xsd"/>
<xsd:include schemaLocation="Expression.xsd"/>
<xsd:include schemaLocation="Scripting.xsd"/>
<xsd:include schemaLocation="Metadata.xsd"/>
<xsd:include schemaLocation="Entity.xsd"/>
<xsd:include schemaLocation="Entity-Behavior.xsd"/>
<xsd:include schemaLocation="Entity-Metadata.xsd"/>
<xsd:include schemaLocation="StringManager.xsd"/>
<xsd:include schemaLocation="Transaction.xsd"/>
<xsd:include schemaLocation="Logging.xsd"/>
</xsd:schema>
includes among other files including
Metadata.xsd
<?xml version="1.0"?>
<xsd:schema xmlns="urn://com.eudoxus/Core"
xmlns:core="urn://com.eudoxus/Core"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="urn://com.eudoxus/Core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="Collection.xsd"/>
<xsd:include schemaLocation="Expression.xsd"/>
<xsd:include schemaLocation="Component.xsd"/>
<xsd:include schemaLocation="XML.xsd"/>
<xsd:element name="Layer" type="Layer"/>
<xsd:complexType name="Layer"
core:javaClassName="com.eudoxus.metadata.Layer">
<xsd:complexContent>
<xsd:extension base="core:Element">
<xsd:sequence>
<xsd:element name="roles" core:propertyName="role" minOccurs="0" type="core:RoleTypeCollection"/>
<xsd:element name="components" core:propertyName="componentType" minOccurs="0" type="core:ComponentTypeCollection"/>
<xsd:element name="extensions" core:propertyName="extension" minOccurs="0" type="core:ExtensionCollection"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:ID"/>
<xsd:attribute name="abbreviatedName" use="required" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
which of course defines Layer the top level element in the first document
I obtain an error annot find the declaration of the element core:Layer.
There are other layer xml files in both the Core namespace and many others. In the core layer the layer xml files validate. When I change the
schemalocation attribute in the Expressions-XPATH layer file to point directly to the Core schema xsd it works but when it is done indirectly through the XPATH-Expression.xsd file which imports the Core schema xsd it does not work. This works in Stylus studio, and this
problem appears to be the last stumbling beforeles to I move Oxygen XML. Is there
any other way of accomplishing this. I have about 150 xml files with transitive
relationships among the schemas I really need to determine a mechanism to validate.
thanks
Solomon
I have an instance document as follow
Expressions-XPATH.xml layer. file
<core:Layer xmlns:xpath="urn://com.eudoxus/Expressions-XPATH"
xmlns:core="urn://com.eudoxus/Core"
xmlns:java="urn://com.eudoxus/Java"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xsi:schemaLocation="urn://com.eudoxus/Expressions-XPATH Expressions-XPATH.xsd"
core:name="Expressions-XPATH"
core:abbreviatedName="xpath">
<core:roles>
<core:Role core:name="XPATHExpressionTypeManager" core:schemaType="xpath:XPATHExpressionTypeManager" core:extends="core:ExpressionTypeManager">
<core:attributes>
<core:Attribute core:name="functionInfo"/>
<core:Attribute core:name="predefinedVariableInfo"/>
</core:attributes>
</core:Role>
</core:roles>
......
</core:Layer>
which imports a schema Expressions-XPATH.xsd schema file
<xsd:schema xmlns="urn://com.eudoxus/Expressions-XPATH"
xmlns:xpath="urn://com.eudoxus/Expressions-XPATH"
xmlns:core="urn://com.eudoxus/Core"
xmlns:java="urn://com.eudoxus/Java"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="urn://com.eudoxus/Expressions-XPATH"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="urn://com.eudoxus/Core" schemaLocation="eudoxus:/Core/Core.xsd" />
<xsd:complexType name="XPATHFunction" abstract="true"
core:javaInterfaceName="com.eudoxus.expression.xpath.antlr.IXPATHFunction">
</xsd:complexType>
.......
</xsd:schema>
the schema above imports a another schema file in which I use the catalog
to resolve the location
I know this works because the schema validates with the import when I remove the import I obtain errors
The schema file imported is Core.xsd
<xsd:schema xmlns="urn://com.eudoxus/Core"
elementFormDefault="qualified"
xmlns:SOAP-ENV="http://www.w3.org/2002/06/soap-envelope"
targetNamespace="urn://com.eudoxus/Core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:import namespace="http://www.w3.org/2002/06/soap-envelope" schemaLocation="eudoxus:/SOAP-Envelope/SOAP-Envelope.xsd"/>
<xsd:include schemaLocation="Component.xsd"/>
<xsd:include schemaLocation="Remote.xsd"/>
<xsd:include schemaLocation="Runtime.xsd"/>
<xsd:include schemaLocation="Event.xsd"/>
<xsd:include schemaLocation="ComponentManager.xsd"/>
<xsd:include schemaLocation="XML.xsd"/>
<xsd:include schemaLocation="Collection.xsd"/>
<xsd:include schemaLocation="Expression.xsd"/>
<xsd:include schemaLocation="Scripting.xsd"/>
<xsd:include schemaLocation="Metadata.xsd"/>
<xsd:include schemaLocation="Entity.xsd"/>
<xsd:include schemaLocation="Entity-Behavior.xsd"/>
<xsd:include schemaLocation="Entity-Metadata.xsd"/>
<xsd:include schemaLocation="StringManager.xsd"/>
<xsd:include schemaLocation="Transaction.xsd"/>
<xsd:include schemaLocation="Logging.xsd"/>
</xsd:schema>
includes among other files including
Metadata.xsd
<?xml version="1.0"?>
<xsd:schema xmlns="urn://com.eudoxus/Core"
xmlns:core="urn://com.eudoxus/Core"
elementFormDefault="qualified"
attributeFormDefault="qualified"
targetNamespace="urn://com.eudoxus/Core"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:include schemaLocation="Collection.xsd"/>
<xsd:include schemaLocation="Expression.xsd"/>
<xsd:include schemaLocation="Component.xsd"/>
<xsd:include schemaLocation="XML.xsd"/>
<xsd:element name="Layer" type="Layer"/>
<xsd:complexType name="Layer"
core:javaClassName="com.eudoxus.metadata.Layer">
<xsd:complexContent>
<xsd:extension base="core:Element">
<xsd:sequence>
<xsd:element name="roles" core:propertyName="role" minOccurs="0" type="core:RoleTypeCollection"/>
<xsd:element name="components" core:propertyName="componentType" minOccurs="0" type="core:ComponentTypeCollection"/>
<xsd:element name="extensions" core:propertyName="extension" minOccurs="0" type="core:ExtensionCollection"/>
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:ID"/>
<xsd:attribute name="abbreviatedName" use="required" type="xsd:string"/>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:schema>
which of course defines Layer the top level element in the first document
I obtain an error annot find the declaration of the element core:Layer.
There are other layer xml files in both the Core namespace and many others. In the core layer the layer xml files validate. When I change the
schemalocation attribute in the Expressions-XPATH layer file to point directly to the Core schema xsd it works but when it is done indirectly through the XPATH-Expression.xsd file which imports the Core schema xsd it does not work. This works in Stylus studio, and this
problem appears to be the last stumbling beforeles to I move Oxygen XML. Is there
any other way of accomplishing this. I have about 150 xml files with transitive
relationships among the schemas I really need to determine a mechanism to validate.
thanks
Solomon