How to group by a value in xslt
<p>I am having an xml with item values</p>

<pre><code>&lt;value1&gt;
        &lt;OrderLine OrderedQty="1.00" Type="cancel" &gt;
            &lt;Item ItemID="1234"&gt;                
            &lt;/Item&gt;
        &lt;/OrderLine&gt;
        &lt;OrderLine OrderedQty="1.00" Type="cancel" &gt;
            &lt;Item ItemID="1234"&gt;
            &lt;/Item&gt;
        &lt;/OrderLine&gt;
        &lt;OrderLine OrderedQty="1.00" Type="blabla" &gt;
            &lt;Item ItemID="1234"&gt;
            &lt;/Item&gt;
        &lt;/OrderLine&gt;
        &lt;OrderLine OrderedQty="1.00" Type="asdsd" &gt;
            &lt;Item ItemID="4567"&gt;
            &lt;/Item&gt;
        &lt;/OrderLine&gt;
&lt;/value1&gt;
</code></pre>

<p>I want to get the item id's which are not canceled but some of them are canceled.The item 4567 nothing is done to it so we wont update it.</p>

<pre><code>&lt;item&gt;
&lt;id&gt;1234&lt;/id&gt;
&lt;quantity&gt;1&lt;/quantity&gt;
&lt;/item&gt;
</code></pre>

<p>XSLT:</p>

<pre><code>    &lt;xsl:stylesheet version="2.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"&gt;
    &lt;tns:Root-Element&gt;    
      &lt;xsl:for-each-group select="/value1/OrderLine" group-by="Item/@ItemID"&gt;

      &lt;/xsl:for-each-group&gt;
&lt;/tns:Root-Element&gt;
</code></pre>

<p>I dont have much xsl code.I need to update the orders which are not canceled.If you take itemid 4567 there is no change so we dont want anything form it.</p>