Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > About schema : duplicate element definition or reference

Reply
Thread Tools

About schema : duplicate element definition or reference

 
 
cr
Guest
Posts: n/a
 
      08-08-2003
Could somebody tell me whether the use of duplicate element definition
or reference are permitted in XML schemas?

For example:

<complexType name="PurchaseOrderType">
<sequence>
<element name="shipTo" type="string"/>
<element name="shipTo" type="string"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
<element name="billTo" type="ipo:Address"/>
<element ref="ipo:comment" minOccurs="0"/>
<element ref="ipo:comment" 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:comment" in xml instance?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Including element from one schema namespace in another schema namespace mflll@wiu.edu XML 1 07-20-2006 06:48 AM
[XML Schema] Including a schema document with absent target namespace to a schema with specified target namespace Stanimir Stamenkov XML 3 04-25-2005 09:59 AM
Schema - Definition for checking part of schema ? Abhinav XML 6 08-16-2004 06:24 PM
XML schema: duplicate element occurences John Jørgensen XML 2 07-09-2004 09:11 AM
per the active schema, the element <BR> must be included within a parent element MSNews ASP .Net 1 04-22-2004 04:45 PM



Advertisments