Hello. I have a Tomcat 5.5.8 based web application running an Axis 1.2.0 driven web service. When I run a certain chunk of code doing XSLT transformations, the code fails with "There was an error while transforming document - java.io.UTFDataFormatException: Invalid byte 1 of 1-byte UTF-8 sequence."
I can run this code outside of Tomcat without any problem (using command-line JUnit tests). However, if I run the code from a JSP page or using my web service, it fails with that error. Xerces and Xalan are definitely the same version (System.out with their respective Version objects shows the same info). I am attaching the XSLT file in question in case anyone can see something I can't. Has anyone seen this problem? I'm not finding much useful information searching the archives (of Tomcat, Axis or googling the web/newsgroups). thx andy
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" encoding="US-ASCII"/> <xsl:template match="/content"> <html><body> <xsl:apply-templates/> </body></html> </xsl:template> <xsl:template match="@*|node()"> <xsl:choose> <xsl:when test="@redlined='yes'"> <R> <xsl:copy> <xsl:copy-of select="attribute::node()[not(name()='redlined')]"/> <xsl:apply-templates/> </xsl:copy> <xsl:if test="name(.)='td' or name(.)='p' or name(.)='tr' or name(.)='table' or name(.)='img'"><xsl:text> </xsl:text></xsl:if> </R> </xsl:when> <xsl:otherwise> <xsl:copy> <xsl:copy-of select="@*"/> <xsl:apply-templates/> </xsl:copy> <xsl:if test="name(.)='td' or name(.)='p' or name(.)='tr' or name(.)='table'"><xsl:text> </xsl:text></xsl:if> </xsl:otherwise> </xsl:choose> </xsl:template> </xsl:stylesheet>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]