xsl-list
[Top] [All Lists]

RE: XSLT 2.0 matches function (Saxon)

2005-08-07 16:11:47
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(_at_)o2(_dot_)pl] 
Sent: 07 August 2005 23:26
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>