aspose file tools*
The moose likes XML and Related Technologies and the fly likes Three Optional Fields in a XML file but at least on of them is required Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Three Optional Fields in a XML file but at least on of them is required" Watch "Three Optional Fields in a XML file but at least on of them is required" New topic
Author

Three Optional Fields in a XML file but at least on of them is required

ismail hassani
Greenhorn

Joined: Feb 20, 2006
Posts: 9
Hi:

I'am trying to implement a validation rule for an XML file,in wich three elements element 1,element2 and element3 are optional,but it's necessary to have at least one of them.

<xs:element name="element1" minOccurs="0" maxOccurs="unbounded">
....
<xs:element name="element2" minOccurs="0" maxOccurs="unbounded">
.....
<xs:element name="element2" minOccurs="0" maxOccurs="unbounded">[/i]

Is it possible to implement this validation rule in XSD ?

Thank you
Ismail.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Three Optional Fields in a XML file but at least on of them is required