|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Replacing double quotes with XSLT [faked-from][sls
Ah yes, this one. It comes up whenever you use XSLT to generate SQL; and
I'll wager that's your problem, too. Your choices:
- Write a template (procedure) that does it. Painfully slow performance. The
code has been posted in many places; e.g.
http://aspn.activestate.com/ASPN/Cookbook/XSLT/Recipe/65426
- use a script extension function (like msxml:) to use javascript's
REPLACE() method. MS-specific, and I think w3c is down on such extensions.
- do what we did: translate quote to an absurd character (take your pick)
and use SQL's replace() function internally.
- if you're NOT generating SQL, do a compiled pre- or post- process on the
text.
- wait until replace() is added to the standard.
-----Original Message-----
From: James Paul
To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
Sent: 22/09/2003 1:35 PM
Subject: Replacing double quotes with XSLT [faked-from][sls]
I'm trying to replace " within a string in XSLT and replace it with ""
but I'm not having any luck.
Does NOT work
<xsl:element name = "OrganizationCode">
<xsl:text>"</xsl:text>
<xsl:value-of select =
"translate(../@OrganizationCode,'\"','\"\"'"/>
<xsl:text>"</xsl:text>
</xsl:element>
Does NOT work
<xsl:element name = "OrganizationCode">
<xsl:text>"</xsl:text>
<xsl:value-of select =
"translate(../@OrganizationCode,'"','""'"/>
<xsl:text>"</xsl:text>
</xsl:element>
Does anyone have any suggestions ???
Thanks
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|

Cart








