Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support composite conditions #35

Open
cduplichien opened this issue Feb 8, 2013 · 0 comments
Open

Support composite conditions #35

cduplichien opened this issue Feb 8, 2013 · 0 comments

Comments

@cduplichien
Copy link
Member

Thinking like:

<conditional>
   <!-- Allow one of the following condition types -->
   <if-any>
      <!-- rules here -->
   </if-any>
   <if-all>
      <!-- rules here -->
   </if-all>
   <if-none>
      <!-- rules here -->
   </if-none>
   <if-some atLeast="x" atMost="y">
      <!-- rules here -->
   </if-some>
   <!-- Allow one each of following consequences -->
   <then>
      <!-- rules here -->
   </then>
   <else>
      <!-- rules here, could also be conditionals if you wanted to have "else if" behavior -->
   <else>
</conditional>

Rather than code additonal thing to support on top of our nested rules conditional structure, I'd rig it up so that the validation parser creates Conditional objects (or whatever the implementation is) when it reads nested rules. So a nested rule would essentially parse as a conditional if-any with only one condition rule and the children as the "then" consequences.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant