473,770 Members | 4,718 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

About schema : duplicate element definition or reference

cr
Could somebody tell me whether the use of duplicate element definition
or reference are permitted in XML schemas?

For example:

<complexType name="PurchaseO rderType">
<sequence>
<element name="shipTo" type="string"/>
<element name="shipTo" type="string"/>
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~
<element name="billTo" type="ipo:Addre ss"/>
<element ref="ipo:commen t" minOccurs="0"/>
<element ref="ipo:commen t" minOccurs="2"/>
~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~ ~~~~~~~~~~~~
<element name="Items" type="ipo:Items "/>
</sequence>
<attribute name="orderDate " type="date"/>
</complexType>

In XMLSpy 5.0 this schema fragment can pass the validation.
The element "shipTo" is duplicate defined, why it can pass the
validation.
And how can I distinguish the element "ipo:commen t" in xml instance?
Jul 20 '05 #1
0 1465

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

Similar topics

0
3275
by: peterpeter | last post by:
Hi. There is a XML schema problem that I have with key/keyref: I have two complex (A and B) types which both inherit from a common base typ (Base). A refers B using a xs:IDREF element named Ref_to_A. Both are allowed to be instantiated under the root element by declaring an element of the base class. I want to have type safety for the reference by using key/keyref.
2
4579
by: John Jørgensen | last post by:
Hi How do I express - in XSD - that an element can contain a sequenced list of elements, and one of these elements may occur (0-n times) at BOTH sequence position x AND y? Example: <PRIORITY sorting="900"/> <NAMEINFO> subtags and data
1
1372
by: obsolete_5 | last post by:
is it possible? more specifically, a simple example: i want a 'table' element to have a sequence of 'entry' elements. i know you can use minOccur = maxOccur = x, to enforce table to have x entry elements in it. but this x value needs to be hardcoded in the schema.
3
1834
by: Kanchana D S | last post by:
Hi, I am trying to design the schema for an XML file. The approach that I am planning to follow is to have 2 XSD files, each containing some relevant information about the elements in the instance document and then planning to automatically generate the XML file from these 2 schema files using the XMLSpy tool.
2
9236
by: Shailendra Batham | last post by:
Hello Gurus, I want to put some restrictions on my attribute tag in my XML Schema, anyone out there have any idea how to do that. here is my XML and the XML Schema <?xml version="1.0" encoding="utf-8"?> <Book ID="1000000000"> <Name>XML Basic</Name> <Comments>Whatever</Comments>
0
1841
by: XSD-optimist | last post by:
I am trying to generate the classes for an XSD schema using the Microsoft XSD Object Code Generator (XSDObjGen). I am having a schema that contains the definition of the following: 1. a complex type 'ExternalDestinationBaseComplexType' 2. abstract element 'ExternalDestinationDefinitionEntry' of type 'ExternalDestinationBaseComplexType' 3. two elements 'SAP' and 'Dir' of type ExternalDestinationBaseComplexType with substitutionGroup set...
12
2430
by: steve_marjoribanks | last post by:
I'm fairly new to XML and schemas and I'm trying to work out why a schema I've been given keeps throwing up validation errors in XMLSpy. The section of code with the problem is: <!--============= Element =============--> <element name="conResults" type="agsml:CongArrayType" substitutionGroup="agsml:_congProperty"/> <!--============= ComplexType =============--> <complexType name="CongArrayType"> <complexContent>
1
1579
by: mflll | last post by:
How does one say in one schema that one wants an element defined in another schema. For example, I want to include in the Employee definition, an Address element defined in the schema http://test.org.Address Here is the schema defining the Employee: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://test.org/emp" xmlns="http://test.org/emp"
2
567
by: bmichel | last post by:
Regarding the XSD schema shown below, I want to modifiy it so that: - the "owner_id" attribute in the "dog" element to exist in one of the "owner" element "id" attribute. - the "id" attribute in the "owner" element is unique. How should I modify the XSD? Examples (in the xml): Example 1 should be validated == Example 1 ==
0
9432
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
10059
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
10008
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9873
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
8891
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...
1
7420
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
5313
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...
1
3974
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
3
2822
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.