This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: removing duplicate nodes


Cihan,
<xsl:template match="DEFN">
	<xsl:if test="text() != preceding::DEFN/text()">
		<xsl:value-of select="." />
	</xsl:if>
</xsl:template>

Ciao Chris

XML/XSL Portal 
http://www.bayes.co.uk/xml


>-----Original Message-----
>From: owner-xsl-list@lists.mulberrytech.com
>[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of B. Tommie
>Usdin
>Sent: 18 July 2001 23:50
>To: xsl-list
>Subject: [xsl] removing duplicate nodes
>
>
>>From: "Uslu, Cihan Y (MED)" <Cihan.Uslu@med.ge.com>
>>To: xsl-list@lists.mulberrytech.com
>>Subject: HELP:removing duplicate nodes
>>Date: Wed, 18 Jul 2001 11:21:39 -0500
>
>
>
>>Hi;
>>I have a XML document as following:
>>--------------------------------
>><glossary>
>>	<glossterm>
>>		<TERM>Cyst</TERM>
>>		<DEFN TargetUser="FE">fluid- filled (echo-free) with
>>well-defined walls and posterior acoustic enhancement</DEFN>
>>	</glossterm>
>>	<glossterm>
>>		<TERM>Cyst</TERM>
>>		<DEFN TargetUser="FE">fluid- filled (echo-free) with
>>well-defined walls and posterior acoustic enhancement</DEFN>
>>	</glossterm>
>>           <glossterm Language="English" Revision="1.0"
>>ProprietaryClass="A" CourseNum="US506" OriginatingGroup="LS"
>>Owner="Ultrasound Training">
>>		<TERM>Anechoic</TERM>
>>		<DEFN TargetUser="FE">refers to a structure that
>>transmits ultrasound without
>>						reflecting sound back to
>>its source.</DEFN>
>>	</glossterm>
>>	<glossterm Language="English" Revision="1.0"
>>ProprietaryClass="A" CourseNum="US506" OriginatingGroup="LS"
>>Owner="Ultrasound Training">
>>		<TERM>Echolucent</TERM>
>>		<DEFN TargetUser="FE">no echoes</DEFN>
>>	</glossterm>
>>            <glossterm>
>>		<TERM>Cyst</TERM>
>>		<DEFN TargetUser="FE">fluid- filled (echo-free) with
>>well-defined walls and posterior acoustic enhancement</DEFN>
>>	</glossterm>
>>
>>	<glossterm Language="English" Revision="1.0"
>>ProprietaryClass="A" CourseNum="US506" OriginatingGroup="LS"
>>Owner="Ultrasound Training">
>>		<TERM>Heterogenous</TERM>
>>		<DEFN TargetUser="FE">different textures</DEFN>
>>	</glossterm>
>>         ......
>>...
>>
>></glossary>
>>
>>----------------------------------------
>>
>>I want my output to be;
>>---------------------------------------------
>>Cyst: fluid- filled (echo-free) with well-defined walls and posterior
>>acoustic enhancement
>>Anechoic: refers to a structure that transmits ultrasound without
>>reflecting sound back to its source
>>Echolucent: no echoes
>>Heterogenous: different textures
>>-----------------------------------------------
>>
>>With my XSL scipt I get everything, including duplicate node with their
>>text nodes included. If there is a duplicate node and the text node is
>>same I dont want it in my output (if the text node is different then, I
>>want it to be shown) How can I do that?
>>Thank you for the help.
>>
>>Cihan
>
>
>-- 
>======================================================================
>B. Tommie Usdin                        mailto:btusdin@mulberrytech.com
>Mulberry Technologies, Inc.                http://www.mulberrytech.com  
>17 West Jefferson Street                           Phone: 301/315-9631
>Suite 207                                    Direct Line: 301/315-9634
>Rockville, MD  20850                                 Fax: 301/315-8285
>----------------------------------------------------------------------
>  Mulberry Technologies: A Consultancy Specializing in SGML and 
>XML              
>======================================================================
>
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]