 |
 |
 |
I have the following fragment repeated mulitple times and need to sum the SKU_QUANTITY and transform the XML based upon a grouping of the SKU_TIE, SKU_NUMBER, and MFG_PART_NUM, ie display the resulting node-set where these element values are the same.
<SKU_INFO>
<DETAIL_SEQ_NUMBER>11</DETAIL_SEQ_NUMBER>
<SKU_TIE>1</SKU_TIE>
<SKU_NUMBER>223344</SKU_NUMBER>
<SKU_QUANTITY>2</SKU_QUANTITY>
<MFG_PART_NUM>1234A</MFG_PART_NUM>
<ITEM_TYPE_CODE>N</ITEM_TYPE_CODE>
<SKU_DESCRIPTION>SI,MOD</SKU_DESCRIPTION>
<BASE_SKU_FLAG>y</BASE_SKU_FLAG>
</SKU_INFO>
<SKU_INFO>..........
I've attempted to do this with the xslt key() function however I've been unable to group these keys distinctively. Here's how I've delcared the keys and attempted the grouping
......
<xsl:key name="sku_tie" match="SKU_INFO" use="SKU_TIE" />
<xsl:key name="sku_num" match="SKU_INFO" use="SKU_NUMBER" />
<xsl:key name="part" match="SKU_INFO" use="MFG_PART_NUM" />
<xsl:template match="/" >
<!-- i'm not sure how to accomplish the grouping however with the keys....
<xsl:for-each select="key('header_id', /CustomerOrder/headerID)" >
<xsl:for-each select="key('sku_tie', SKU_TIE)" >
........
Any help is greatly appreciated
--
MEC6304
|
 | 



|  |
These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.
|  |
| |
 |
 |
 |