473,898 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

(How to create)duplicat e nodes with different types in XSD shema

Guys!
Is there are any possibility to create nodes with duplicate
names and different types in XSD? I've read the whole specification and
tried in a many different ways, but not successfull.
--
Thank you for any help,
Dmitry Kulinich,
Ukrain,
ISD company,
EPE
Feb 19 '07 #1
4 2623
Dmitry Kulinich wrote:
Is there are any possibility to create nodes with duplicate
names and different types in XSD? I've read the whole specification and
tried in a many different ways, but not successfull.
It is a question of scope, you can have e.g.

<xs:element name="root">
<xs:complexType >
<xs:sequence maxOccurs="unbo unded">
<xs:element name="element1" >
<xs:complexType >
<xs:sequence>
<xs:element name="example" type="xs:string "/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="element2" >
<xs:complexType >
<xs:sequence>
<xs:element name="example" type="xs:double "/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

with an instance document of e.g.

<root>
<element1>
<example>Kibo </example>
</element1>
<element2>
<example>3.1415 927</example>
</element2>
</root>

without problems.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 19 '07 #2
Thanks Martin.
Problem doesn't belong to scope.
I must to create xsd shema for html <tabletag with
a lot <tr>s and <td>s that contains different nodes.

Shcema is needed 4 junit testing of our rendering functionality.

"Martin Honnen" <ma*******@yaho o.dewrote in message
news:45******** *************** @newsspool4.arc or-online.net...
Dmitry Kulinich wrote:
>Is there are any possibility to create nodes with duplicate
names and different types in XSD? I've read the whole specification and
tried in a many different ways, but not successfull.

It is a question of scope, you can have e.g.

<xs:element name="root">
<xs:complexType >
<xs:sequence maxOccurs="unbo unded">
<xs:element name="element1" >
<xs:complexType >
<xs:sequence>
<xs:element name="example" type="xs:string "/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="element2" >
<xs:complexType >
<xs:sequence>
<xs:element name="example" type="xs:double "/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>

with an instance document of e.g.

<root>
<element1>
<example>Kibo </example>
</element1>
<element2>
<example>3.1415 927</example>
</element2>
</root>

without problems.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Feb 19 '07 #3
Dmitry Kulinich wrote:
I must to create xsd shema for html <tabletag with
a lot <tr>s and <td>s that contains different nodes.
If you provide some sample then perhaps someone is able to help develop
a schema for it or give a definitive answer that it is not possible.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Feb 19 '07 #4
ok he is my fragment - it is exactly what I need but it doesn't work. I've
plaid a little bit with dinamic type definition (throught different types in
enumeration . but it also does'n work)
We have a few nodes with similar names and different types - that the
point:
<xsd:element name="TABLE">

<xsd:complexTyp e>

<xsd:sequence >

<xsd:element ref="TBODY"/>

</xsd:sequence>

</xsd:complexType >

</xsd:element>
<xsd:element name="TBODY">

<xsd:complexTyp e>

<xsd:element ref="TR" type="headerTR"/>

<xsd:element ref="TR" type="dataLines TR"/>

</xsd:complexType >

</xsd:element>

<xsd:complexTyp e name="headerTR" >

<xsd:sequence >

<xsd:element name="TH" type="xsd:strin g" fixed="Process ID"/>

<xsd:element name="TH" type="xsd:strin g" fixed="Activity ID"/>

<xsd:element name="TH" type="xsd:strin g" fixed="Instance ID"/>

<xsd:element name="TH" type="xsd:strin g" fixed="Process Description"/>

</xsd:sequence>

</xsd:complexType >

<xsd:complexTyp e name="dataLines TR">

<xsd:sequence >

<xsd:element name="TD" >

<xsd:complexTyp e>

<xsd:sequence >

<xsd:element name="SCRIPT">

<xsd:complexTyp e>

<xsd:attribut e name="LANGUAGE" type="xsd:strin g" fixed="JavaScri pt"
use="required"/>

<xsd:attribut e name="SRC" type="xsd:strin g"
fixed="componen ts/js/component.js" use="required"/>

</xsd:complexType >

</xsd:element>

<xsd:element name="A" fixed="TEST_QUE UE_LIST">

<xsd:complexTyp e>

<xsd:simpleCont ent>

<xsd:extensio n base="xsd:strin g">

<xsd:attribut e name="ID" type="xsd:strin g" use="required"/>

<xsd:attribut e name="NAME" type="xsd:strin g"
fixed="control1 2082_TEST_QUEUE _LIST_hidden" use="required"/>

<xsd:attribut e name="HREF" type="xsd:strin g" fixed="test_hre f"
use="required"/>

<xsd:attribut e name="TABINDEX" type="xsd:integ er" fixed="1" use="required"/>

</xsd:extension>

</xsd:simpleConte nt>

</xsd:complexType >

</xsd:element>

</xsd:sequence>

</xsd:complexType >

</xsd:element>

<xsd:element name="TD" type="xsd:strin g" fixed="ACT8744"/>

<xsd:element name="TD" type="xsd:strin g" fixed="00000213 76"/>

<xsd:element name="TD" type="xsd:strin g" fixed="TEST_QUE UE_LIST 2006-12-28
14:32:06.12"/>

</xsd:sequence>

</xsd:complexType >
"Martin Honnen" <ma*******@yaho o.dewrote in message
news:45******** *************** @newsspool1.arc or-online.net...
Dmitry Kulinich wrote:
>I must to create xsd shema for html <tabletag with
a lot <tr>s and <td>s that contains different nodes.

If you provide some sample then perhaps someone is able to help develop a
schema for it or give a definitive answer that it is not possible.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Feb 19 '07 #5

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

Similar topics

2
4249
by: Laertes | last post by:
Hi, I would like to create a table that will allow only two records per date entered. So you should be able to input as many dates as you like, but you can have each date only twice! It's a database for patients receiving a specific treatment (We cannot have more than 2 patients/day). I want this restriction so as to ensure we don't overbook the rooms. At the moment I have to different tables , in each one of which the
3
1202
by: Justine | last post by:
Hi All, I have been trying to find out which one .net language like VB.NET, VC++.NET & C# to be used when. As i like C# programming, i would like to know How different & better is C#. I remember long time back an artical on the same. i did search a lot but found nothing.
0
929
by: Vlad Kirienko | last post by:
Hi, All! I create set of dynamic controls in OnInit() method and recreate them on every PostBack.
4
1235
by: Dega | last post by:
I have just been instructed to learn to VB.NET. I'm a SQL Server DBA but my main programming background is in VB6 and Java. I've looked online for a good overview of the syntax of VB.NET but I've come up empty. So, now I turn to you. How much different is it from VB6?
11
1724
by: JoeC | last post by:
I have been using C++ for several years now and I have been reading about nodes. I am a little confused. I understand many of the concepts behind this such as pointers and dynamic binding. My main problem is that I have yet to have a use for them in any of the projects. that I write. I wrote this from what I read about nodes. This is very simple program or object I wrote from what I read: public: color() : rc(0), rg(0), rb(0) {}...
0
1498
by: Morgan Cheng | last post by:
I use VS auto generated code to invoke a internal network webservice. The auto-generated code use class SoapHttpClientProtocol to do Soap-on- http communication. It turns out that for single SoapHttpClientProtocol instances, TCP connection is always maintained for reuse. This is understandable. Now, I have one load balancer between client and backend webservice cluster, so, single TCP connection for single invocation is prefer-ed. How...
1
14604
by: ShambhuHubli | last post by:
Hi ! I am developing front end for some application using Python Tkinter. And I am new to this GUI development. In my application, I have to create buttons other than square or rectangle. I want buttons something like Oval(or any other shape). I searched a lot.. But could'nt get. If any of you know please help me out. Thanks in advance.
3
10954
by: rajeshkrsingh | last post by:
Hi friends, Step1- create table duplicate ( intId int, varName varchar(50) ) insert into duplicate(intId,varName) values(1,'rajesh') insert into duplicate(intId,varName) values(2,'raj12') insert into duplicate(intId,varName) values(1,'rajesh')
2
4027
by: nomvula | last post by:
hi guys i need some help to duplicate records on my form datasheet: here's the example of my form results: ClientLookup DateCaptured ForecastDate Description ForecastQuantity Forecast Actual UJ 18-Apr-08 01-Mar-08 Fees: Asset 1 R 31,200.00 R 31,200.00 NMBM 22-Apr-08 23-Mar-08 P-MI (E) 07/2006 3 R 47,485 R 38,849 i have 200 records deplayed in the form i'm using access2007 and i have a command button which is the built in command button to...
0
9993
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9839
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11254
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10854
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8034
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4701
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4295
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3303
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.