OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

cam message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Nuances with Choices and Repeatable nodes.


Dear all,
  in the XSD world there are pseudo nodes called choices and selects.  These may have their own bounds for number of occurrences.  This means that you can have structures which are a choice of three items.  but the choice can be repeated.  The result is in effect an unordered list of the three possible options.
 
  In CAM these pseudo nodes do not exist and as a result it is not as straight forward to indicate these type of structures.
 
  Firstly CAM can be processed in such a way that order of nodes is not important.  However, this choice with repeat needs to be allowed so the following rules will be used to access this structure:
 
  1) any set of nodes that has the same xpath used within a setChoice and makeRepeatable will be regarded as a repeating choice and the result is a set of nodes in any order and any number in total.  This is equivalent to an 'unbounded' maxOccurrs on the xsd choice pseudo node.
 
  2) if situation exists as defined in 1) and a setLimit is defined with the same xpath then the repeating choice will be a lists of the choices items in any order up to the Limit value of occurrences.  This is equivalent to the XSD choice pseudo node having a maxOccurs set to an integer value.
 
 
the second use case is that of a set of choice nodes being defined but some of those nodes are allowed to occur more than once.  This is defined by defining the setChoice to the set of nodes required and then using a different xpath for the makeRepeatable and the  setLimit.  This will then be interpreted to mean you have a choice of nodes but some or all can be repeated, but not mixed wit other nodes from the choice.
 
This is all a bit complex and does show that some thought had taken place in the definition of the XSD pseudo nodes.  However, CAM can handle these structures well.
 
Martin


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]