[xsl] showing unique element values only

Subject: [xsl] showing unique element values only
From: "Keith" <keith@xxxxxxxxxxxxx>
Date: Wed, 31 Jan 2001 12:07:36 -0600
Good day everyone,
I haven't posted a question in a while, but this one's got me..
consider the following xmlDoc structure..
	<ACHFee feeID="xx">
	<ACHFee feeID="xx">
	etc. etc.
What I have been trying to accomplish  is creating a table-formatted page
that goes through each ACHFee/feeLevelBottom, feeVolumeBottom and
feeSubmissionBottom and builds a cell. In the cell I have the current()
Bottom element using format-number(), then it's
following-sibling::fee------Top, also using format-number().  The same type
of table is set up for each of the 'bottom' elements.  Since this is a
'fee-structure' table, infinite combinations can be created.  Using
functions such as 'split' or 'combine'(ie, split the first 0-1,000 cell into
a 0-500 cell and a 500.01-1,000 cell or combine a 0-1,000 cell with a
1,001-infinity cell)
I've tried manipulating the order of the ACHFee element with  <xsl:sort
select="feeLevelBottom"/> and so-on. I've used every combination of
preceding::,  following::, following-sibling:: that I can come up with, but
I still cannot make ONLY UNIQUE cell contents be displayed
========================snippet of xsl ==========
<xsl:for-each select="//ACHFee/feeLevelBottom">
<xsl:sort select="."/>
<xsl:if test="position()='1' or position()=last() or number(.) !=
number(preceding::*/feeLevelBottom)"><!--also used
preceding::ACHFee/feeLevelBottom and about a million other variations-->
	<form name="xxx" id="Level" class="AdjustBuyRate">
	<input type="hidden" name="feeLevelBottom"..>
		<xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute>
	<input type="hidden" name="feeLevelTop" ...>
		<xsl:attribute name="value"><xsl:value-of
	<td align="center" valign="middle">
		===============this is just for my testing=======
	<br/>this=<xsl:value-of select="number(.)"/><br/><!-- this gives the
correct number-->
select="number(preceding::ACHFee/feeLevelBottom)"/><br/><!--this however
gives me the previous number in reverse document order, not  sort order,
there for my preceding !=  current test fails and the cell contents get
	<xsl:value-of select="format-number(.,'$#,###,###.00')"/><xsl:text> -
</xsl:text><xsl:if test="following-sibling::feeLevelTop
	<input type="text" name="splitLevel" ...>
		<xsl:attribute name="class">L<xsl:value-of
	<xsl:text>   </xsl:text>
	<input type="button"
	<xsl:if test="position()!='1'">
	<input type="button" name="combineL"...onclick="javascript:AdjustFees

any ideas on how to get this accomplished would be greatly appreciated!
Keith Brooks
Software Developer
Global eTelecom

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread