Here are some Java classes implementing a Sesame/XSLT connection as an XSLT extension in Xalan. We use this to embed SeRQL queries in our XSLT transformations (due to time constraints, we cannot provide support for this, but feel free to download these classes and play with them).
Warning: try this first as a command line application, and make sure you have a Java 1.4 JRE with the Xalan XSLT style sheet engine up and running. Once you know how to process XML files with standard XSLT style sheets into the output you want, you may put the JAR file mentioned below into Xalan's classpath and play with the XML and extended XSLT examples provided.
You may also want to run this from within a Cocoon web application, just copy the jar file to your ../webapp/cocoon/WEB-INF/lib/ directory.
Software below has been tested using Sesame 1.2.2:
XML file (which includes this XML file and XSLT style sheet of an extended XML/RDF + XSLT/SeRQL example (this is the actual code used to generate this page). It includes another XSL file (setparams.xsl).
All of the above in one big zipped tar file.
While the syntax details have changed since publication, the general ideas have been described in section 5 of this techreport.