You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Noel O'Brien <no...@newbay.com> on 2009/07/17 12:25:36 UTC

XPath Assertion does not support "matches()"

Hi, 

I'm trying to use the XPath function "matches()" in my XPath assertions, but getting the following: 

Assertion failure message : TransformerException: Could not find function: matches for:matches(/feed/entry/link[1]/@href, ......) 

It looks like JMeter is invoking an XSLT 1.0 processor. Is it possible to add an XSLT 2.0 processor ? If so how can it be done? 

JMeter version:2.3.2 
Java Version: 1.6.0_12 
OS: Linux 

-- 
Regards, 
Noel 

Re: XPath Assertion does not support "matches()"

Posted by Deepak Shetty <sh...@gmail.com>.
sorry my mistake , it should be XPathFactory (and is only available from
JDK1.5) so I dont think Saxon can be plugged in without code change
regards
deepak


On Mon, Jul 20, 2009 at 10:01 AM, Noel O'Brien <no...@newbay.com> wrote:

> Hi,
>
> Thanks for your input Deepak. I'll give it a go and report back my findings
>
> Regards,
> Noel
>
> ----- "Deepak Shetty" <sh...@gmail.com> wrote:
> > Hi
> > Im not sure how JMeter works , but see if the
> >
> -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
> > can be used to specify the engine to be used for XSLT
> >
> > If Jmeter is using JAXP you could probably use whichever engine you want
> to
> > run the XPATH , if its using Xalan directly then short of writing your
> own
> > extension (or using BeanShell/Java samplers) I cant see any other way
> > regards
> > deepak
> >
> > On Mon, Jul 20, 2009 at 3:24 AM, Noel O'Brien <no...@newbay.com>
> wrote:
> >
> > > After further investigation, it appears Xalan does not yet support
> > > XSLT/XPath 2.0, and it doesn't look like there's much activity in it's
> > > implementation.
> > >
> > > Saxon-B 9.1 on the other hand supports XSLT/XPath 2.0. Are there any
> plans
> > > to include Saxon in JMeter? If not, is it much work to substitute Saxon
> for
> > > Xalan in JMeter 2.3.2?
> > >
> > > Regards,
> > > Noel
> > >
> > > ----- "Noel O'Brien" <no...@newbay.com> wrote:
> > > > Hi,
> > > >
> > > > I'm trying to use the XPath function "matches()" in my XPath
> assertions,
> > > but getting the following:
> > > >
> > > > Assertion failure message : TransformerException: Could not find
> > > function: matches for:matches(/feed/entry/link[1]/@href, ......)
> > > >
> > > > It looks like JMeter is invoking an XSLT 1.0 processor. Is it
> possible to
> > > add an XSLT 2.0 processor ? If so how can it be done?
> > > >
> > > > JMeter version:2.3.2
> > > > Java Version: 1.6.0_12
> > > > OS: Linux
> > > >
> > > > --
> > > > Regards,
> > > > Noel
> > > >
> > >
> > > --
> > > Regards,
> > > Noel
> > >
> >
>

Re: XPath Assertion does not support "matches()"

Posted by Noel O'Brien <no...@newbay.com>.
Hi, 

Thanks for your input Deepak. I'll give it a go and report back my findings 

Regards, 
Noel 

----- "Deepak Shetty" <sh...@gmail.com> wrote: 
> Hi 
> Im not sure how JMeter works , but see if the 
> -Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl 
> can be used to specify the engine to be used for XSLT 
> 
> If Jmeter is using JAXP you could probably use whichever engine you want to 
> run the XPATH , if its using Xalan directly then short of writing your own 
> extension (or using BeanShell/Java samplers) I cant see any other way 
> regards 
> deepak 
> 
> On Mon, Jul 20, 2009 at 3:24 AM, Noel O'Brien <no...@newbay.com> wrote: 
> 
> > After further investigation, it appears Xalan does not yet support 
> > XSLT/XPath 2.0, and it doesn't look like there's much activity in it's 
> > implementation. 
> > 
> > Saxon-B 9.1 on the other hand supports XSLT/XPath 2.0. Are there any plans 
> > to include Saxon in JMeter? If not, is it much work to substitute Saxon for 
> > Xalan in JMeter 2.3.2? 
> > 
> > Regards, 
> > Noel 
> > 
> > ----- "Noel O'Brien" <no...@newbay.com> wrote: 
> > > Hi, 
> > > 
> > > I'm trying to use the XPath function "matches()" in my XPath assertions, 
> > but getting the following: 
> > > 
> > > Assertion failure message : TransformerException: Could not find 
> > function: matches for:matches(/feed/entry/link[1]/@href, ......) 
> > > 
> > > It looks like JMeter is invoking an XSLT 1.0 processor. Is it possible to 
> > add an XSLT 2.0 processor ? If so how can it be done? 
> > > 
> > > JMeter version:2.3.2 
> > > Java Version: 1.6.0_12 
> > > OS: Linux 
> > > 
> > > -- 
> > > Regards, 
> > > Noel 
> > > 
> > 
> > -- 
> > Regards, 
> > Noel 
> > 
> 

Re: XPath Assertion does not support "matches()"

Posted by Deepak Shetty <sh...@gmail.com>.
Hi
Im not sure how JMeter works , but see if the
-Djavax.xml.transform.TransformerFactory=net.sf.saxon.TransformerFactoryImpl
can be used to specify the engine to be used for XSLT

If Jmeter is using JAXP you could probably use whichever engine you want to
run the XPATH , if its using Xalan directly then short of writing your own
extension (or using BeanShell/Java samplers) I cant see any other way
regards
deepak

On Mon, Jul 20, 2009 at 3:24 AM, Noel O'Brien <no...@newbay.com> wrote:

> After further investigation, it appears Xalan does not yet support
> XSLT/XPath 2.0, and it doesn't look like there's much activity in it's
> implementation.
>
> Saxon-B 9.1 on the other hand supports XSLT/XPath 2.0. Are there any plans
> to include Saxon in JMeter? If not, is it much work to substitute Saxon for
> Xalan in JMeter 2.3.2?
>
> Regards,
> Noel
>
> ----- "Noel O'Brien" <no...@newbay.com> wrote:
> > Hi,
> >
> > I'm trying to use the XPath function "matches()" in my XPath assertions,
> but getting the following:
> >
> > Assertion failure message : TransformerException: Could not find
> function: matches for:matches(/feed/entry/link[1]/@href, ......)
> >
> > It looks like JMeter is invoking an XSLT 1.0 processor. Is it possible to
> add an XSLT 2.0 processor ? If so how can it be done?
> >
> > JMeter version:2.3.2
> > Java Version: 1.6.0_12
> > OS: Linux
> >
> > --
> > Regards,
> > Noel
> >
>
> --
> Regards,
> Noel
>

Re: XPath Assertion does not support "matches()"

Posted by Noel O'Brien <no...@newbay.com>.
After further investigation, it appears Xalan does not yet support XSLT/XPath 2.0, and it doesn't look like there's much activity in it's implementation. 

Saxon-B 9.1 on the other hand supports XSLT/XPath 2.0. Are there any plans to include Saxon in JMeter? If not, is it much work to substitute Saxon for Xalan in JMeter 2.3.2? 

Regards, 
Noel 

----- "Noel O'Brien" <no...@newbay.com> wrote: 
> Hi, 
> 
> I'm trying to use the XPath function "matches()" in my XPath assertions, but getting the following: 
> 
> Assertion failure message : TransformerException: Could not find function: matches for:matches(/feed/entry/link[1]/@href, ......) 
> 
> It looks like JMeter is invoking an XSLT 1.0 processor. Is it possible to add an XSLT 2.0 processor ? If so how can it be done? 
> 
> JMeter version:2.3.2 
> Java Version: 1.6.0_12 
> OS: Linux 
> 
> -- 
> Regards, 
> Noel 
> 

-- 
Regards, 
Noel