Bug 7122 - Econding ISO-8859-1 + accents throws exception
Summary: Econding ISO-8859-1 + accents throws exception
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
Depends on:
Reported: 2002-03-14 15:20 UTC by Edson Carlos Ericksson Richter
Modified: 2005-03-20 17:06 UTC (History)
0 users


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" />

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">
 <xsl:for-each select="CAMPO">
  <xsl:value-of select="." /> 

And XML generated by Servlet is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="EdicaoListaXSL.xsl"?>
	<REGISTRO chave="102">
		<CAMPO nome="CO_EDICAO">102</CAMPO>
		<CAMPO nome="DS_EDICAO">Anuncio de parceiria - Jan/Mar 
		<CAMPO nome="DT_INICIAL">2002-01-01</CAMPO>
		<CAMPO nome="DT_FINAL">2002-03-31</CAMPO>
	<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>

If I change the JSP page to 

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

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> )

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 xsl="/xsl/EdicaoListaXSL.xsl">
<jsp:include page="/servlet/EdicaoListaXML"/>

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.

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.