我有下面的XMLXSLT分组与子元素的添加/组合
<InvestmentAccount Id="Element01_Source3_Sequqence002" Type="Standard" InvestmentStrategyId="Employer" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="4754.82" />
<Investment FundName="Fund034" FundValue="4643.48" />
<Investment FundName="Fund035" FundValue="2509.46" />
<Investment FundName="Fund038" FundValue="7104.71" />
<Investment FundName="Fund042" FundValue="4244.08" />
</InvestmentAccount>
<InvestmentAccount Id="Element01_Source4_Sequence003" Type="DWPRebate" InvestmentStrategyId="DSS" ParameterOverrideIds="DWPAllocationRateOverride">
<Investment FundName="Fund032" FundValue="1881.76" />
<Investment FundName="Fund034" FundValue="1584.18" />
<Investment FundName="Fund035" FundValue="872.99" />
<Investment FundName="Fund038" FundValue="2899.53" />
<Investment FundName="Fund042" FundValue="1762.62" />
</InvestmentAccount>
<InvestmentAccount Id="Element01_Source2_Sequence001" Type="Standard" InvestmentStrategyId="Employee" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="7395.91" />
<Investment FundName="Fund034" FundValue="7222.72" />
<Investment FundName="Fund035" FundValue="3903.52" />
<Investment FundName="Fund038" FundValue="11051.32" />
<Investment FundName="Fund042" FundValue="6602.54" />
</InvestmentAccount>
<InvestmentAccount Id="Element02_Source2_Sequence004" Type="TransferNonPR" InvestmentStrategyId="Employee" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="1439.29" />
<Investment FundName="Fund034" FundValue="1614.31" />
<Investment FundName="Fund035" FundValue="863.68" />
<Investment FundName="Fund038" FundValue="2153.80" />
<Investment FundName="Fund042" FundValue="1306.45" />
</InvestmentAccount>
<InvestmentAccount Id="Element03_Source2_Sequence005" Type="TransferNonPR" InvestmentStrategyId="Employee" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="9617.42" />
<Investment FundName="Fund034" FundValue="10787.03" />
<Investment FundName="Fund035" FundValue="5771.18" />
<Investment FundName="Fund038" FundValue="14391.20" />
<Investment FundName="Fund042" FundValue="8729.81" />
<Investment FundName="fictiousextra" FundValue="1414" />
</InvestmentAccount>
我希望做的是在那里InvestmentStrategyId和类型相同,是与上面的最后2的情况下(为了清晰起见重新排序)是FundName与基金价值总和相同的地方。在这种情况下,每边都有相同的情况,但每边可能会多出一些或少一些。
所以结果是我需要访问FundName和FundValue或者我可以总结一个或者已经总结的值。
帮助!
对,所以这是我试图实现的输出。
<InvestmentAccount Id="Element01_Source3_Sequence002" Type="Standard" InvestmentStrategyId="Employer" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="4754.82" />
<Investment FundName="Fund034" FundValue="4643.48" />
<Investment FundName="Fund035" FundValue="2509.46" />
<Investment FundName="Fund038" FundValue="7104.71" />
<Investment FundName="Fund042" FundValue="4244.08" />
</InvestmentAccount>
<InvestmentAccount Id="Element01_Source4_Sequence003" Type="DWPRebate" InvestmentStrategyId="DSS" ParameterOverrideIds="DWPAllocationRateOverride">
<Investment FundName="Fund032" FundValue="1881.76" />
<Investment FundName="Fund034" FundValue="1584.18" />
<Investment FundName="Fund035" FundValue="872.99" />
<Investment FundName="Fund038" FundValue="2899.53" />
<Investment FundName="Fund042" FundValue="1762.62" />
</InvestmentAccount>
<InvestmentAccount Id="Element01_Source2_Sequence001" Type="Standard" InvestmentStrategyId="Employee" ParameterOverrideIds="AllocationRateOverride">
<Investment FundName="Fund032" FundValue="7395.91" />
<Investment FundName="Fund034" FundValue="7222.72" />
<Investment FundName="Fund035" FundValue="3903.52" />
<Investment FundName="Fund038" FundValue="11051.32" />
<Investment FundName="Fund042" FundValue="6602.54" />
</InvestmentAccount>
<!-- THIS ONE IS THE SUMMED COMBINTION DUE TO InvestmentStrategyId and Type being multiply occuring -->
<InvestmentAccount ...>
<Investment FundName="Fund032" FundValue="11056.71" />
<Investment FundName="Fund034" FundValue="12401.34" />
<Investment FundName="Fund035" FundValue="6634.86" />
<Investment FundName="Fund038" FundValue="16545" />
<Investment FundName="Fund042" FundValue="10036.26" />
<Investment FundName="fictiousextra" FundValue="1414" />
</InvestmentAccount>
包括存在于1中而不是其他中的任何FundNames。
我要补充,我使用.NET 4.0
你能提供一些输出吗?不知道你想做什么。 – FailedDev