이것은 내 첫 번째 질문에 대한 stackoverflow입니다. 나는이 같은 XML이 : 나는 태그/securityBasketDefinition/루트/securityBasketComponentNew [X]를 태그/레이블 아래의 레이블과 일치 할 필요가XSLT for-each on xml
<securityBasketDefinition>
<securityBasketComponents>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>5536</securityLabel>
<securityMarket>PT GOV</securityMarket>
<securityDisplayLabel>PGB 3.85 15APR21</securityDisplayLabel>
</securityId>
<weight>0.022041737</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>2941</securityLabel>
<securityMarket>IT GOV</securityMarket>
<securityDisplayLabel>BTP 3.75 1MAR21</securityDisplayLabel>
</securityId>
<weight>0.204042787</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>5542</securityLabel>
<securityMarket>FR GOV</securityMarket>
<securityDisplayLabel>FRTR 3.75 25APR21</securityDisplayLabel>
</securityId>
<weight>0.228670367</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>12897</securityLabel>
<securityMarket>BE GOV</securityMarket>
<securityDisplayLabel>BGB 3.000 28SEP19 - OLO67</securityDisplayLabel>
</securityId>
<weight>0.029298111</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
</securityBasketComponents>
<root>
<securityBasketComponentNew>
<label>4905</label>
<securityId>AT0000386115</securityId>
<weight>0.039597771</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>2862</label>
<securityId>AT0000A0VRF9</securityId>
<weight>0.020257355</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>2867</label>
<securityId>BE0000318270</securityId>
<weight>0.053516328</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>12897</label>
<securityId>BE0000327362</securityId>
<weight>0.028389328</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>4848</label>
<securityId>FI4000010848</securityId>
<weight>0.019722759</weight>
</securityBasketComponentNew>
</root>
</securityBasketDefinition>
을/securityBasketDefinition/securityBasketComponents/securityBasketComponent [X]/securityId/securityLabel/securityBasketDefinition/securityBasketComponents/securityBasketComponent [X]/weight 아래의 태그를/securityBasketDefinition/root/securityBasketComponentNew [X]/weight의 값으로 업데이트하는 것보다 훨씬 쉽습니다.
이 경우 수식 결과는 다음과 같아야합니다 작성된 긴 코드에 대한 도움말과 유감에 대한 모든
<securityBasketDefinition>
<securityBasketComponents>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>5536</securityLabel>
<securityMarket>PT GOV</securityMarket>
<securityDisplayLabel>PGB 3.85 15APR21</securityDisplayLabel>
</securityId>
<weight>0.022041737</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>2941</securityLabel>
<securityMarket>IT GOV</securityMarket>
<securityDisplayLabel>BTP 3.75 1MAR21</securityDisplayLabel>
</securityId>
<weight>0.039597771</weight> <== NEW VALUE
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>5542</securityLabel>
<securityMarket>FR GOV</securityMarket>
<securityDisplayLabel>FRTR 3.75 25APR21</securityDisplayLabel>
</securityId>
<weight>0.228670367</weight>
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
<securityBasketComponent>
<securityId>
<securityAlternateCodes/>
<securityLabel>12897</securityLabel>
<securityMarket>BE GOV</securityMarket>
<securityDisplayLabel>BGB 3.000 28SEP19 - OLO67</securityDisplayLabel>
</securityId>
<weight>0.028389328</weight> <== NEW VALUE
<nominalAmount>0.01</nominalAmount>
<componentPrice>0</componentPrice>
<componentType>bond</componentType>
</securityBasketComponent>
</securityBasketComponents>
<root>
<securityBasketComponentNew>
<label>2941</label>
<securityId>AT0000386115</securityId>
<weight>0.039597771</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>2862</label>
<securityId>AT0000A0VRF9</securityId>
<weight>0.020257355</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>2867</label>
<securityId>BE0000318270</securityId>
<weight>0.053516328</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>12897</label>
<securityId>BE0000327362</securityId>
<weight>0.028389328</weight>
</securityBasketComponentNew>
<securityBasketComponentNew>
<label>4848</label>
<securityId>FI4000010848</securityId>
<weight>0.019722759</weight>
</securityBasketComponentNew>
</root>
감사합니다.
에 오신 것을 환영합니다. 당신의 질문은 어디에 있습니까? –
@ michael.hor257k 제 질문은 어떻게 xslt 공식으로 결과를 얻을 수 있습니까? 나는 중첩 된 각각을 위해 2 개를 시도하지만 결과는 없다. –
시도한 내용과 실패한 이유를 보여주십시오. – WilQu