473,386 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

One element correspond with two or more types?

Is it posible that one element correspond with two or more types? The example below could be implemented?

<xsd:element name="MyElement" type="type1 or type2" />

<xsd:complexType name="type1">
*** ......
</xsd:complexType>

<xsd:complexType name="type2">
*** ......
</xsd:complexType>
Nov 12 '05 #1
2 1189


Knighterrant wrote:
Is it posible that one element correspond with two or more types? The
example below could be implemented?

<xsd:element name="MyElement" type="type1 or type2" />

<xsd:complexType name="type1">
......
</xsd:complexType>

<xsd:complexType name="type2">
......
</xsd:complexType>


You can do a union of simple types but not complex types, see section
2.5 in <http://www.w3.org/TR/xmlschema-2/>.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Nov 12 '05 #2
regretted...
Martin Honnen 写道:


Knighterrant wrote:
Is it posible that one element correspond with two or more types? The
example below could be implemented?

<xsd:element name="MyElement" type="type1 or type2" />

<xsd:complexType name="type1">
......
</xsd:complexType>

<xsd:complexType name="type2">
......
</xsd:complexType>

You can do a union of simple types but not complex types, see section
2.5 in <http://www.w3.org/TR/xmlschema-2/>.

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Wolfgang Lipp | last post by:
<annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with the consent of their authors. -- _w.lipp </annotation> From:...
5
by: Patient Guy | last post by:
In my reading of the Strict and Transitional DTD for HTML 4.0, the table row (TR) elements are contained within table section elements: THEAD, TFOOT, and TBODY. The table section elements are...
0
by: Knighterrant | last post by:
Is it posible that one element correspond with two or more types? The example below could be implemented? &lt;xsd:element name="MyElement" type="type1 or type2" /&gt; &lt;xsd:complexType...
3
by: jparulan | last post by:
Hi All, I'm using SOAP3.0. I was able to successfully call a WSDL file and get a value properly. But when the WSDL changed to have a MULTIPLE <element name> it was failing. This code works...
2
by: Istvan Loerincz | last post by:
Hi ! "The all element provides an XML representation that describes an unordered set of element types." But for minOccurs, and maxOccurs I can only use "0" or "1". How can I achieve that I...
2
by: Arndt Jonasson | last post by:
This is a modelling style question, I think. I am working with a somewhat XML Schema-like formalism which defines the structure of an instance document, supplying a number of built-in types (a...
12
by: Eric Layman | last post by:
Hi, What's the difference between a normal web element: <input type="text" id="txtname" name="txtname" runat="server"> vs webcontrol text box: <asp:Textbox id="username" Columns="10"...
37
by: Richard Heathfield | last post by:
candide said: They aren't. An array is an array. An address is a pointer value. These are not the same thing. If you mean that &array and &array are the same, they aren't. They have different...
53
by: Aaron Gray | last post by:
Due to M$'s stupidity in not making DOMElements first class citizens the following will not work :- function isElement( o) { return o instanceof Element } It works for FF, Opera and Safari.
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.