Re: [xsl] Matching words in OR

Subject: Re: [xsl] Matching words in OR
From: "J.Pietschmann" j3322ptm@xxxxxxxx
Date: Sun, 10 Dec 2006 21:17:23 +0100
> cruscio@xxxxxxxxx wrote:
> > Hi,
> > this is part of my XML:
> > 
> > <xml>
> >      <rowset:data>
> >         <target:row attr1=3D'1' attr2=3D'900' attr3=3D'ABC' attr4=3D'=
TREE-JOKER-BASEBALL-' />
> >      </rowset:data>
> > </xml>
> > 
> > In XSLT 1.0 need to create a regex to match values into attr4, so I n=
eed something "Perl" like attr4 =3D~/TREE|JOKER/ 
> > 
> > This is my query:
> > /xml/rowset:data/target:row[(@attr4 =3D '/TREE|JOKER/')] but doesn't =
work.
> 
> XSLT 1.0 doesn't use regular expressions (why do you think it does?)
> You have to decompose your requirement into available XPath functions,
> in your case
>   /xml/rowset:data/target:row[contains(@attr4,'TREE') or
>     contains(@attr4,'JOKER']
> should do the trick.
> 
> J.Pietschmann
> 
> =0A=0A=0A------------------------------------------------------=0AMutui=
 a tassi scontati da 40 banche. Richiedi online e risparmia...Servizio gr=
atuito. www.mutuionline.it=0Ahttp://click.libero.it/mutuionline11di06=0A

Current Thread