Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > XML > XML
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
XML General XML discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XML section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Closed Thread
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old April 28th, 2004, 02:26 PM
Registered User
Join Date: Apr 2004
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to guozhang
Default Restrict elements


I have a complex type element which can take three possible child elements, of which one is a must and only one of the other two can appear. I am not sure how to apply the restriction.

Specifically, the fundSrc_ID element must appear but either org_id or OtherGranteeOrg should appear but not both.

How to prevent org_id and OtherGranteeOrg from both appearing?

Any idea/help is appreciated.


Sample XML Schema element:
<xs:element name="rec" maxOccurs="unbounded">
                        <xs:element name="fundSrc_ID" type="FundSrc_ID_Type"/>
                        <xs:element name="org_ID" type="Org_ID_Type" minOccurs="0"/>
                        <xs:element name="OtherGranteeOrg" type="xs:string" minOccurs="0"/>
                    <xs:attribute name="CADR_ID" type="CADRIDType" use="required"/>

Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to: Restrict access to paged data jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 April 5th, 2007 05:50 AM
restrict to paste values only jcellens Excel VBA 1 July 18th, 2006 11:36 AM
restrict entry to only one cell in a row sriramus Access VBA 1 March 3rd, 2006 02:14 PM
how to restrict strings with particular characters srini XSLT 6 November 28th, 2003 07:03 AM

All times are GMT -4. The time now is 10:31 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.