Menu in XSL stylesheet?

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
Asa
Beginner
Beginner
Posts: 3
Joined: Wed Dec 01, 2004 3:00 pm

Menu in XSL stylesheet?

Post by Asa »

Hi,

I'm really interested in using the dynamic menu and although it works perfectly fine with HTML pages, I want to create a section on my site based on XML data and an XSL stylesheet. I've tried copying the JavaScript straight into the stylesheet but when I visit the XML page, I just "Line 1 Char 1 Syntax Error".

Any ideas?

Regards, Asa
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

What javascript? The call for the menu? I don't know xml, but I do remember having to use something about cdata around javascript for some reason. The only site I know that is xml and uses the menu is http://www.mercuryexposure.org which uses <![CDATA[ tags. Sorry, I can't be more help.

Ruth
Asa
Beginner
Beginner
Posts: 3
Joined: Wed Dec 01, 2004 3:00 pm

Post by Asa »

Thanks for the site. I've got it to work in IE by pasting the javascript lines into the XSL document but sadly Mozilla is still having none of it.

Asa
Bischoff
Beginner
Beginner
Posts: 5
Joined: Tue Jun 01, 2004 10:57 am

_d.write in JS Libs

Post by Bischoff »

Hi Asa,
I have the same problem concerning the Mozilla and co. browsers. The reason for this is, that inside the Milonic JS libraries, which you import inside the XSL document are including several document.write commands.

First step of removing document.write is to change the import from :

<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

to :
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script language=JavaScript src="mmenudom.js" type=text/javascript></script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

Than Netscape 4 is not working any more, but who cares?

IE can handle this. Mozilla can't. So the same urgent problem for me. How to avoid this document.write. To rewrite the milonic_src.js and the mmenudom.js is above my knowledge..... :?

So, if any of the Milonic peaple whatches this conversation, please answer.....
Asa
Beginner
Beginner
Posts: 3
Joined: Wed Dec 01, 2004 3:00 pm

Post by Asa »

Thanks for the reply, Bischoff.

Found Mozilla's explanation: http://www.mozilla.org/projects/xslt/faq.html Sadly no real solution and I don't envy the guys at Milonic trying to find an alternative to something as basic as document.write! I just can't believe Mozilla doesn't allow it, it's ridiculous.

For now, I'll use normal menu hyperlinks for Mozilla with
<xsl:if test="system-property('xsl:vendor')='Transformiix'">
<!-- Mozilla specific markup -->
</xsl:if>
but if someone here can edit the javascript to support it, at least two people would be very grateful! Incidentally, I'm using v3 if that's any easier to work with.

Cheers, Asa
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

What would be really helpful is a url to a page with your xsl and xml and the menu so that someone with more knowledge can check it out and see the problem and the browsers that are getting the error.

Ruth
Bischoff
Beginner
Beginner
Posts: 5
Joined: Tue Jun 01, 2004 10:57 am

Post by Bischoff »

Please have a look at: http://www.naturheilmagazin.de/Demo/Rue ... g/kurs.xml

Kerstin Bischoff
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Kerstin
If you're using version 5 could you repost your first response to Asa in the Support Section for that version? I went to the page, but I get nothing but errors when using IE5.5. It shows text such as images/spacer.gif, images/abstand.gif This is not really something I would know about, but I thought if a page were posted someone with more knowledge might be able to help. So, if you could repost your information in Help and Support Version 5, perhaps under XML, XSL and Version 5 as the title or something so they know what's being questioned. Thanks

Asa,
are you using version 3 of the menu? That version is no longer supported, it is very out of date and most of us don't even know the parameters involved with it, so I'm not sure anyone can help with your situation. If you can upgrade it might be better, especially since Version 5 is more in line with all the new developments in browsers and web browsing.

Ruth
Post Reply