|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Removing attributes in a generic way ...
Sure:
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
<xsl:template match="@last_name"/>
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: Charles Ohana [mailto:charles.ohana@xxxxxxxxxxxxxx]
> Sent: 12 October 2005 20:54
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Removing attributes in a generic way ...
>
> Hello,
> I'm trying to remove some attributes in a generic way. see
> example below. I
> need to remove all last_name attributes regardless of the node.
> Is there a generic way .
>
> Thanks in advance.
>
>
> Original document
> <root>
> <person first_name="Dave" last_name="Rowe">
> <person first_name="Sandra" last_name="Smith" />
> </person>
> <person first_name="Patrick" last_name="Sullivan" />
> </root>
>
>
> Expected output
> <root>
> <person first_name="Dave">
> <person first_name="Sandra" />
> </person>
> <person first_name="Patrick" />
> </root>
|
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








