Hi,

I've attached the test schema.

My castor implementation version is 1.1.2.1.

Regards,
Boris

Werner Guttmann wrote:
What does the <schema> element definition look like ? It might as well
be a bug (or not), but I need more information to be able to tell..

Werner

Boris Dushanov wrote:
  
Hi all,

I have an XML Schema in which the following element is defined :

<xsd:element name="internationalPrice" type="xsd:anyType"/>

I'm executing the following test code using castor :
                     SchemaReader reader = new
SchemaReader("mySchema.xsd");

           Schema schema = reader.read();
                     ElementDecl element =
schema.getElementDecl("internationalPrice");
                     Schema typeSchema = element.getType().getSchema();
                     System.out.println(typeSchema.getTargetNamespace());

I expect that http://www.w3.org/2001/XMLSchema will be printed as a
result but it is not.The target namespace of mySchema.xsd is printed.
Is this the right behaviour or there is some problem in the castor ? Or
maybe I'm missing something...

Thanks in advance,
Boris




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



    


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




  

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsd:schema xmlns="http://uri.seeburger.com/bisas/xformservice/schema"; xmlns:msg="http://uri.seeburger.com/bisas/message/schema"; xmlns:see="http://uri.seeburger.com/bisas/xformservice/schema"; xmlns:tns="http://uri.seeburger.com/xformservice/schema"; xmlns:xs="http://www.w3.org/2001/XMLSchema"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; attributeFormDefault="unqualified" elementFormDefault="unqualified" targetNamespace="http://uri.seeburger.com/bisas/xformservice/schema";>
	
	
	 <xsd:complexType name="metaDataType">
	        <xsd:sequence>
	             <xsd:element name="docid" type="xsd:string"/>
	             <xsd:element name="user" type="xsd:string"/>
	             <xsd:element ref="internationalPrice"/>
	        </xsd:sequence>
	 </xsd:complexType>

	  <xsd:complexType name="test">
	    <xsd:complexContent>
	      <xsd:restriction base="xsd:anyType">
	        <xsd:attribute name="currency" type="xsd:string"/>
	        <xsd:attribute name="value" type="xsd:decimal"/>
	      </xsd:restriction>
	    </xsd:complexContent>
	  </xsd:complexType>
	 
	 <xsd:element name="internationalPrice" type="xsd:anyType"/>
	
	<xsd:complexType name="requestStatusType">
	        <xsd:sequence>
	             <xsd:element name="accepted" type="xsd:int"/>
	             <xsd:element name="comment" type="xsd:string"/>
	        </xsd:sequence>
	 </xsd:complexType>
	
	<xsd:complexType name="userDataType">
	        <xsd:sequence>
	             <xsd:element name="name" type="xsd:string"/>
	             <xsd:element name="phone" type="xsd:string"/>
	             <xsd:element name="email" type="xsd:string"/>
	             <xsd:element name="days-total" type="xsd:int"/>
	             <xsd:element name="days-left" type="xsd:int"/>
	        </xsd:sequence>
	 </xsd:complexType>
	 
	 <xsd:complexType name="leaveType">
	        <xsd:sequence>
	            <xsd:element name="from-date" type="xsd:date"/>
	            <xsd:element name="to-date" type="xsd:date"/>
	            <xsd:element name="type" type="xsd:int"/>
	            <xsd:element name="days" type="xsd:int"/>
	        </xsd:sequence>
	 </xsd:complexType>
	 
	 <xsd:complexType name="leaveDaysType">
	        <xsd:sequence maxOccurs="unbounded" minOccurs="0">
	            <xsd:element name="leave" type="see:leaveType"/>
	        </xsd:sequence>
	 </xsd:complexType>
	
	 <xsd:complexType name="formType">
	        <xsd:sequence>
	             <xsd:element name="meta-data" type="see:metaDataType"/>
	             <xsd:element name="request-status" type="see:requestStatusType"/>
	             <xsd:element name="user-data" type="see:userDataType"/>
	             <xsd:element name="leave-days" type="see:leaveDaysType"/>	             
	        </xsd:sequence>
	 </xsd:complexType>      
	    
	 <xsd:element name="form" type="see:formType"/>
	
</xsd:schema>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to