xsl-list
[Top] [All Lists]

RE: Do a copy of a document but avoid duplicates in certain lists of tags

2003-10-27 10:57:29
Probably the "ul" element is in the XHTML namespace. You need to declare
a prefix for this namespace in your stylesheet and write
match="xhtml:ul".

Michael Kay

-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of 
Lenz, Georg
Sent: 27 October 2003 16:15
To: 'XSL-List(_at_)lists(_dot_)mulberrytech(_dot_)com'
Subject: [xsl] Do a copy of a document but avoid duplicates 
in certain lists of tags




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(_dot_)lenz(_at_)sap(_dot_)com



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



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



<Prev in Thread] Current Thread [Next in Thread>