File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML-XSL Interaction on IE

 
Anoop Krishnan
Ranch Hand
Posts: 163
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mapraputa Is
Leverager of our synergies
Sheriff
Posts: 10065
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Edwin Vaz
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5040
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Edwin Vaz
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 254
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic