Got it working. For the benefit of others:
XsltView
"The XSLT Source object is supplied as a parameter in the model and then detected during response rendering."
This means the XML you wish to transform should be passed in the model.
"Users can either specify a specific entry in the model via the sourceKey property [....]"
That's what I did. I create a Source object and put it in the model with the specified sourceKey string (in my case "xml").
To specify the XSL to be used, I had to set it as the url value.
In a view.properties file, I have the following:
stuff.(class)=com.example.ui.XsltViewImpl
stuff.url=http://localhost/xsl/stuff.xsl
stuff.sourceKey=xml
So one could create different entries, just changing the high level qualifier and url to allow the controller to call on different transforms for different types, i.e.:
things.(class)=com.example.ui.XsltViewImpl
things.url=http://localhost/xsl/things.xsl
things.sourceKey=xml
Currently my XsltViewImpl file is almost empty; I'm not overriding any methods. I guess I could just use the base XsltView class right now.
Code:
// in the controller
protected ModelAndView handleRequestInternal(HttpServletRequest request,
HttpServletResponse response) throws Exception {
//...
Source s = new StreamSource(new StringReader(xmlFile));
Map model = new HashMap();
model.put("xml", s);
return new ModelAndView("stuff", model);
}