XSLT and browser differences...(Mozzie err. and they dunno)

G

Guest

Hi All,

I wrote a TOC treeview using xml and xslt, with help from this forum and
MSDN help(thanks)

Great in IE 6. (expect IE 5 as well, articles were circa 2000)
However, Mozilla FireFox (latest), gives me the following error.
" Error Loading Stylesheet: Parsing an XSLT stylesheet failed "

And the Mozilla forums have no answer, so... hopefully here !

TIA
Neal



beneath is the XSLT and some of the XML (which invokes the XSLT)

The XML:

<?xml-stylesheet type='text/xsl' href='listN.xsl'?>

<CategoriesList>
<Categories>
<CategoryDescr>Vehicles</CategoryDescr>
<CategoryId>1</CategoryId>
<SubCategories>
<SubCatDescr>OnRoad</SubCatDescr>
<SubCatId>1</SubCatId>
<SubSubCategories>
<SubSubCatDescr>2ndHand</SubSubCatDescr>
<SubSubCatId>1</SubSubCatId>
<URL>MainAds.aspx?Vehicles?OnRoad?2ndHand</URL>
</SubSubCategories>
<SubSubCategories>
<SubSubCatDescr>New</SubSubCatDescr>
<SubSubCatId>2</SubSubCatId>
<URL>MainAds.aspx?Vehicles?OnRoad?New</URL>
</SubSubCategories>
</SubCategories>
<SubCategories>
<SubCatDescr>ATV</SubCatDescr>
<SubCatId>4</SubCatId>
<URL>MainAds.aspx?Vehicles?ATV</URL>
</SubCategories>
</Categories>
<Categories>
<CategoryDescr>Books</CategoryDescr>
<CategoryId>2</CategoryId>
<SubCategories>
<SubCatDescr>StudentTexts</SubCatDescr>
<SubCatId>9</SubCatId>
<SubSubCategories>
<SubSubCatDescr>CourseAndYear</SubSubCatDescr>
<SubSubCatId>11</SubSubCatId>
<URL>MainAds.aspx?Books?StudentTexts?CourseAndYear</URL>
</SubSubCategories>
</SubCategories>
</Categories>
</CategoriesList>

XSLT :
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">
<HTML>
<HEAD>
<LINK REL="stylesheet" TYPE="text/css" HREF="list.css" />
<SCRIPT TYPE="text/javascript" LANGUAGE="javascript" SRC="listN.js"></SCRIPT>
</HEAD>
<BODY>
<BUTTON ONCLICK="ShowAll('UL')">Show All</BUTTON>
<BUTTON ONCLICK="HideAll('UL')">Hide All</BUTTON>

<H1><xsl:value-of select="CategoriesList/@TYPE" /></H1>
<UL><xsl:apply-templates select="CategoriesList/Categories" /></UL>
<!--- <UL><xsl:apply-templates
select="CategoriesList/Categories/SubCategories" /></UL> -->
</BODY>
</HTML>
</xsl:template>

<xsl:template match="Categories">
<LI CLASS="clsHasKids">
<xsl:value-of select="CategoryDescr" />


<xsl:if test="SubCategories">
<UL>
<xsl:for-each select="SubCategories">
<LI CLASS="clsHasKids">
<xsl:value-of select="SubCatDescr" />
<xsl:if test="SubSubCategories">
<UL>
<xsl:for-each select="SubSubCategories">
<LI>
<A TARGET="main">
<xsl:attribute name="HREF">
<xsl:value-of select="URL"/>
</xsl:attribute>
<xsl:value-of select="SubSubCatDescr" />
</A>
</LI>
</xsl:for-each>
</UL>
</xsl:if>

</LI>
</xsl:for-each>
</UL>
</xsl:if>
</LI>
<xsl:if test="Categories">
<xsl:apply-templates />
</xsl:if>
</xsl:template>
</xsl:stylesheet>
 
K

Kevin Spencer

Change your StyleSheet element to the following:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.
 
G

Guest

Thought it must have been something like that, some finger trouble or such
like.
Thanks Kevin.

ps ,Have to ask, .. what on earth is a professional Chicken Magician ?
kinda blows my mind, .. local or stateside colloquialism which has not been
made publicly available via the Hollwwood machine to the rest of the world
yet?
(Actually I gotta be careful, your side of the village, has a very different
take on the word blow as well.. just rather not go there)

cheers
Neal
 
K

Kevin Spencer

My pleasure, Neal, and sorry for the erroneous paste.

Your confusion is understandable. I like satisfy my creative urges by
creating various proverbs and job titles for myself that are a bit on the
esoterically humorous side, by playing with the English language, and
(mostly) popular English expressions. "Chicken Magician" is a title I
created as a replacement for "Chicken Salad Alchemist," which was my most
recent self-appellation. "Chicken Salad Alchemist" comes from the expression
"making chicken salad out of chicken s**t" - an expression used especially
in the vocation of carpentry, but other "building-related" occupations, and
is a humorous way of talking about creating something excellent when given
poor resources, conditions, or requirements. As you are probably aware,
alchemists were medieval scientists (of sorts) whose ultimate ambition was
to make gold out of lead. They never succeeded, but did manage to learn and
pass on quite a lot of chemistry knowledge.

"Chicken Magician" is a slight transformation of the "Alchemist" expression.
It is also a play on words for a product that was sold on American
television commercials years ago, called the "Kitchen Magician." It is
apparently, in fact, still around, and sold on the Internet (see
http://www.realcoolsavings.com/product/KTMAGIC2.html).

I enjoy being a bit on the obscure side with my humor. As my Uncle Chutney
sez, "Ambiguity has a certain quality to it." It is the things we do *not*
understand that we find the most fascinating, especially if it seems that
understanding is not too far out of reach, but might possibly be attainable.

Of course, I do have a job and a job title, but prefer to have fun with my
signature block, as I don't have any real need to advertise myself or my
skill set any more these days.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Magician

A man, a plan, a canal.
a palindrome that has gone to s**t.
 
G

Guest

obscure .. yes, particularly for non US citizens.
Makes sense though now.
Chicken Magician, Alchemist ... all terms which are synonymous with
"Programmer, Developer , AP .. etc" ..Nice!!

can relate,.. add a little "obtuse", remove a little "Obscure" and the same
like of the wonderful ambiguities in the Language, particularly us here who
have to deal with a vocab based in both UK and US English... (Creates mayhem
when playing scrabble !! or connotation games) ..and that kinda describes me,
incl mayhem.

later
Neal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top