[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Removing duplicates

Subject: RE: Removing duplicates
From: Clay Leeds <cleeds@xxxxxxxxxx>
Date: Tue, 22 Oct 2002 13:04:25 -0700
trc rc
James,

Thanks for the reply. Unfortunately, it doesn't work as I'd hoped. It only displays one item. My programmer tells me that I only need to check for TRC elements (thought I'd need one each for RCs *&* TRCs & would've renamed your TEMPLATE :-).

I've got multiple DETAILLINEs, each of which can have multiple RCDATALINE elements. As a result, "preceding::*" doesn't seem to work, as it will look in other DETAILLINEs, see those and assume it shouldn't display them either. Unfortunately, it is my understanding that "preceding-sibling::*" will only look at the one sibling adjacent to current(). Hence, since I've got a possibility of 6, that won't work.

I've pasted a better XML EXAMPLE below (with parent::* elements).

Thanks for your help!

Clay

BTW, the header for your e-mail appears funky (note the date):

From: "James Carlyle" <james.carlyle@xxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE:  Removing duplicates
Date: Thu, 17 Oct 2002 20:24:45 +0100
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0)
Importance: Normal
Sender: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx

Since today is Monday, Oct 22, 2002, your message appeared at the bottom of my InBox.


XML EXAMPLE:
<DETAIL>
  <DETAILLINE>
    <SERVDESC>
      <SERVICE>99215</SERVICE>
    </SERVDESC>
    <QTY>  1</QTY>
    <CHARGE>   193.00</CHARGE>
    <RCDATA>
      <RCDATALINE>
        <RC>43</RC>
        <TRC>14</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>01</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
    </RCDATA>
  </DETAILLINE>
  <DETAILLINE>
    <SERVDESC>
      <SERVICE>20550</SERVICE>
    </SERVDESC>
    <QTY>  1</QTY>
    <CHARGE>   150.00</CHARGE>
    <RCDATA>
      <RCDATALINE>
        <RC>01</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
    </RCDATA>
  </DETAILLINE>
  <DETAILLINE>
    <SERVDESC>
      <SERVICE>20550</SERVICE>
    </SERVDESC>
    <QTY>  1</QTY>
    <CHARGE>   150.00</CHARGE>
    <RCDATA>
      <RCDATALINE>
        <RC>66</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>01</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
    </RCDATA>
  </DETAILLINE>
  <DETAILLINE>
    <SERVDESC>
      <SERVICE>29876</SERVICE>
    </SERVDESC>
    <QTY>  1</QTY>
    <CHARGE>  2800.00</CHARGE>
    <RCDATA>
      <RCDATALINE>
        <RC>01</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>04</RC>
        <TRC>02</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC></RC>
        <TRC></TRC>
      </RCDATALINE>
    </RCDATA>
  </DETAILLINE>
  <DETAILLINE>
    <SERVDESC>
      <SERVICE>99212</SERVICE>
    </SERVDESC>
    <QTY>  1</QTY>
    <CHARGE>    75.00</CHARGE>
    <RCDATA>
      <RCDATALINE>
        <RC>10</RC>
        <TRC>03</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>12</RC>
        <TRC>03</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>24</RC>
        <TRC>10</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>22</RC>
        <TRC>10</TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>03</RC>
        <TRC></TRC>
      </RCDATALINE>
      <RCDATALINE>
        <RC>09</RC>
        <TRC>03</TRC>
      </RCDATALINE>
    </RCDATA>
  </DETAILLINE>
</DETAIL>


- Clay Leeds - Web Developer/Programmer - cleeds@xxxxxxxxxx


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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.