xsl-list
[Top] [All Lists]

Probs using XSLT in browsers

2005-03-08 06:45:46
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="Terça-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="Sábado"/>
        </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?

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



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