473,721 Members | 1,811 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 2612
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
4240
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
1197
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
922
by: Vlad Kirienko | last post by:
Hi, All! I create set of dynamic controls in OnInit() method and recreate them on every PostBack.
4
1232
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
1714
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
1494
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
14590
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
10946
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
4014
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
8834
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
9365
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
9212
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...
0
9056
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8002
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5973
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4483
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4748
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2127
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.