[Home] [By Thread] [By Date] [Recent Entries]
Hi again Betty,
At 06:21 PM 4/10/2003, you wrote: I don't have control over the authoring. The quotes are already embedded in the file. If the XML file has <text>"Oh foo!" said Tonya, as she looked at her list of warnings.</text> and you say <xsl:template match="text"> <xsl:value-of select="translate(.,'"','#')"/> </xsl:template> you should get #Oh foo!# said Tonya, as she looked at her list of warnings. (But note you can't say translate(.,'"','''), since once it is parsed the stylesheet processor still chokes on translate(.,'"',''') -- in a case like that you have to resort to binding the problem character to a variable.) The entity is so the *stylesheet* can be parsed; it still represents the character literal it represents. But in your case I'd simply try: <xsl:variable name="name1">
<xsl:value-of select="substring-after($definition, '"')"/>
</xsl:variable>
<xsl:variable name="name2">
<xsl:value-of select="substring-before($name1, '"')"/>
</xsl:variable>The parser reports the values of the select attributes as, e.g. substring-after($definition, '"') which should be fine. Cheers, Wendell
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



