[xsl] capitalization problem in Mozilla Firefox

Subject: [xsl] capitalization problem in Mozilla Firefox
From: Sean Whalen <seanwhalen@xxxxxxxxxxx>
Date: Tue, 02 May 2006 21:23:19 -0400
I have a browser based javascript that passes the result of one XSLT transform to another transform. The data being passed is in the format being shown below. The letter "t" is for tuple, h and v are for horizontal and vertical, and the cSet node is the set of candidate numbers for a particular H/V cell. This is taken from a Sudoku solver I've been working on. That data is the nodeset being returned from the hv_web.xslt stylehseet, which does one layer of solving.

The problem has been that the stylesheet that creates the HTML table of the Sudoku board cannot find the "cSet" element. This is because while being passed from stylesheet to stylesheet via javascript, the element name became lowercase... but only in FireFox -- MS-IE will only read the element if I ask for it with proper capitalization.

The hv_drawMap stylehseet that I put on the web hacks through the problem by using a Union operator to test both kinds of cSet elements:

<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 >

but this is crazy. I can officially uncapitalize the element name in the upstream stylesheet, but I wanted to ask first why FF's xslt or javascript was LCasing that element name.

the Mozilla branch of the javascript uses these 3 basic statements:

solution = xsltProcessorSolver.transformToDocument(solution );
htmlSodukoMap2 = xsltProcessorMapper.transformToDocument(solution);
document.getElementById("gameArea").innerHTML = document.getElementById("gameArea").innerHTML + xmlSerializer.serializeToString( htmlSodukoMap2 );

any tips would be appreciated, Sean see data & stylesheets at: http://seanwhalen.home.comcast.net/sudoku/ =======example data=== <root> <t> <h>1</h> <v>3</v> <cSet> <c>3</c> <c>5</c> <c>8</c> </cSet> </t> <t> <h>2</h> <v>1</v> <cSet> <c>2</c> <c>3</c> <c>4</c> <c>7</c> </cSet> </t> <t> </root>

Current Thread