xsl-list
[Top] [All Lists]

"--" question

2003-04-04 03:11:17
Hello :)

I have a problem that I can't understand why.
Somewhere in my xml I have the following code:

<script><![CDATA[ if( stMarcador == "--START-VALUE--" )   {  /*do something*/   
}]]></script>

When I parser the xml through the next xsl:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
        <xsl:output method="xml" encoding="ISO-8859-1"/>
        <xsl:template match="/">
                <html>
                        <xsl:call-template name="head"/>
                </html>
        </xsl:template>
        
        <xsl:template name="head" match="*">
                <head>
                        <link rel="stylesheet" type="text/css" 
href="xsl/style.css"/>                   
                        <script src="script.js" type="text/javascript"/>
                        <script language="JavaScript">
                                <xsl:comment>
                                        <xsl:for-each select=".//script">
                                                <xsl:value-of select="." 
disable-output-escaping="yes"/>
                                        </xsl:for-each>
                                </xsl:comment>
                        </script>
                </head>
        </xsl:template>
</xsl:stylesheet>

the result of:
        if( stMarcador == "--START-VALUE--" )
Is
        if( stMarcador == "- -START-VALUE- -" )

Why the xsl puts the space between "--"?
Tks :)



Hélder Sousa
Departamento de  Projectos e-Business 
I2S - Informática Sistemas e Serviços 
<<mailto:helder(_dot_)sousa(_at_)i2s(_dot_)pt>> - <<http://www.i2s.pt/>>
Tel.: +351 22 834 04 00; Fax: +351 22 834 07 95 
Portugal 

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



<Prev in Thread] Current Thread [Next in Thread>