It seems to work ok. I had the path wrong to the stylesheet when I was generating a source object. For some reason, there failed to be any exception being thrown to indicate that the stylesheet could not be located. In any event, for future reference, here is sample code for someone else:

<%StreamSource source = new StreamSource("file://c:/resin-2.1.11/stylesheets/SearchForm.xslt");
pageContext.setAttribute("mySource", source);
%>
<c:catch var="e">
<x:transform xml="${miniDoc}" xslt="${mySource}" />
</c:catch>


Thanks for the response, Kris.

-Dennis


Kris Schneider wrote:


So, assuming you've done one of the following in a servlet or filter or...:

servletContext.setAttribute("xformSource", xformSource)
session.setAttribute("xformSource", xformSource)
request.setAttribute("xformSource", xformSource)

You should be able to do:

<x:transform xslt="${xformSource}" .../>

Have you tried something similar and it's not working?

Quoting Dennis Warren <[EMAIL PROTECTED]>:



I'm trying to specify a javax.xml.transform.Source variable for the attribute of "xslt". However, I'm not too sure how to do this. The reason I want to do this is because I want to avoid importing a document via c:import. I'm setting the "xsltSystemId" attribute and using my own custom caching transformer implementation, and therefore do not need to use c:import as long as I specify an xsltSystemId attribute. With specifying a javax.xml.transform.Source variable, I hope to avoid the "xsltSystemId" attribute all together.

Any suggestions would be greatful. I have yet to see any examples of using this type of variable for the "xslt" attribute of x:transform, but the spec says it's applicable.

thanks,

-Dennis






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to