The <oda:array> tag means "for/while" in programming. It has two attributes:
- name="<name>" — Specifies the name of the element by which the
value will be retrieved from the cache. The value denotes the number of iterations
per cycle. The "*" symbol can be used instead of the name. In such cases,
you must specify the condition of the cycle break using the " breakValue =
"value" " attribute. For example:
<xs:element name="len" type="xs:int" oda:isArrayLength="" />
<oda:array name="len">
<xs:element name="BulgeAt" type="xs:double"/>
</oda:array>
- oda:breakValue="value | condition value" — Cycles that do not have
a specified number of iterations. Entrance to the cycle will be carried out
in the required order. The exit from the cycle will be made according to the
internal condition. To use this cycle, you must fulfill the following conditions:
- the attribute name in the <array> tag contains "*".
- the <array> tag has the "oda:breakValue" attribute.
- loop contains an element of an integer type with the "oda:isBreak =
"" " attribute.
"oda:breakValue" compares the value or uses the "greater / less than" condition.
- oda:breakValue="value" — Equal to. The value from "oda:breakValue"
is compared with the value of the element which is marked by the "oda:isBreak=""
" attribute. If the values are equal, the program exits from the <array>
tag. For example:
<oda:array name="*" oda:breakValue="0">
<xs:element name="someBreakElement" type="xs:int" oda:isBreak=""/>
<xs:element name="str" type="xs:string"/>
</oda:array>
- oda:breakValue=">value" — Greater than. If the value of the
element that is marked by "oda:isBreakValue" is greater than the value,
the loop is terminated. For example:
<oda:array name="*" oda:breakValue=">0">
<xs:element name="someBreakElement" type="xs:int" oda:isBreak=""/>
<xs:element name="str" type="xs:string"/>
</oda:array>
- oda:breakValue="<value" — Less than. If the value of the element
that is marked by "oda:isBreakValue" is less than the value, the loop
is terminated. For example:
<oda:array name="*" oda:breakValue="<0">
<xs:element name="someBreakElement" type="xs:int" oda:isBreak=""/>
<xs:element name="str" type="xs:string"/>
</oda:array>
-
oda:decreaseOn="numeric value" — Decrease the value taken from the
"name" attribute (or from the cache by key) by the number specified in
"oda:decreaseOn".
-
oda:increaseOn="numeric value" — Increases the value taken from the
"name" attribute (or from the cache by key) by the number specified in
"oda:increaseIn". For example:
<xs:element name="len" type="xs:int" oda:isArrayLength="" />
<oda:array name="len" oda:decreaseOn="1">
<xs:element name="x" type="xs:double"/>
<xs:element name="y" type="xs:double"/>
<xs:element name="z" type="xs:double"/>
</oda:array>
See Also
Working with the XML Scheme for Revision Control
Copyright © 2002 – 2021. Open Design Alliance. All rights reserved.
|
|