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)
CC'ing the taglibs-dev address to all Standard bugs.
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.