Bug 7122 - Econding ISO-8859-1 + accents throws exception
Summary: Econding ISO-8859-1 + accents throws exception
Status: CLOSED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Unknown Taglib (show other bugs)
Version: unspecified
Hardware: PC All
: P3 blocker (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-03-14 15:20 UTC by Edson Carlos Ericksson Richter
Modified: 2005-03-20 17:06 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edson Carlos Ericksson Richter 2002-03-14 15:20:22 UTC
Working with XSL taglib, I put in my JSP page the following code:

<xsl:apply xsl="/xsl/EdicaoListaXSL.xsl">
  <xsl:include page="/servlet/EdicaoListaXML" />
</xsl:apply>

The EdicaoListaXSL.xsl is:

<?xml version="1.0" encoding="ISO-8859-1" ?> 
 <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method="html" /> 
 <xsl:template match="/">
  Selecione uma edição na lista abaixo: 
  <br /> 
 <xsl:for-each select="LISTA">
 <table border="1" cellpadding="4" cellspacing="0">
 <xsl:for-each select="REGISTRO">
 <tr>
 <xsl:for-each select="CAMPO">
 <td>
  <xsl:value-of select="." /> 
  </td>
  </xsl:for-each>
  </tr>
  </xsl:for-each>
  </table>
  </xsl:for-each>
  </xsl:template>
  </xsl:stylesheet>

And XML generated by Servlet is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="EdicaoListaXSL.xsl"?>
<LISTA>
	<REGISTRO chave="102">
		<CAMPO nome="CO_EDICAO">102</CAMPO>
		<CAMPO nome="DS_EDICAO">Anuncio de parceiria - Jan/Mar 
2002</CAMPO>
		<CAMPO nome="DT_INICIAL">2002-01-01</CAMPO>
		<CAMPO nome="DT_FINAL">2002-03-31</CAMPO>
		<CAMPO nome="NU_PREENCHIDO">1</CAMPO>
	</REGISTRO>
	<REGISTRO chave="802">
		<CAMPO nome="CO_EDICAO">802</CAMPO>
		<CAMPO nome="DS_EDICAO">Entrega de cartões - 2003</CAMPO>
		<CAMPO nome="DT_INICIAL">2002-01-01</CAMPO>
		<CAMPO nome="DT_FINAL">2002-12-31</CAMPO>
		<CAMPO nome="NU_PREENCHIDO">3</CAMPO>
	</REGISTRO>
</LISTA>

If I change the JSP page to 

<xsl:apply xsl="/xsl/EdicaoListaXSL.xsl">
  <xsl:include page="/xsl/EdicaoListaXSL.xml" />
</xsl:apply>

All the things works (the XML was obtained executing servlet with IE and saving 
to the directory - and are exactly equal).

The exception is:

javax.servlet.ServletException: org.apache.xalan.xslt.XSLProcessorException: 
The entity "aacute" was referenced, but not declared.


and the Root Cause is:

javax.servlet.jsp.JspException: org.apache.xalan.xslt.XSLProcessorException: 
The entity "aacute" was referenced, but not declared.
	at org.apache.taglibs.xsl.ApplyTag.doEndTag(ApplyTag.java:274)
.
.
.

Is some boring to note that "aacute" does not exist in XML: this exist in my 
page (the title of the page: <title>Página de teste</title> )

Thanks.
Comment 1 Edson Carlos Ericksson Richter 2002-03-14 16:37:16 UTC
Obs: if I change

<xsl:apply xsl="/xsl/EdicaoListaXSL.xsl">
<xsl:include page="/servlet/EdicaoListaXML"/>
</xsl:apply>

to

<xsl:apply xsl="/xsl/EdicaoListaXSL.xsl">
<jsp:include page="/servlet/EdicaoListaXML"/>
</xsl:apply>

all turns to work fine. This is not more a "blocker" bug.
BTW, xsl:include cannot be used to include output from JSP and other servlets, 
as stated in Apply.jsp example.

M2c
Comment 2 Glenn Nielsen 2002-04-06 16:10:22 UTC
Thanks for your report.

The XSL taglib is based on Xalan1 and is not compatible with Xalan 2.
There are two alternatives for XSL which have more features, XTAGS and
Standard taglibs.