Bug 28278 - order of attributes should not be important for x:transform
Summary: order of attributes should not be important for x:transform
Status: RESOLVED WONTFIX
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: 1.1
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-08 11:02 UTC by Mirek Hankus
Modified: 2009-08-17 02:03 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mirek Hankus 2004-04-08 11:02:04 UTC
When defining stylesheet, location of version attribute is important, but it
should not be that way.

Steps to reproduce:
1. Install standard-examples.war in tomcat (5.0.22 in my case, on 5.0.19 same
situation)
2. Check if xml/Transform.jsp works (it should work)
3. Edit xml/Tranform so that attribute version of xsl:stylesheet is first
attribute of xsl:stylesheet, so that:
  <c:set var="xsl">
  <?xml version="1.0"?>
  <xsl:stylesheet
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

becomes

  <c:set var="xsl">
  <?xml version="1.0"?>
  <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

notice location of version attribute.

4. Try to see results. 


On my system I got exception:

javax.servlet.ServletException:
javax.xml.transform.TransformerConfigurationException:
javax.xml.transform.TransformerException: java.lang.IllegalStateException: can't
declare any more prefixes in this context
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:819)
	org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:755)
	org.apache.jsp.xml.Transform_jsp._jspService(Transform_jsp.java:135)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:268)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:277)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:223)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
Comment 1 Felipe Leme 2004-05-12 00:26:53 UTC
CC'ing the taglibs-dev address to all Standard bugs. 
Comment 2 Henri Yandell 2007-01-03 16:03:25 UTC
I can't repeat the bug under Tomcat 5.5 and JDK 1.5. While I know they're not
the real target for the Standard taglib I think it shows that the problem is
outside of the Standard taglib - either the Tomcat version or much, much more
likely the XML parser in the JVM.