A
Andy
Hi,
This is related to a post made by me awhile ago. I have an xhtml file
as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><html
xmlns="http://www.w3.org/1999/xhtml" xmlnsps="http://www.idpf.org/
2007/ops" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://
www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<head>
<title>The Game On! Diet</title>
<link href="pdlmsr.css" rel="stylesheet" type="text/css"/>
<meta content="application/xhtml+xml; charset=UTF-8" http-
equiv="Content-Type"/>
<meta name="Adept.resource" value="urn:uuid:312d0c9f-a6fc-4254-b4ac-
c85aad71156f"/>
</head>
<body style="margin-top: 0px; margin-left: 0px; margin-right: 0px;
margin-bottom: 0px; text-align: center; background-color: #FFFFFF;">
<div class="centerImage1"><svg:svg height="100%" viewBox="0 0 1200
1600" width="100%"><svg:image height="1600" transform="translate(0 0)"
width="1200" xlink:href="Images/cover.jpg"/></svg:svg></div>
</body>
</html>
As you can see, it uses some schema that knows what an svg:image is,
and the result is to display an image this way without the img tag.
In firefox, if I give this file the extension xhtml, it displays
fine. But IE doesn't like rendering xhtml. Someone out there found
that you can get IE to render this page correctly by sending the
document with mime neither as html or as xhtml but as application/
xml. Then you add this to the document header:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/mywebapp/iexhtmlfix.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/epub/xslt/
xhtml1-strict.dtd">
Where iexhtmlfix.xsl is:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xslutput method="xml" encoding="utf-8"/>
<xsl:template match="/">
<xsl:copy-of select="node()"/>
</xsl:template>
</xsl:stylesheet>
Then IE loads the page being told its xml, but displays the correct
image using the svg:image tag.
Is it transforming to html? Wondering how this works. What I would
like to do is find a way to do the same xsl transformation offline (or
in a servlet engine) using apache xalan, but when I tried, my result
still had the svg:image tag.
Is there a way to resolve this to the equivalent html?
Thanks,
Andy
This is related to a post made by me awhile ago. I have an xhtml file
as follows:
<?xml version="1.0" encoding="UTF-8" standalone="no"?><html
xmlns="http://www.w3.org/1999/xhtml" xmlnsps="http://www.idpf.org/
2007/ops" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://
www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance">
<head>
<title>The Game On! Diet</title>
<link href="pdlmsr.css" rel="stylesheet" type="text/css"/>
<meta content="application/xhtml+xml; charset=UTF-8" http-
equiv="Content-Type"/>
<meta name="Adept.resource" value="urn:uuid:312d0c9f-a6fc-4254-b4ac-
c85aad71156f"/>
</head>
<body style="margin-top: 0px; margin-left: 0px; margin-right: 0px;
margin-bottom: 0px; text-align: center; background-color: #FFFFFF;">
<div class="centerImage1"><svg:svg height="100%" viewBox="0 0 1200
1600" width="100%"><svg:image height="1600" transform="translate(0 0)"
width="1200" xlink:href="Images/cover.jpg"/></svg:svg></div>
</body>
</html>
As you can see, it uses some schema that knows what an svg:image is,
and the result is to display an image this way without the img tag.
In firefox, if I give this file the extension xhtml, it displays
fine. But IE doesn't like rendering xhtml. Someone out there found
that you can get IE to render this page correctly by sending the
document with mime neither as html or as xhtml but as application/
xml. Then you add this to the document header:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="/mywebapp/iexhtmlfix.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "/epub/xslt/
xhtml1-strict.dtd">
Where iexhtmlfix.xsl is:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/1999/xhtml" version="1.0">
<xslutput method="xml" encoding="utf-8"/>
<xsl:template match="/">
<xsl:copy-of select="node()"/>
</xsl:template>
</xsl:stylesheet>
Then IE loads the page being told its xml, but displays the correct
image using the svg:image tag.
Is it transforming to html? Wondering how this works. What I would
like to do is find a way to do the same xsl transformation offline (or
in a servlet engine) using apache xalan, but when I tried, my result
still had the svg:image tag.
Is there a way to resolve this to the equivalent html?
Thanks,
Andy