We are having an issue with XSL transformations. Here is the following
.jsp we are using:
----------------------------------------------------------------------------------------------------------------------------------------------------
<?xml version="1.0" ?>
<% int type = com.ironmax.util.BrowserUtil.getBrowserType(request);
String xsl = "";
switch(type) {
case com.ironmax.util.BrowserUtil.HTMLBROWSER: {
out.println("<?xml-stylesheet href=\"htmlvalidate.xsl\" type
=\"text/xsl\"?>");
break;
}
case com.ironmax.util.BrowserUtil.WMLBROWSER: {
out.println("<?xml-stylesheet href=\"wmlvalidate.xsl\" type
=\"text/xsl\"?>");
break;
}
default: {
out.println("<?xml-stylesheet href=\"htmlvalidate.xsl\" type
=\"text/xsl\"?>");
break;
}
}
%>
<!DOCTYPE page SYSTEM "validate.dtd">
<page>
<username/>
<password/>
</page>
----------------------------------------------------------------------------------------------------------------------------------------------------
The above actually runs correctly for the most part. It determines the
browser type, and runs the appropriate transformation,
however, the content-type is never set to anything other than text/xml.
Here is the beginning of the wmlvalidate.xsl file:
----------------------------------------------------------------------------------------------------------------------------------------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version
="1.0">
<xsl:output method="xml"
indent="yes"
omit-xml-declaration="no"
doctype-system ="http://www.phone.com/dtd/wml11.dtd"
doctype-public="-//PHONE.COM//DTD WML 1.1//EN"
media-type="text/vnd.wap.wml"
/>
<xsl:template match="page">
----------------------------------------------------------------------------------------------------------------------------------------------------
Again, the transformation works, but Orion does not seem to honor the
media-type content type.
Any thoughts on this matter?
James Birchfield
Ironmax
a better way to buy, sell and rent construction equipment
5 Corporate Center
9960 Corporate Campus Drive,
Suite 2000
Louisville, KY 40223