aspose file tools*
The moose likes XML and Related Technologies and the fly likes XML-XSL Interaction on IE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML-XSL Interaction on IE" Watch "XML-XSL Interaction on IE" New topic
Author

XML-XSL Interaction on IE

Anoop Krishnan
Ranch Hand

Joined: May 03, 2001
Posts: 163
I am just a beginner in XSL i have a hello world application with an XML file as follows
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="helloworldXSL.xsl"?>
<prompt>
<greeting>Hello World</greeting>
</prompt>

and an XSL file as follows
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="/">
<html>
<body>
<xsl:for-each select="prompt">
<div align="center"><h1>
<xsl:value-of select="greeting" />
</h1></div>
</xsl:for-each>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
But i am not able to see the output in IE when i open the XML file


I just want to know is there any body call my bean's Getter and Setter methods with "Please" in front - My favorite quip from Bugzilla
Mapraputa Is
Leverager of our synergies
Sheriff

Joined: Aug 26, 2000
Posts: 10065
Hm... Looks like your IE browser uses old version of MSXML processor. Your example will work if you change the second line in your stylesheet
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
to
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
- but this is an old namespace used by outdated, not fully W3C compliant M$ processor.
[ February 05, 2002: Message edited by: Mapraputa Is ]

Uncontrolled vocabularies
"I try my best to make *all* my posts nice, even when I feel upset" -- Philippe Maquet
Edwin Vaz
Greenhorn

Joined: Aug 18, 2003
Posts: 2
Very much a beginner at XML/XSL, I am having the same problem as Anoop.
Mapraputa, I tried your solution, but it didn't work.
I am using IE version 5.50.4807.2300, but this simple example just does not seem to work.
Please help!
- Edwin.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040
I am using IE version 5.50.4807.2300
Just verified that it works in IE 6.0.2800.1106CO.
Try updating your browser, it will prove very helpful
as you progress in learning XML/XSL.
regds.
- madhav


Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
Edwin Vaz
Greenhorn

Joined: Aug 18, 2003
Posts: 2
Madhav, thanks a lot for the quick response.
I installed IE 6, and it worked perfectly fine
Another piece of information... checkout the following site:
http://www.w3schools.com/xsl/el_template.asp
It says, the <xsl:template> element may have NON-standard behavior in IE 5.X! I guess that explains the problem.
So I have one more question:
Is there a work-around so that the Hello World XML/XSL example works in IE 5.x also? If I am hosting a website of my own, and I want to use XML instead of plain HTML, how can i ensure that all users having IE 5+ can view my site in a consistent manner?
Kripal Singh
Ranch Hand

Joined: Jul 26, 2001
Posts: 254
I think better to install the latest version of MSXML parser from microsoft . It will make the transformation work in the IE5+ version .
You can get the latest version from download.microsoft.com . or
http://www.microsoft.com/downloads/details.aspx?FamilyID=3144b72b-b4f2-46da-b4b6-c5d7485f2b42&displaylang=en
Originally posted by Edwin Vaz:
Madhav, thanks a lot for the quick response.
I installed IE 6, and it worked perfectly fine
Another piece of information... checkout the following site:
http://www.w3schools.com/xsl/el_template.asp
It says, the <xsl:template> element may have NON-standard behavior in IE 5.X! I guess that explains the problem.
So I have one more question:
Is there a work-around so that the Hello World XML/XSL example works in IE 5.x also? If I am hosting a website of my own, and I want to use XML instead of plain HTML, how can i ensure that all users having IE 5+ can view my site in a consistent manner?


# Help an unprivileged kid.<br /> Whatever u do will make a difference...<br /> ...to a child's life & ur own #<br /><a href="http://www.cry.org/" target="_blank" rel="nofollow">www.cry.org/</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML-XSL Interaction on IE