Subject: Re: [xsl] XSLT: check if value is whitespace(s) From: "M. David Peterson" <m.david@xxxxxxxxxx> Date: Wed, 11 Aug 2004 07:50:37 -0600 |
Off the top of my head it seems the easiest would be to use the translate function within the select attribute of a variable to convert spaces into non-spaces (nothing) and then use a simple boolean test to determine what to do next if it returns false... For example...
<xsl:variable name="testWhiteSpace" select="translate(foo/bar, ' ', '')" />
<xsl:if test="$testWhiteSpace"> ...do something </xsl:if>
Untested.
Hope this helps!
<M:D/>
Ralph Holz wrote:
Hi,
is there a way to check if a given value is whitespace(s) only? A function maybe?
Thanks, Ralph
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT: check if value is w, M. David Peterson | Thread | Re: [xsl] XSLT: check if value is w, xptm |
RE: [xsl] Count Words, xptm | Date | Re: [xsl] XSLT: check if value is w, Ralph Holz |
Month |