xslt fn:replace function

Hi All Does lxml supports xslt functions ( http://www.w3schools.com/xpath/xpath_functions.asp) I have the following xsl file <xsl:template match="PropertyIsLike"> <xsl:variable name="literal" select="//Literal"/> <xsl:variable name="wildcard" select="//Literal[@wildCard]"/> <Statement><xsl:value-of select="//ValueReference" /> LIKE '<xsl:value-of select="fn:replace($literal, $wildcard, '%')" />'</Statement> </xsl:template> and try to replace some characters in the //Literal tag of the xml file xml file looks like the following <Filter><PropertyIsLike wildCard="*" singleChar="?" escapeChar="!"><ValueReference>highway</ValueReference><Literal>bus?st*</Literal></PropertyIsLike></Filter> Any hint, ideas, ... welcome. Thans a lot in advance

Pasithee Jupiter, 08.04.2011 18:59:
Does lxml supports xslt functions ( http://www.w3schools.com/xpath/xpath_functions.asp)
Yes. Did you try it? Stefan

Yes I have tried this and solved my problem. The only issue that I had to deal with is placing the other texts outside of the inline tags into right place. For example : <source xml:lang="en-us">*This system will be automatically shut down in <ph id="1">%s</ph> second.*</source> Here the inline tag is *<ph id="1">%s</ph>.* I have worked to place this tag in right position along with the other texts*(*between* "**This system will be automatically shut down in*" and "*second*") Thank you once again for your suggestion Aditi. On Mon, Apr 18, 2011 at 6:30 PM, Stefan Behnel <stefan_ml@behnel.de> wrote:
Pasithee Jupiter, 08.04.2011 18:59:
Does lxml supports xslt functions ( http://www.w3schools.com/xpath/xpath_functions.asp)
Yes. Did you try it?
Stefan _________________________________________________________________ Mailing list for the lxml Python XML toolkit - http://lxml.de/ lxml@lxml.de http://mailman-mail5.webfaction.com/listinfo/lxml
-- Thanks, Aditi.
participants (3)
-
Aditi Barua
-
Pasithee Jupiter
-
Stefan Behnel