Prev | Current Page 842 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"

If omitted, the default value is false .
The RMulti constructor has the following signature:
RMulti( rule:Rule, ?atLeastOne:Bool );
The following rule requires that an element with the name book must contain an undefined number of
subelements with the name author. The sequence can be empty (no elements with the name author)
because the second argument of RMulti has been omitted.
var schema = RNode(???book???, RMulti(RNode(???author???)));
RL ist
The RList constructor defines many validation rules to apply to a set of nodes. Each rule is tested
sequentially if the second argument is true . The default value when the argument is omitted is false .
The constructor has the following signature:
RList( rules:Array < Rule > , ?ordered:Bool );
Part III: Extending the Possibilities
460
The following rule defines a validation rule for a node with the element name author that must have
subelements name and bio . If one of the child nodes is missing or the sequence is not correct, the
validation fails.
var schema = RNode(???author???, RList([RNode(???name???), RNode(???bio???)], true));
RC hoice
The RChoice constructor permits to build complex validation rules.


Pages:
830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854