Subject: Re: [xsl] deleting nodes that does not have attribute From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx> Date: Thu, 9 Aug 2001 18:10:57 +0100 |
Hi Mo, > I want to copy everything from the input xml... Then you need an identity transformation: <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()" /> </xsl:copy> </xsl:template> > except the nodes that does not have any attibues. The only things that can have attributes are elements, so I guess you want to just exclude the elements that don't have attributes (not exclude text just because they can't have attributes!). So you need another template that overrides the identity template by doing nothing. This template has to match elements that don't have attributes, so: <xsl:template match="*[not(@*)]" /> I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] deleting nodes that does not , Mohammed Rahman | Thread | [xsl] Controlling number of occurre, Jennifer Hochgesang |
Re: [xsl] count with variables?, Jeni Tennison | Date | RE: [xsl] xalan-j2 D7: StreamSource, Michael Kay |
Month |