Hallo,

for example i have the following schema.

File1.xsd
------------------------------------------------------------------------
-------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:abc="http://www.url.com/aBC/myloc";
targetNamespace="http://www.url.com/abc/status";
elementFormDefault="qualified"> 
<xs:import namespace="http://www.url.com/aBC/myloc";
schemaLocation="file2.xsd"/> 
<xs:element name="Message"> 
 <xs:complexType> 
  <xs:sequence>
   <xs:element ref="abc:Messagehead"/>
  </xs:sequence>
 </xs:complexType> 
</xs:element> 
</xs:schema>
------------------------------------------------------------------------
-------

File2.xsd
------------------------------------------------------------------------
-------
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="qualified"
targetNamespace="http://www.url.com/aBC/myloc";
xmlns="http://www.url.com/aBC/myloc";
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xs:element name="Messagehead">
 <xs:complexType>
  <xs:all>
   <xs:element minOccurs="0" name="MType" type="xs:string"/> 
   <xs:element minOccurs="0" name="Subject" type="xs:string"/> 
 </xs:all> 
 </xs:complexType> 
</xs:element> 
</xs:schema>
------------------------------------------------------------------------
-------

If i compile schemas with the with the scomp, i'll got something like
this.


MessageDocument.java
------------------------------------------------------------------------
-------
package com.url.abc.status;

public interface MessageDocument extends org.apache.xmlbeans.XmlObject {

   com.url.aBC.myloc.MessageheadDocument.Messagehead getMessagehead(); 
}
------------------------------------------------------------------------
-------

MessageheadDocument.java
------------------------------------------------------------------------
-------
package com.url.abc.myloc;

public interface MessagheeadDocument extends
org.apache.xmlbeans.XmlObject { 
   ...
   ...
}
------------------------------------------------------------------------
-------

In this case i can get the Messagehead from my instance.

MessageDocument mes =
com.url.abc.status.MessagDocument.Factory.parse("file.xml");
mes.getMessagehead() // The Type .... Cant not be sesolved

The problem here is abc and aBC in the classpath.

Is the schema valid? It's a XMLBeans bug? Or are there are any options
to solve it with the scomp?

Regards,
Andreas
 



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

Reply via email to