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

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

From: Romain Deltour <rdeltour@gmail.com>
Date: Fri, 30 Jul 2010 14:29:58 +0200
Cc: XProc Dev <xproc-dev@w3.org>
Message-Id: <18CBD28C-3451-410F-BFF3-E9140C671759@gmail.com>
To: Alex Muir <alex.g.muir@gmail.com>
Wouldn't the following work ?

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

Romain.

Le 30 juil. 10 à 14:18, Alex Muir a écrit :

> 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:30:40 GMT

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