xsl-list
[Top] [All Lists]

[xsl] capitalization problem in Mozilla Firefox

2006-05-04 02:39:46

drkm,

The line quoted below gets around the problem I'm having across IE and FF because the first "cSet" gets data successfully in IE, and the second "cset" gets data in FF. That approach indicates to me that something went wrong upstream either in the FF branch of my JavaScript or in FF's XSLT processing. The full stylesheet is included after the block-quote. It creates a 9x9 HTML table from a list of elements, and it sets color and title attributes of the TableData from data in the input.
link to file:    http://seanwhalen.home.comcast.net/sudoku/hv_drawMap.xslt

========= Florent Georges writes:

Date: Wed, 3 May 2006 09:52:32 +0200 (CEST)
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
<http://mailcenter2.comcast.net/wmc/v/wm/4459C790000ABC3E000035F72200762194020A040E0899020E0A9C?cmd=ComposeTo&adr=xsl%2Dlist%40lists%2Emulberrytech%2Ecom&sid=c0>
From: Florent Georges <darkman_spam(_at_)yahoo(_dot_)fr 
<http://mailcenter2.comcast.net/wmc/v/wm/4459C790000ABC3E000035F72200762194020A040E0899020E0A9C?cmd=ComposeTo&adr=darkman%5Fspam%40yahoo%2Efr&sid=c0>>
Subject: RE: [xsl] capitalization problem in Mozilla Firefox
Message-ID: 
<20060503075232(_dot_)96144(_dot_)qmail(_at_)web25802(_dot_)mail(_dot_)ukl(_dot_)yahoo(_dot_)com 
<http://mailcenter2.comcast.net/wmc/v/wm/4459C790000ABC3E000035F72200762194020A040E0899020E0A9C?cmd=ComposeTo&adr=20060503075232%2E96144%2Eqmail%40web25802%2Email%2Eukl%2Eyahoo%2Ecom&sid=c0>>

Sean Whalen wrote:

 Hi

 I didn't look at your post in detail, but:

<xsl:value-of select="string(//t[v = $v and h= $h ]/cSet | //t[v = $v and h= $h ]/cset ) " /> </xsl:attribute>
                           ^^^^

 cSet.

 Regards,

--drkm

====================
<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:xs="http://www.w3.org/2001/XMLSchema";>
<xsl:output method="html"/>


   <xsl:key name="hk" match="root/t/h" use="."/>
   <xsl:key name="vk" match="root/t/v" use="."/>


<xsl:template match="/">
<xsl:call-template name="draw-Map"/>
</xsl:template>

<xsl:template name = "draw-Map">

<html>

<table border= "2" cellpadding= "3" cellspacing = "0" style =" empty-cells: show " > <th>V/H</th>
        <xsl:for-each select="root/t[count(h | key('hk', h)[1]) = 1]">
                <th > <xsl:value-of select="h"/> </th>      
</xsl:for-each>
        <xsl:for-each select="root/t[count(v | key('vk', v)[1]) = 1]">
                <xsl:variable name="v" select= "v"/>
<tr><td><b><xsl:value-of select="$v"/></b></td> <xsl:for-each select="//t[count(h | key('hk', h)[1]) = 1]"> <xsl:variable name="h" select= "h"/>
                        <xsl:variable name="tuple" select= "//t[v = $v and h= $h 
]"/> 
                        <xsl:choose>
<xsl:when test=" $tuple/k[(_at_)new =1] "> <td BGCOLOR="#98FB98"><xsl:value-of select="//t[v = $v and h= $h ]/k"/> </td>
                                               </xsl:when>
<xsl:when test=" $tuple/k[(_at_)new =2] "> <td BGCOLOR="#EEAD0E"><xsl:value-of select="//t[v = $v and h= $h ]/k"/> </td>
                                               </xsl:when>
                            <xsl:when test="  $tuple/k ">
                                <td>&#160; <xsl:value-of select="//t[v = $v and h= $h 
]/k"/>  </td> </xsl:when>
                        <xsl:otherwise>
                        <xsl:element name="td">
                                <xsl:attribute name="title">   <xsl:value-of 
select="string(//t[v = $v and h= $h ]/cSet   |  //t[v = $v and h= $h ]/cset   ) "  />  
</xsl:attribute>
                          &#160;  </xsl:element >
                        </xsl:otherwise></xsl:choose>
                    </xsl:for-each>       
</tr>

        </xsl:for-each>   
        
</table> </html>


</xsl:template>

</xsl:stylesheet>




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--