Meaningless Drivel is fun!
The moose likes JSP and the fly likes Encountered an unknown type while processing 'xslt' attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Encountered an unknown type while processing Watch "Encountered an unknown type while processing New topic
Forums: JSP XML and Related Technologies

Encountered an unknown type while processing 'xslt' attribute

L Chan

Joined: Apr 29, 2004
Posts: 6

I'm just trying to transform an XML document using the XML tags in JSTL 1.1. I'm using Tomcat 5.5.7 as my web container and JRE 1.5. Here's my jsp:

<%@ taglib prefix="c" uri="" %>
<%@ taglib prefix="x" uri="" %>

<c:import var="zzzz-Instance" url="forms/zzzz-Instance.xml" />
<c:import var="zzzz-XHTML" url="forms/zzzz-XHTML.xml" />
<c:import var="zzzz-XSL" url="xslt/zzzz-jsp.xsl" />

<x:transform var="zzzz-Full" doc="${zzzz-XHTML}" xslt="${zzzz-XSL}" />

<x ut select="$zzzz-Full/*" />

When I access this jsp, I get the following error on Tomcat:

javax.servlet.ServletException: <transform> encountered an unknown type while processing 'xslt' attribute
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl .java:846)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.j ava:779)
org.apache.jsp.WEB_002dINF.ConfigurationEditor_jsp._jspService(org.apache.jsp.W EB_002dINF.ConfigurationEditor_jsp:89)

We've used the other JSTL 1.1 tags (i.e. functions, fmt, etc.) with no problems, so I don't think this is a setup problem. The XML and XSL files are well formed XML files... So what's going on here?

Eric Borisow

Joined: Mar 16, 2006
Posts: 2
I see that this one was asked a while ago, but I ran into the same problem recently. So, just to help others, I found that the problem for me was the name of the variable that I was storing the xslt result in was bad. It contained a '-' which was not a problem for jstl, in general, but the xml jstl tag library doesn't like it.

So, you would have to change:


Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Thanks for the follow-up, Eric. In this case I would say "better late than never" definitely applies!

(I'm linking this thread to the XML forum as well in case somebody decides to search there for this problem.)
I agree. Here's the link:
subject: Encountered an unknown type while processing 'xslt' attribute
It's not a secret anymore!