у меня есть на входДобавить общее количество и добавить его в новый тег
<Invoice>
<Invoice_Details>
<Consolidated_Invoice_ID>1</Consolidated_Invoice_ID>
<Line>1</Line>
<Gross_Invoice_Amount>1110</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>1</Consolidated_Invoice_ID>
<Line>2</Line>
<Gross_Invoice_Amount>1110</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>2</Consolidated_Invoice_ID>
<Line>1</Line>
<Gross_Invoice_Amount>2220</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>2</Consolidated_Invoice_ID>
<Line>2</Line>
<Gross_Invoice_Amount>2220</Gross_Invoice_Amount>
</Invoice_Details>
</Invoice>
Я хочу вывод в формате:
<Invoice>
<Invoice_Details>
<Consolidated_Invoice_ID>1</Consolidated_Invoice_ID>
<Line>1</Line>
<Gross_Invoice_Amount>1110</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>1</Consolidated_Invoice_ID>
<Line>2</Line>
<Gross_Invoice_Amount>1110</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>1</Consolidated_Invoice_ID>
<Line>3</Line>
<Gross_Invoice_Amount>22220</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>2</Consolidated_Invoice_ID>
<Line>1</Line>
<Gross_Invoice_Amount>2220</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>2</Consolidated_Invoice_ID>
<Line>2</Line>
<Gross_Invoice_Amount>2220</Gross_Invoice_Amount>
</Invoice_Details>
<Invoice_Details>
<Consolidated_Invoice_ID>2</Consolidated_Invoice_ID>
<Line>3</Line>
<Gross_Invoice_Amount>4440</Gross_Invoice_Amount>
</Invoice_Details>
</Invoice>
значений счета ID и значение строки должны быть созданы как новые элементы, которые добавляют брутто всех одинаковых идентификаторов.
Условие: Значение брутто требуется только в том случае, если по крайней мере одно значение брутто в любом из доступных идентификаторов. Если брутто не является avilable, то оно не требуется.
добавьте либо XSLT-1.0 тег или XSLT-2.0 и конкретно о версии XSLT, которую вы используете. – Madeyedexter
Soa принимает обе версии..thanks –