[xsl] Probs using XSLT in browsers

Subject: [xsl] Probs using XSLT in browsers
From: António Mota <amsmota@xxxxxxxxx>
Date: Tue, 8 Mar 2005 13:45:46 +0000
I'm feel i'm being somewhat stupid by posting this cause it seems
something, well, stupid.

I was making some XSL in a IDE (jEdit) that was working ok, and then
put it to work on the browser thru Javascript. The XSL is like this:

	<xsl:variable name="dias">
		<dia d="1" abr="Dom." ext="Domingo"/>
		<dia d="2" abr="Seg." ext="Segunda-Feira"/>
		<dia d="3" abr="Ter." ext="Terga-Feira"/>
		<dia d="4" abr="Qua." ext="Quarta-Feira"/>
		<dia d="5" abr="Qui." ext="Quinta-Feira"/>
		<dia d="6" abr="Sex." ext="Sexta-Feira"/>
		<dia d="7" abr="Sab." ext="Sabado"/>
	</xsl:variable>

(that's the days of the week in portuguese)

and later

					<xsl:for-each select="exslt:node-set($dias)/dia">
						<th>
							<xsl:value-of select="@abr"/>
						</th>
					</xsl:for-each>

just to have a nice table with the days in the header.

So i assume that the IE and the FF processors don't support the
exslt:node-set() altought i tougth that it was suficiente to declare
the xmlns:exslt="http://exslt.org/common";. Then i tryed to import the
exslt.xsl but i found no such thing on the exslt site.

Then i just remove the extension, thus the FF went working ok (if
course without the headers) but strangely enough IE still doesn't
work, i had to remove the variable declaration to work (it gives
another error after that!)

But note i have to *remove* the variable, if i just comment it IE
still gives the error!!!!!

"The stylesheet does not contain a document element."

I sometimes think of XSLT as a kind of magic, but i don't expect it to
be *black* magic... Can someone help me on this?

Current Thread