|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Deleting Duplicate Elements
Jan,
Try this: <xsl:template match="nl"> <xsl:if test="normalize-space(following-sibling::node()[1][self::text()]))"> {\par } </xsl:if> </xsl:template> What it does: it selects the node directly following the nl (following-sibling::node()[1]), checks if it's a text node [self::text()], and normalizes its space (collapses internal white space and trims leading and trailing space). If anything is left, we know the nl is followed directly by some text, so we generate the {\par }. It may require adjusting if your data is a bit different. It's not really deleting duplicate elements; rather it's a more straightforward approach (only acting on them if we want them). As for your English, I found two extremely minor errors in it. My posts often contain more than this! good job. Cheers, Wendell At 11:59 AM 4/15/2003, you wrote: Hello everybody, ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








