W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2010

How to pass "([^"]+)" as a parameter in p:xslt

From: Alex Muir <alex.g.muir@gmail.com>
Date: Fri, 30 Jul 2010 12:18:43 +0000
Message-ID: <AANLkTimfXo3GyeLHCfsXrZtj=APX3eB9+jtm2C6qNnV6@mail.gmail.com>
To: XProc Dev <xproc-dev@w3.org>
Hi,

I'm trying to pass the regex "([^"]+)" as a parameter with p:xslt to match
on "stuff" in double quotes but having trouble getting the correct escaping.


THIS:
<p:with-param  name="regex" select='"([^"]+)"'/>

GIVES:
SEVERE:
file:/C:/XSLT/Project%20Files%20Form%2010-K/SRC/text/10K-RegexBased/processExecutionTesting/executions/createi4EnrichIns
xpl:970:54:err:XD0023:XPath syntax error at char 5 in {"([^"]+}:
    Unexpected token "]" beyond end of expression

THIS
<p:with-param  name="factRegex" select="&quot;([^&quot;]+)&quot;"/>

GIVES:
SEVERE:
file:/C:/XSLT/Project%20Files%20Form%2010-K/SRC/text/10K-RegexBased/processExecutionTesting/executions/createi4EnrichIns
xpl:970:54:err:XD0023:XPath syntax error at char 5 in {"([^"]+}:


How does one pass "([^"]+)" as a parameter in p:xslt?


Is there an equivalent to the following in xproc?
    <xsl:variable name="regex">
      <xsl:text>"([^"]+)"</xsl:text>
    </xsl:variable>


Executing with Calabash

Thanks
Alex Muir
Received on Friday, 30 July 2010 12:19:18 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 30 July 2010 12:19:18 GMT