axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: Schema question
Date Mon, 16 Oct 2006 11:25:27 GMT
You may define a particular element only once in a schema, so if the
element is used in multiple places, you must define it as a global and
reference it from the various types that use it. (Only global elements
can be referenced.) Or perhaps you want to allow the element to be
used both as a root element and as a child element in another element.

Here's an example:

<s:element name="foo" type="s:string"/>
<s:element name="foobar" type="tns:foobarType"/>
<s:complexType name="foobarType">
   <s:sequence>
       <s:element ref="tns:foo"/>
       <s:element name="bar" type="s:string"/>
   </s:sequence>
</s:complexType>

Anne


On 10/15/06, Kedar, Shahar <Shahar.Kedar@softwareag.com> wrote:
>
>
>
>
> Hi,
>
>
>
> Can someone explain to me when and where the {ref} attribute should be used
> inside an XML schema? Also, is it valid for an {element} to refer to a
> different {element} and not a {type}?
>
>
>
> Thanks,
>
> Shahar.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message