Bug 8432 - in x:transform if a String is passed as value to xslt attribute then an exception is thrown
Summary: in x:transform if a String is passed as value to xslt attribute then an excep...
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-23 19:28 UTC by Prasad Subramanian
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Prasad Subramanian 2002-04-23 19:28:38 UTC
In this case:
<x:transform xml="${xmlDoc}" xslt="Activity.xsl" />
where xmlDoc is a variable exported by x:parse the following exception is 
thrown:

1) Do we need to specify a System id
2) Activity.xsl is in the same directory as the JSP
3) in case the attribute value to xslt is an object exported by x:parse it 
works fine
=======================================================================javax.ser
vlet.ServletException: javax.xml.transform.TransformerConfigurationException: 
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: 
Content is not allowed in prolog.
	at org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:463)
	at org.apache.jsp.review_0005fproj_0005fxml_0005f01$jsp._jspService
(review_0005fproj_0005fxml_0005f01$jsp.java:181)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:201)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2349)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:469)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:381)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:325)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:495)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:516)
	at java.lang.Thread.run(Thread.java:536)


root cause 

javax.servlet.jsp.JspException: 
javax.xml.transform.TransformerConfigurationException: 
javax.xml.transform.TransformerException: org.xml.sax.SAXParseException: 
Content is not allowed in prolog.
	at 
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag
(TransformSupport.java:163)
	at org.apache.taglibs.standard.tag.el.xml.TransformTag.doStartTag
(TransformTag.java:104)
	at org.apache.jsp.review_0005fproj_0005fxml_0005f01$jsp._jspService
(review_0005fproj_0005fxml_0005f01$jsp.java:164)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service
(JspServlet.java:201)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:381)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:473)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter
(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter
(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:260)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContextValve.invoke
(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardContext.invoke
(StandardContext.java:2349)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:171)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.catalina.core.StandardEngineValve.invoke
(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:633)
	at org.apache.catalina.valves.AccessLogValve.invoke
(AccessLogValve.java:469)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:631)
	at org.apache.catalina.core.StandardPipeline.invoke
(StandardPipeline.java:470)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at org.apache.coyote.tomcat4.CoyoteAdapter.service
(CoyoteAdapter.java:223)
	at org.apache.coyote.http11.Http11Processor.process
(Http11Processor.java:381)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:325)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:495)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:516)
	at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------
Comment 1 Shawn Bayern 2002-04-23 19:35:29 UTC
Per PFD spec, you can't pass a URL to the 'xslt' attribute.