You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2017/04/03 14:09:15 UTC
[Bug 60950] New: JSTL TransformSupport XSL import not finding
relative path
https://bz.apache.org/bugzilla/show_bug.cgi?id=60950
Bug ID: 60950
Summary: JSTL TransformSupport XSL import not finding relative
path
Product: Taglibs
Version: 1.2.5
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P2
Component: XTags Taglib
Assignee: dev@tomcat.apache.org
Reporter: tomaz.cerar@gmail.com
Target Milestone: ---
Created attachment 34894
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34894&action=edit
Reproducer war
When you try to use references to local xslt files inside same deployment.
You can get error when creating XML Transformer as transformer factory doesn't
have URI resolver set to be able to recognize jstl protocol.
Reproducer "test.war" is attached.
Part of code that makes it fail:
test.jsp:
------------
<c:import var="xslStylesheet" url="/xsl/style.xsl" charEncoding="UTF-8" />
<c:import url="http://localhost:8080/test/test.xml" var="doc"/>
<x:transform xml="${doc}" xslt="${xslStylesheet}" xsltSystemId="/xsl/">
</x:transform>
style.xsl
---------------
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
version="1.0">
<xsl:import href="parent.xsl"/>
...
results in
javax.xml.transform.TransformerException: Had IO Exception with stylesheet
file: parent.xsl
at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:942)
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:780)
at
__redirected.__TransformerFactory.newTransformer(__TransformerFactory.java:133)
at org.apache.taglibs.standard.util.XmlUtil.newTransformer(XmlUtil.java:187)
Caused by: java.net.MalformedURLException: unknown protocol: jstl
at java.net.URL.<init>(URL.java:600)
at java.net.URL.<init>(URL.java:490)
at java.net.URL.<init>(URL.java:439)
at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:964)
at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:144)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:832)
at
org.apache.xerces.parsers.XML11Configuration.parse(XML11Configuration.java:798)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:108)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1198)
at
org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:564)
at
org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:312)
This is also tracked in Red Hat BZ
https://bugzilla.redhat.com/show_bug.cgi?id=1320747
as well as in WildFly Jira: https://issues.jboss.org/browse/WFLY-8498
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60950] JSTL TransformSupport XSL import not finding relative
path
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60950
--- Comment #2 from Tomaz Cerar <to...@gmail.com> ---
Created attachment 34896
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34896&action=edit
Thread Safe Patch that passes URI resolver to newTransformer
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60950] JSTL TransformSupport XSL import not finding relative
path
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60950
Remy Maucherat <re...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Remy Maucherat <re...@apache.org> ---
Reviewed and committed as r1790020, it will be in the next (1.2.6 ?) release.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
[Bug 60950] JSTL TransformSupport XSL import not finding relative
path
Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=60950
Tomaz Cerar <to...@gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tomaz.cerar@gmail.com
--- Comment #1 from Tomaz Cerar <to...@gmail.com> ---
Created attachment 34895
--> https://bz.apache.org/bugzilla/attachment.cgi?id=34895&action=edit
Patch that passes URI resolver to newTransformer
Proposed patch passes URI resolver to XmlUtil#newTransformer.
so it is set on TRANSFORMER_FACTORY before new transformer is created.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org