Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: Multiple Types for an element

From: "Xan Gregg" <Xan.Gregg@---.--->
To: "Shashikala Shamarao" <shashikala_shamarao@-----.--->, <xmlschema-dev@--.--->
Date: 4/2/2004 12:57:00 PM
Your message came through a bit garbled, but I think what you are trying =
to do might be best done with either substitution groups or xsi:type.  =
With xsi:type, you would define:
 
type anyHotel
type hotel1 derived from anyHotel
type hotel2 derived from anyHotel
element property1 of type anyHotel
 
then the instance would contain something like
 
<property1 xsi:type="hotel1" name="H1" address="A1"/>
 
xan

________________________________

From: xmlschema-dev-request@w... [mailto:xmlschema-dev-request@w...] =
On Behalf Of Shashikala Shamarao
Sent: Monday, March 29, 2004 8:19 PM
To: xmlschema-dev@w...
Subject: Multiple Types for an element



	Is there a way to define multiple types for an element?

	For example

	 ...

	but if I want an XML like below:

	 

	<Feature1>

	     <property1 name="H1" address1="A1"/>

	     <property1 name="H2" address1="A2"/>

	</Feature1>

	 

	How can I define XML Schema? Basically I want one property element to =
have hotel1 as type and other one as hotel2. Is there a way to do such =
things? If so could somebody please mail me a Schema which does that.

	 



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent