Subject: Re: [xsl] Testing Text From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 07 Jan 2009 12:11:44 -0500 |
pases the current node to a string function, so the function argument is the string value of the node, which is all the character data of the descendants.
You want something like
<xsl:template match="*"> <xsl:if test="contains(text(),'@')">@ found in <xsl:value-of select="name(.)"/></xsl:if>
or
<xsl:template match="text()"> <xsl:if test="contains(.,'@')">@ found in <xsl:value-of select="name(..)"/></xsl:if>
<p>Here's my @ text</p> <p>Here's my <i>extra special @</i> text</p>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Testing Text, David Carlisle | Thread | Re: [xsl] Testing Text, David Carlisle |
Re: [xsl] XSLT, Web applications, a, Wendell Piez | Date | Re: [xsl] XSLT, Web applications, a, Dave Pawson |
Month |