[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Escaping Characters in replace()
On 15/10/2013 20:31, Nathan Tallman wrote:
Thank you, David and Ivan. It did, of course, work... I just had more problems than I thought. The code you helped with, works in situations like: Don't match on text() unless you have to: > insert " before the title/text() in <title> blah <!-- stuff -->blah</title> there are two text nodes so if you are not careful and add " around title/text() you will get " blah ""blah" I'd so <xsl:template match="title[@render='doublequote"> <xsl:text>"</xsl:text> <xsl:apply-templates/> <xsl:text>"</xsl:text> </xsl:template> <xsl:template match="unititle"> <xsl:variable name="x"> <xsl:apply-templates/> </xsl:variable> <xsl:value-of select="replace($x,'"\.','."')"/> </xsl:template> David -- google plus: https:/profiles.google.com/d.p.carlisle
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|