мне нужно применить XSLT 1.0 преобразование к следующему XML:XSLT 1.0 Группирование
<ProfitLossFinancials>
<ProfitLossFinancial>
<Year>2013</Year>
<Turnover>13</Turnover>
<Profit>13</Profit>
</ProfitLossFinancial>
<ProfitLossFinancial>
<Year>2012</Year>
<Turnover>12</Turnover>
<Profit>12</Profit>
</ProfitLossFinancial>
</ProfitLossFinancials>
<BalanceSheetFinancials>
<BalanceSheetFinancial>
<Year>2013</Year>
<FixedAssets>13</FixedAssets>
</BalanceSheetFinancial>
<BalanceSheetFinancial>
<Year>2011</Year>
<FixedAssets>11</FixedAssets>
</BalanceSheetFinancial>
</BalanceSheetFinancials>
иметь следующий вывод:
<Financials>
<Financial>
<Year>2013</Year>
<Turnover>13</Turnover>
<Profit>13</Profit>
<FixedAssets>13</FixedAssets>
</Financial>
<Financial>
<Year>2012</Year>
<Turnover>12</Turnover>
<Profit>12</Profit>
<FixedAssets/>
</Financial>
<Financial>
<Year>2011</Year>
<Turnover/>
<Profit/>
<FixedAssets>11</FixedAssets>
</Financial>
</Financials>
Как сделать это?
Не ясно, что вы пытаетесь достичь – sajay
@salay - пожалуйста, посмотрите на ожидаемых результатах - мне нужно сгруппировать элементы из разных родителей на год. – jlp