Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XML
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old May 29th, 2006, 01:50 AM
Authorized User
 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kfir
Default restrictions on attributes

hello

in my schema I have an attribute (lets call it attr) in one of my elements. (it is not the only attribute in this element). for example:
<data class="instance" attr="AAA">
is there a way to write that if my class is intance(like in the example), so the attr attribute is not required, other wise it is required to all other data elements?

thanks

kfir
__________________
kfir
 
Old May 29th, 2006, 06:30 AM
mhkay's Avatar
Wrox Author
 
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

You're looking for what's called "co-occurrence constraints": it's a well known limitation of XML Schema 1.0 that you can't do this.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
 
Old May 30th, 2006, 04:35 AM
Authorized User
 
Join Date: Apr 2006
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to kfir
Default

so I can not write the limitation?


kfir





Similar Threads
Thread Thread Starter Forum Replies Last Post
Purpose of this forum and restrictions jminatel Visual Studio 2005 2 April 1st, 2007 11:56 PM
Forum purpose and restrictions jminatel Visual Basic 2005 Basics 2 June 7th, 2006 11:42 AM
restrictions kgoldvas XML 8 April 27th, 2006 03:27 AM
Purpose of this forum and restrictions jminatel Visual C++ 2005 0 July 21st, 2004 03:11 PM
Purpose of this forum and restrictions jminatel C# 2005 0 July 21st, 2004 03:09 PM





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