cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Morandini" <luca.morandi...@tin.it>
Subject RE: sql transformer question; *not* esql... (was RE: ???ESQL upda te table???)
Date Tue, 18 Mar 2003 17:46:03 GMT
> -----Original Message-----
> From: Delis, Christopher E. [mailto:cedelis@uillinois.edu]
> Sent: Tuesday, March 18, 2003 6:32 PM
> To: 'cocoon-users@xml.apache.org'
> Subject: RE: sql transformer question; *not* esql... (was RE: ???ESQL
> upda te table???)
> 
> 
> do you mind sharing the template? =-)  --chris

not at all (mind, it just converts single quotes in double-single quotes).

	<xsl:template name="escape-apos">
   		<xsl:param name="string" />

   		<xsl:choose>

      		<xsl:when test='contains($string, "&apos;")'>

         		<xsl:value-of select='substring-before($string, "&apos;")' />
         		<xsl:text>''</xsl:text>

         		<xsl:call-template name="escape-apos">
            		<xsl:with-param name="string" select='substring-after($string, "&apos;")'
/>
		        </xsl:call-template>

      		</xsl:when>

			<xsl:otherwise>
        		<xsl:value-of select="$string" />
      		</xsl:otherwise>

   		</xsl:choose>

	</xsl:template>

Regards,

--------------------------------------------- 
               Luca Morandini 
               GIS Consultant 
              lmorandini@ieee.org 
http://utenti.tripod.it/lmorandini/index.html 
---------------------------------------------
 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message