Subject: Re: [xsl] Testing if an element has an attribute From: Jörg Heinicke <joerg.heinicke@xxxxxx> Date: Mon, 08 Oct 2001 21:09:37 +0200 |
Hi all,
Does anyone know how to test if an element has an attribute?
I have an element person which may or may not contain an attribute name.
<person name="John"> <person >
I want to create a new element for each <person> , that has the name attribute.
I'm currently trying the following
<xsl:template match="person"> <xsl:if @name != ""> // this line is causing the problem
<xsl:element name="{@name}"> <xsl:apply-templates/> </xsl:if> </xsl:element> </xsl:template >
Any ideas?
Cheers, Marc
System Development VIRBUS AG Fon +49(0)341-979-7435 Fax +49(0)341-979-7409 joerg.heinicke@xxxxxxxxx www.virbus.de
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Testing if an element has, Michael Kay | Thread | Re: [xsl] Testing if an element has, Manu KY |
RE: [xsl] XML Schema/XSL conflict (, Evan Lenz | Date | Re: [xsl] A Counter Variable in XSL, Grant Mc Auley |
Month |