Subject: RE: [xsl] removing duplicate nodes From: "Chris Bayes" <Chris@xxxxxxxxxxx> Date: Thu, 19 Jul 2001 01:01:40 +0100 |
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@xxxxxxxxxxxxxxxxxxxxxx >[mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]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@xxxxxxxxxx> >>To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx >>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@xxxxxxxxxxxxxxxx >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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] removing duplicate nodes, B. Tommie Usdin | Thread | RE: [xsl] removing duplicate nodes, Uslu, Cihan Y (MED) |
RE: [xsl] Shorthand for XPath expre, Chris Bayes | Date | RE: RES: [xsl] Namespace, Chris Bayes |
Month |