$like$ operator in XSL
Is there a $like$ operator in XSL, which can do a 'like' search, like SQL's
LIKE keyword?
# 1 Re: $like$ operator in XSL
"Yuenan Yang" <yuenan@idcglobal.com> wrote:
>
>Is there a $like$ operator in XSL, which can do a 'like' search, like SQL's
>LIKE keyword?
I would use JScript's String.match(rgExp) to do that.
<xsl:if test=...> can be used to do that
Rohit
# 2 Re: $like$ operator in XSL
Yuenan,
The XPath contains() function
Greg
Yuenan Yang <yuenan@idcglobal.com> wrote in message
news:38fd0e76$1@news.dev-archive.com...
>
> Is there a $like$ operator in XSL, which can do a 'like' search, like
SQL's
> LIKE keyword?
# 3 Re: $like$ operator in XSL
So no $like$ operator in select pattern at all?
# 4 Re: $like$ operator in XSL
Yuenan,
I'm sorry I wasn't clearer. The XPath 'contains' function is very similar
to the SQL 'Like' operator.
Greg Longtin
"Yuenan Yang" <yuenan@idcglobal.com> wrote in message
news:38fe5f17$1@news.dev-archive.com...
>
> So no $like$ operator in select pattern at all?
# 5 Re: $like$ operator in XSL
The question is, in XSL (http://www.w3.org/TR/WD-xsl),
We can use
<xsl:for-each select="person[@firstname $iqe$ 'yuenan']" order-by="lastname">,
is there a solution like,
<xsl:for-each select="person[@firstname $like$ 'uen']" order-by="lastname">
?
# 6 Re: $like$ operator in XSL
Yuenan,
Final answer (sorry, couldn't resist). AFAIK, not in
http://www.w3.org/TR/WD-xsl without script.
http://www.w3.org/1999/XSL/Transform does allow it...
Sorry,
Greg
Yuenan Yang <yuenan@idcglobal.com> wrote in message
news:38ff0d86$1@news.dev-archive.com...
>
> The question is, in XSL (http://www.w3.org/TR/WD-xsl),
> We can use
> <xsl:for-each select="person[@firstname $iqe$ 'yuenan']"
order-by="lastname">,
> is there a solution like,
>
> <xsl:for-each select="person[@firstname $like$ 'uen']"
order-by="lastname">