I have big xml file for which I need to make webform. This xml file describes input fields whicn must be in this form and validation rules for them.
Examples of conditions ([x][y][z] denotes fields which are described in this file)
<control id="1" name="стр. 01 месяц: число от 1 до 12 или не заполнена" condition="isnull( { [1][1][3] }, 0 ) |>| 0" rule="12 |>=| isnull( { [1][1][3] }, 0 ) |>=| 1" tip="1" />
<control id="2" name="стр.04 число от 1 до 12 или не заполнена" condition="isnull( { [1][4][3] }, 0 ) |>| 0" rule="12 |>=| isnull( { [1][4][3] }, 0 ) |>=| 1" tip="1" />
<control id="3" name="стр.12 гр.3≥ стр.13 гр.3" condition="" rule="isnull( { [2][12][3] }, 0 ) |>=| isnull( { [2][13][3] }, 0 )" tip="1" />
<control id="4" name="стр.14 гр.3≥ стр.15 гр.3" condition="" rule="isnull( { [2][14][3] }, 0 ) |>=| isnull( { [2][15][3] }, 0 )" tip="1" />
<control id="5" name="Если стр.14 графа 3>0, то стр.12 графа 3>0" condition="isnull( { [2][14][3] }, 0 ) |>| 0" rule="isnull( { [2][12][3] }, 0 ) |>| 0" tip="1" />
<control id="6" name="если стр. 22 > 0, то стр. 18 > стр. 22" condition="isnull( { [4][22][3] }, 0 ) |>| 0" rule="isnull( { [3][18][3] }, 0 ) |>| isnull( { [4][22][3] }, 0 ) " tip="1" />
<control id="7" name="стр. 28 гр. 4 = сумме данных по свободным строкам к строке 29 по графе 4" condition="" rule="isnull( { [5][28][4] }, 0 ) |=| SUM(isnull( { [5][29][4][*] }, 0 ))" tip="1" />
<control id="8" name="стр. 30≤стр.28 графа 4" condition="" rule="isnull( { [5][28][4] }, 0 ) |>=| isnull( { [6][30][3] }, 0 ) " tip="1" />
<control id="9" name="Если стр. 29 графа 4 ≠ 0 по кодам ОКВЭД относящимся к классу 45, то стр. 30 ≤ стр. 29 по кодам ОКВЭД относящимся к классу 45, либо = 0" condition="SUM(isnull( { [5][29][4][45.4,45.11,45.11.1,45.11.2,45.11.3,45.12,45.21,45.21.1,45.21.2,45.21.3,45.21.4,45.21.5,45.21.51,45.21.52,45.21.53,45.21.54,45.21.6,45.21.7,45.22,45.23,45.23.1,45.23.2,45.24,45.24.1,45.24.2,45.24.3,45.24.4,45.25,45.25.1,45.25.2,45.25.3,45.25.4,45.25.5,45.25.6,45.31,45.32,45.33,45.34,45.41,45.42,45.43,45.44,45.44.1,45.44.2,45.45,45.50] }, 0 )) |>| 0" rule="SUM(isnull( { [5][29][4][45.4,45.11,45.11.1,45.11.2,45.11.3,45.12,45.21,45.21.1,45.21.2,45.21.3,45.21.4,45.21.5,45.21.51,45.21.52,45.21.53,45.21.54,45.21.6,45.21.7,45.22,45.23,45.23.1,45.23.2,45.24,45.24.1,45.24.2,45.24.3,45.24.4,45.25,45.25.1,45.25.2,45.25.3,45.25.4,45.25.5,45.25.6,45.31,45.32,45.33,45.34,45.41,45.42,45.43,45.44,45.44.1,45.44.2,45.45,45.50] }, 0 )) |>=| isnull( { [6][30][3] }, 0 )" tip="1" />
Some fields from file
<section code="1" name="Раздел 1. Общие сведения о юридическом лице" nb="0">
<columns>
<column code="1" type="B" name="Наименование">
<default-cell column="1" format="C(250)" inputType="0" />
</column>
<column code="2" type="B" name="№ строки">
<default-cell column="2" format="C(5)" inputType="0" />
</column>
<column code="3" type="Z" name="Графа 0">
<default-cell column="3" format="N(15,2)" inputType="1" />
</column>
</columns>
<rows>
<row code="" type="C" name="1.1. Дата начала выпуска товаров и оказания услуг (данным юридическим лицом) ">
<cell column="3" format="N(15,2)" inputType="1" />
</row>
<row code="1" type="F" name="месяц">
<cell column="3" dic="" format="N(2,0)" inputType="2" />
</row>
<row code="2" type="F" name="год">
<cell column="3" dic="" format="N(4,0)" inputType="2" />
</row>
How can I parse those rules?
