xsl-list
[Top] [All Lists]

Re: XSLT 2.0 matches function (Saxon)

2005-08-07 16:31:48
Michael Kay wrote:
It would help to know what the run-time error is. It might mean nothing to
you, but it probably means something to someone.

I thought I was making some stupid mistake evident to anyone but me. Here's the err msg:

Error at xsl:value-of on line 18 of file:/F:/Dane/tymczas/xliff/saxon/segment.xsl: FORX0002: net.sf.saxon.type.RegexTranslator$RegexSyntaxException: Error at character 2 in regular expression: bad escape sequence

Transformation failed: Run-time errors were reported

I got no error on using quotes around $before but then I got "false" everytime in the output as nothing matched (and it should, given the contents of beforebreak).

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

I checked that with a template:

<xsl:template match="//rule[(_at_)break='yes']">
  <xsl:variable name="before" select="beforebreak"/>
  <xsl:value-of select="$before"/>
  <!-- xsl:value-of select='matches($segmented_file//Raw, $before)'/ -->
    <xsl:apply-templates/>
  </xsl:template>


And I got the content of it in the output (I've five <rule> elements, and three of them have beforebreak filled in, so it got concatenated):

<?xml version="1.0" encoding="UTF-8"?>[\.\?!]+[\.\?!]+[\xff61\x3002\xff0e\xff1f\xff01]+

Does this sound like evidence?

Cheers,
        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>
--~--



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