<Request xmlns:ns0="http://Request">
<Lines>
<Line>
<requestid>76</requestid>
<Code>C001</Code>
</Line>
<Line>
<requestid>77</requestid>
<Code>C002</Code>
</Line>
</Lines>
<Conflict>
<responseid>76</responseid>
<responsecode>WB</responsecode>
<cService>
<responseid>73</responseid>
<responsecode>HA</responsecode>
</cService>
<cService>
<responseid>7600</responseid>
<serviceCode>PP</serviceCode>
</cService>
</Conflict>
<Conflict>
<responseid>77</responseid>
<responsecode>WB7</responsecode>
<cService>
<responseid>745</responseid>
<responsecode>HAQ</responsecode>
</cService>
<cService>
<responseid>7234</responseid>
<serviceCode>PP</serviceCode>
</cService>
</Conflict>
<Conflict>
<responseid>77</responseid>
<responsecode>WBC</responsecode>
<cService>
<responseid>72341</responseid>
<responsecode>HAC</responsecode>
</cService>
<cService>
<responseid>98</responseid>
<responsecode>PPC</responsecode>
</cService>
</Conflict>
</Request>
必要な出力は次のようになります。
<Output xmlns:ns0="http://Response">
<Lines>
<Line>
<responseid>76</responseid>
<code>WB</code>
<Features>
<ExistingFeature>
<responseid>76</responseid>
<CFeature>
<responseid>76</responseid>
</CFeature>
<CFeature>
<responseid>76</responseid>
</CFeature>
</ExistingFeature>
</Features>
</Line>
<Line>
<Num>77</Num>
<Features>
<ExistingFeature>
<responseid>77</responseid>
<code>WB7</code>
<CFeature>
<responseid>77</responseid>
</CFeature>
<CFeature>
<responseid>77</responseid>
</CFeature>
<CFeature>
<responseid>77</responseid>
</CFeature>
<CFeature>
<responseid>77</responseid>
</CFeature>
</ExistingFeature>
</Features>
</Line>
</Lines>
</Output>
XSLTでこれを達成するのを手伝ってください。私は複数の方法で試していますが、xsltが苦手なのでできません。
シナリオ。実際には、入力の各行に対して 1 つの行が作成され、requestID (つまり 76 または 77) に基づいて、入力の各行ごとに 1 つ以上の競合が存在する必要があります。したがって、これらの ID に基づいて、入力内の行が出現するたびに出力内の単一のノードに競合をグループ化し、入力内の対応するすべての一致する競合をグループ化する必要があります。
このシナリオの xslt を書くのを手伝ってくれませんか。