[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Replacing double quotes with XSLT

Subject: RE: Replacing double quotes with XSLT
From: "Koes, Derrick" <Derrick.Koes@xxxxxxxxxxxxxxxx>
Date: Mon, 22 Sep 2003 18:01:51 -0400
double quot
Recursive template to do what you need.



<xsl:template name="escapeQuot">
    <xsl:param name="text"/>
    <xsl:choose>
      <xsl:when test="contains($text, '&quot;')">
        <xsl:variable name="bufferBefore" select="substring-before($text,
'&quot;')"/>
        <xsl:variable name="newBuffer" select="substring-after($text,
'&quot;')"/>
        <xsl:value-of select="$bufferBefore"/><xsl:text>\"</xsl:text>
        <xsl:call-template name="escapeQuot">
          <xsl:with-param name="text" select="$newBuffer"/>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$text"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>



-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l.delmelle@xxxxxxxxxx] 
Sent: Monday, September 22, 2003 5:43 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  Replacing double quotes with XSLT

> -----Original Message-----
> From James Paul
> 
> Even when trying to replace with the " with a single character it does
> not work.
> 
> Example
> 
>  <xsl:element name = "OrganizationCode">
>  	<xsl:text>"</xsl:text>
>  	<xsl:value-of select =
>  "translate(../@OrganizationCode,'\"','B'"/>
>  	<xsl:text>"</xsl:text>
>  </xsl:element>
> 

Question: Is this an *exact* copy of what you put in the stylesheet? 
If so, I see a closing bracket missing... (wild guess)


Greetz,


Andreas Delmelle


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
This electronic transmission is strictly confidential to Smith & Nephew and
intended solely for the addressee.  It may contain information which is
covered by legal, professional or other privilege.  If you are not the
intended addressee, or someone authorized by the intended addressee to
receive transmissions on behalf of the addressee, you must not retain,
disclose in any form, copy or take any action in reliance on this
transmission.  If you have received this transmission in error, please
notify the sender as soon as possible and destroy this message.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.