473,321 Members | 1,622 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,321 software developers and data experts.

(How to create)duplicate 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 2585
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="unbounded">
<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.1415927</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*******@yahoo.dewrote in message
news:45***********************@newsspool4.arcor-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="unbounded">
<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.1415927</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:complexType>

<xsd:sequence>

<xsd:element ref="TBODY"/>

</xsd:sequence>

</xsd:complexType>

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

<xsd:complexType>

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

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

</xsd:complexType>

</xsd:element>

<xsd:complexType name="headerTR">

<xsd:sequence>

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

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

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

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

</xsd:sequence>

</xsd:complexType>

<xsd:complexType name="dataLinesTR">

<xsd:sequence>

<xsd:element name="TD" >

<xsd:complexType>

<xsd:sequence>

<xsd:element name="SCRIPT">

<xsd:complexType>

<xsd:attribute name="LANGUAGE" type="xsd:string" fixed="JavaScript"
use="required"/>

<xsd:attribute name="SRC" type="xsd:string"
fixed="components/js/component.js" use="required"/>

</xsd:complexType>

</xsd:element>

<xsd:element name="A" fixed="TEST_QUEUE_LIST">

<xsd:complexType>

<xsd:simpleContent>

<xsd:extension base="xsd:string">

<xsd:attribute name="ID" type="xsd:string" use="required"/>

<xsd:attribute name="NAME" type="xsd:string"
fixed="control12082_TEST_QUEUE_LIST_hidden" use="required"/>

<xsd:attribute name="HREF" type="xsd:string" fixed="test_href"
use="required"/>

<xsd:attribute name="TABINDEX" type="xsd:integer" fixed="1" use="required"/>

</xsd:extension>

</xsd:simpleContent>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

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

<xsd:element name="TD" type="xsd:string" fixed="0000021376"/>

<xsd:element name="TD" type="xsd:string" fixed="TEST_QUEUE_LIST 2006-12-28
14:32:06.12"/>

</xsd:sequence>

</xsd:complexType>
"Martin Honnen" <ma*******@yahoo.dewrote in message
news:45***********************@newsspool1.arcor-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
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...
3
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...
0
by: Vlad Kirienko | last post by:
Hi, All! I create set of dynamic controls in OnInit() method and recreate them on every PostBack.
4
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...
11
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...
0
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...
1
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...
3
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')...
2
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.