Group together nodes that have similar content. then return count of uniques.
Posted on 2006-06-05
Hi I am trying to create an incrementing positive integer value.
I will use this to logically sort information/data when it is presented to the client.
The values I want to parse are stored in the 'Reference' field of my XML data - Xpath attached.
I will get like 4 results with a reference of AAEDABJ179
then 6 with AAEDABJ180
then 2 with AAEDABJ181
what I need is to COUNT how many unique references there are in total (in the above example there would be 3)
RETURN THIS TOTAL VALUE and the constituant references as a pair
ideally I would like to be able to step through the results afterward like:
function ReplaceContent(sNodeName, sContent)
var i = 1; var oNode; var aNodes = document.getElementById(sNodeName);
while ( oNode = document.getElementById(sNodeName ) )
oNode.innerHTML = sContent;
oNode.id = oNode.id+'converted';
<xsl:for-each select="$er"> <!- where $er is cleverly doing something useful ! //-->
<xsl:if test="string-length(../Text) > 0">
ReplaceContent("<xsl:value-of select="ExternalRef"/>","<xsl:value-of select="$er"/>");
then use the 'n' value as incrementally increasing integer value (between 1 and say 10)
<div id="page(n)" style="padding:0px;overflow:hidden;display:block;">
<div style="position: absolute; top: 155px; right: 80px; left: 114px; width: 250px; height: 20px;" class="page(n)" id="SiteName">------ </div></div>
and setup 1 PAGE div for each of my unique refrences...
thanks in advance... if this need clarification then gimme a nudge, thanks