RE: [xsl] Ignoring Child Nodes using XPath

Subject: RE: [xsl] Ignoring Child Nodes using XPath
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Mon, 26 Mar 2001 10:57:51 +0100
> 	Is there a way in which I can
> select a node ignoring the child nodes
> as in the following example:
>
> What I have...
>
> <p align="left">
> Here <b>is</b> some content<br/>
> </p>
>
> What I want...
> <p alignt="left"></p>

There are many ways of ignoring the child nodes, in fact they will always be
ignored unless you specifically do something to access them.

Try
<xsl:template match="p">
  <xsl:copy/>
  <xsl:copy-of select="@*"/>
</xsl:template>

Mike Kay
Software AG


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


Current Thread