This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes XML and Related Technologies and the fly likes Conditionals in schemas? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Conditionals in schemas?" Watch "Conditionals in schemas?" New topic
Author

Conditionals in schemas?

John Wetherbie
Rancher

Joined: Apr 05, 2000
Posts: 1449
I was wondering if it is possible to specify the following in a schema:
If I have one or more element A I must have at least one B. It would be even better if I can say that the number of B's can't exceed the number of A's. A and B are peer elements in an XML doc.
I haven't seen anything like this yet in the stuff I have read about schemas. Maybe I haven't read far enough yet.
Hmm, just thought of a way that I can avoid this for the specific application I am thinking of but am still very interested in find out if this is possible for more general casses.


The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Conditionals in schemas?