Falthon Posted September 22, 2007 Share Posted September 22, 2007 I want to allow several elements to be unbounded, but I don't need them to be in a particular order. <xs:sequence> <xs:element ref="Duration" minOccurs="1" maxOccurs="1" /> <xs:element ref="ScriptURL" minOccurs="1" maxOccurs="1" /> <xs:element ref="StimulusSignal" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="FreeNode" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="ProtectedNode" minOccurs="0" maxOccurs="unbounded" /> <xs:element ref="ExclusiveNode" minOccurs="0" maxOccurs="unbounded" /> </xs:sequence> I can't use <all>, since that wouldn't allow them to be unbounded. Is there a way to allow them to be in any order? Or is it considered preferable to require elements to be in a fixed sequence? It's not a major problem; I'm just trying to figure out best practices. I appreciate any clarification you can provide. Link to comment Share on other sites More sharing options...
cdesai Posted December 31, 2007 Share Posted December 31, 2007 Your code is correct. Only you have to remove <sequence> tag to achieve your result. By removing <sequence> tag, you can structure those elements in any order within particular element.nJoy coding...Always!!! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.