我想计算ST段下的所有段

时间:2017-01-03 13:26:32

标签: xslt xpath soa

我是XSL transforamtion的新手,我对XSLT创建知之甚少。我有一个场景,通过使用XSL转换来计算以下XML中复杂元素下的所有Complex元素。我需要计算复杂的元素,然后我必须将该计数分配给变量。任何可能的解决方案。

XML

<fdsggfdsg>
    <ST>
        <e01_0143>2222</e01_0143>
    </ST>
    <BIG>
        <e01_0373>222222</e01_0373>
        <e02_0076>22222</e02_0076>
        <e04_0324>222</e04_0324>
        <e07_0640>22</e07_0640>
    </BIG>
    <CUR>
        <e01_0098>22</e01_0098>
        <e02_0100>22</e02_0100>
    </CUR>
    <REF>
        <e01_0128>22</e01_0128>
        <e02_0127/>
        <cmp01>
            <e01_0128>22</e01_0128>
            <e02_0127>2222-222</e02_0127>
        </cmp01>
    </REF>
    <LOOP_N1_g001>
        <N1>
            <e01_0098>22</e01_0098>
            <e02_0093>2222222</e02_0093>
            <e04_0067>24ddf</e04_0067>
        </N1>
        <N2>
            <e01_0093>dfsafd</e01_0093>
        </N2>
        <N3>
            <e01_0166>dsafdsf</e01_0166>
            <e02_0166/>
        </N3>
        <N4>
            <e01_0019>dsfafdsadf</e01_0019>
            <e03_0116>dafsaf</e03_0116>
            <e04_0026>sdfsa</e04_0026>
        </N4>
    </LOOP_N1_g001>
    <LOOP_N1_g001>
        <N1>
            <e01_0098>dfsdf</e01_0098>
            <e02_0093>dsfdsfdfdf fdd</e02_0093>
        </N1>
        <N2>
            <e01_0093>dsfafsaf</e01_0093>
            <e02_0093>cxvdsfsa</e02_0093>
        </N2>
        <N3>
            <e01_0166/>
            <e02_0166/>
        </N3>
        <N4>
            <e01_0019>dsfcvvx</e01_0019>
            <e04_0026>fsdfds</e04_0026>
        </N4>
    </LOOP_N1_g001>
    <LOOP_N1_g001>
        <N1>
            <e01_0098>sfsdI</e01_0098>
            <e02_0093/>
        </N1>
        <N3>
            <e01_0166/>
        </N3>
        <N4>
            <e01_0019/>
            <e04_0026/>
        </N4>
    </LOOP_N1_g001>
    <LOOP_N1_g001>
        <N1>
            <e01_0098>dsfsfdsT</e01_0098>
            <e02_0093>SpadsV</e02_0093
                <e03_0066>fdfxcccsddf</e03_0066>
                <e04_0067>sdfdfcv</e04_0067>
            </N1>
            <N2>
                <e01_0093>kj,nm,mn,</e01_0093>
            </N2>
            <N3>
                <e01_0166>ythgfhd</e01_0166>
                <e02_0166/>
            </N3>
            <N4>
                <e01_0019>Jghbvvc</e01_0019>
                <e03_0166>cvbdfgdh</e03_0166>
                <e04_0026>ghgfhbvn</e04_0026>
            </N4>
        </LOOP_N1_g001>
        <LOOP_IT1_g006>
            <IT1>
                <e01_0350>gfhgvb</e01_0350>
                <e02_0358>fghfd</e02_0358>
                <e03_0355>d</e03_0355>
                <e04_0212>b</e04_0212>
                <e05_0639>fgfdg</e05_0639>
                <e06_0235>VP</e06_0235>
                <e07_0234>bvcvb-vb-c</e07_0234>
                <e08_0235>frgfg</e08_0235>
                <e09_0234/>
                <e11_0234>sfdgdgfdsg</e11_0234>
            </IT1>
            <TXI>
                <e01_0963>fgvcb</e01_0963>
                <e02_0782>fdgdg</e02_0782>
            </TXI>
            <CTP>
                <e02_0236>fgdsg</e02_0236>
                <e03_0212>fdgf</e03_0212>
            </CTP>
            <LOOP_SLN_g009>
                <PID>
                    <e01_0349>F</e01_0349>
                    <e05_0352>fdgvfg</e05_0352>
                </PID>
            </LOOP_SLN_g009>
        </LOOP_IT1_g006>
        <TDS>
            <e01_0610>213760</e01_0610>
        </TDS>
        <TXI>
            <e01_0963>fg</e01_0963>
            <e02_0782>213760</e02_0782>
        </TXI>
        <LOOP_SAC_g014>
            <TXI>
                <e01_0963>vcv</e01_0963>
                <e02_0782>213760</e02_0782>
            </TXI>
        </LOOP_SAC_g014>
</fdsggfdsg>

0 个答案:

没有答案