[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: XSLT 2.0 matches function (Saxon)

Subject: RE: [xsl] XSLT 2.0 matches function (Saxon)
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 8 Aug 2005 00:11:47 +0100
xslt 2.0 matches
It would help to know what the run-time error is. It might mean nothing to
you, but it probably means something to someone.

You haven't given any evidence that the select="beforebreak" is actually
selecting the element you've shown.

Michael Kay
http://www.saxonica.com/
 

> -----Original Message-----
> From: Marcin Milkowski [mailto:milek_pl@xxxxx] 
> Sent: 07 August 2005 23:26
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] XSLT 2.0 matches function (Saxon)
> 
> Hi,
> 
> I'm having some difficulty in using matches() function with 
> Saxon. Works 
> beautifully with strings but not with variables.
> The element beforebreak in my xml input file contains a regexp:
> 
> <beforebreak>[\.\?!]+</beforebreak>
> 
> I try to use it for matching a string in a second file (in a variable 
> $segmented_file:
> 
>    <xsl:variable name="before" select="beforebreak"/>
>    <xsl:value-of select='matches($segmented_file//Raw, $before)'/>
> 
> This gives me a runtime error. I tried concatenation of apostrophes 
> around the value of beforebreak but to no avail.
> 
> This however works:
> 
>    <xsl:value-of select='matches($segmented_file//Raw, "[\.\?!]+")'/>
> 
> What am I doing wrong?
> 
> Regards,
> 	Marcin

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.