Subject: [xsl] having problem implementing 'strip-space' From: "Wright, Steve" <Steve.Wright@xxxxxxx> Date: Fri, 24 Jan 2003 19:37:33 -0500 |
Hello, I am not having any luck getting my xslt scripts to remove the whitespace and carraige returns from my xml upon conversion to html. The main reason I need to have the space removed is that I have event handler's w/ javascript in them that are not working due to the carraige returns in the output which looks like this: ---------------------------------------------------------------------------- -------------------------------- <a href="javascript:bigFig(' FIG01-01','../fig/big/ FIG01-01.JPG ',' FIG01-01');"><img border="0" src="../fig/thm/ FIG01-01.JPG " alt=" FIG01-01" name="my FIG01-01"></a> ---------------------------------------------------------------------------- -------------------------------- ---------------------------------------------------------------------------- -------------------------------- the xsl looks like this: ---------------------------------------------------------------------------- -------------------------------- <xsl:for-each select="@NUM"> <xsl:variable name="imagelabel"><xsl:value-of select="../TTL" /></xsl:variable> <xsl:variable name="imagefilename"><xsl:value-of select="//CHAP/@NUM" />-<xsl:value-of select="." /></xsl:variable> <tr><td valign="top" class="text"> <a> <xsl:attribute name="href"> <xsl:text>javascript:bigFig('</xsl:text> <xsl:value-of select="$imagefilename" /> <xsl:text>','../fig/big/</xsl:text> <xsl:value-of select="$imagefilename" /> <xsl:text>.jpg','</xsl:text> <xsl:value-of select="$imagefilename" /> <xsl:text>');</xsl:text> </xsl:attribute> <img border="0" width="150"> <xsl:attribute name="src"> <xsl:text>../fig/thm/</xsl:text> <xsl:value-of select="$imagefilename" /> <xsl:text>.jpg</xsl:text> </xsl:attribute> <xsl:attribute name="alt"> <xsl:value-of select="$imagefilename" /> </xsl:attribute> <xsl:attribute name="name"> <xsl:text>my</xsl:text> <xsl:value-of select="$imagefilename" /> </xsl:attribute> </img> </a> <br/> </td></tr> </xsl:for-each> ---------------------------------------------------------------------------- -------------------------------- ---------------------------------------------------------------------------- -------------------------------- I've tried every implementation of: <xsl:strip-space elements="*"/> imaginable. I stumbled upon a suggestion to use the 'normalize()' function just recently in relation to this sort of problem. Does anyone know how it might be implemented in this scenario? ---------------------------------------------------------------------------- -------------------------------- Thanks in advance, Steve **************************************************************************** This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. We may monitor email to and from our network. **************************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Nesting {...}, David Carlisle | Thread | Re: [xsl] having problem implementi, Joerg Heinicke |
Re: [xsl] Nesting {...}, J.Pietschmann | Date | RE: [xsl] xsl:copy question, |
Month |