axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sateesh Ayyagari <>
Subject Schema Question
Date Wed, 26 Mar 2003 06:07:21 GMT


  I have a question in understanding one of the schemas generated by AXIS.  I am putting it
in a general way.  I would appreciate any help from the people who are familiar with the understanding
of schemas.  I would like to confirm it with my understanding given below after the schema
code.  Here is the schema:

<schema targetNamespace="NSone" 
   xmlns:apa = "NSone">
      <complexType name="Map">
   <element name="items" nillable="true" minOccurs="0" maxOccurs="unbounded">
            <element name="key" nillable="true" type="xsd:string"/>
            <element name="value" nillable="true" type="xsd:string"/>

  My understanding is that a "complexType" should be of the same namespace as that of its
parent "element".  In the above code, complexType name="Map" is of targetNamespace type. 
but the local "element" name="items" belongs to the default namespace.  Since I declared the
child of that element (which is complexType) to be of namespace "xmlns:ap", I see a flaw in
the schema code.  I therefore say that if at all the complexType belongs to a different namespace
than its parent "element", then we should declare it with a type="something" as an attribute
to the "element" than as a child to it.  Am I right in saying so?  Any comments are appreciated.




Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
View raw message