Subject: Re: [xsl] XML attribute value to pattern match of the replace function From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Mon, 22 Feb 2010 12:23:39 +0100 |
You need to concat the attribute values e.g.
select="replace(., concat('(', @party1, '.*?', @party2, ')'), '<cite>$1</cite>')"
In case the xml content appear parenthesis () does not process the replace function can u suggest any other way.
Also I have tried below way, but does not working.
select="(concat('(', string(@party1), '.*?', string(@party2), ')'), '<cite>$1</cite>')"/>
Also I have tried the analyze-string method but it was working fine but
above issue was repeated.
Use the function defined here http://www.xsltfunctions.com/xsl/functx_escape-for-regex.html to escape the attribute values e.g.
Martin Honnen http://msmvps.com/blogs/martin_honnen/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML attribute value to pa, Selvaganesh | Thread | RE: [xsl] XML attribute value to pa, Selvaganesh |
Re: [xsl] NCName, QName and colons, Abel Braaksma | Date | Re: [xsl] XML attribute value to pa, David Carlisle |
Month |