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

Do a copy of a document but avoid duplicates in certai

Subject: Do a copy of a document but avoid duplicates in certain lists of tags
From: "Lenz, Georg" <georg.lenz@xxxxxxx>
Date: Mon, 27 Oct 2003 17:15:20 +0100
certai

I have the following problem:

I want a perfect copy of an xhtml document but want avoid coping 
duplicates "li"s in all "ul" lists.

I tried:

	<xsl:template match="node()|@*">
		<xsl:copy>
			<xsl:apply-templates select="node()|@*"/>
		</xsl:copy>
	</xsl:template>	

	<xsl:template match="ul" >
		<xsl:comment>From Here</xsl:comment>
		<xsl:copy >
			<xsl:for-each select="li[not(.=following-sibling::li)]">
				<xsl:copy>
					<xsl:apply-templates select="node()|@*"/>
				</xsl:copy>
			</xsl:for-each>
		</xsl:copy>
	</xsl:template>

but it does not work.
It does not even touch the ul template?
If the document node would be "ul" it works???

Any help available.

Thanks in advance

Mit freundlichem Gruß / Best Regards
Georg Lenz
Java IDE Core
SAP AG

Neurottstrasse 16
69190 Walldorf
T   +49-6227-7-64235
F   +49-6227-7-74235
E   georg.lenz@xxxxxxx



 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.