/* XSL */
xslstream = openXslInputStream( request );
if ( xslstream == null )
{
throw new PortletException( "No XSL" );
}
StreamSource xsl = new StreamSource( xslstream );
/* XML */
xmlstream = openXmlInputStream( request );
if ( xslstream == null )
{
throw new PortletException( "No XML" );
}
StreamSource xml = new StreamSource( xmlstream );
/* Transform */
StreamResult output = new StreamResult( response.getWriter( ) );
Transformer transformer = factory.newTransformer( xsl );
Map params = getXslParameters( request, response );
if ( params != null )
{
Iterator it = params.keySet( ).iterator( );
while ( it.hasNext( ) )
{
String key = ( String ) it.next( );
transformer.setParameter( key, params.get( key ) );
}
}
transformer.transform( xml, output );
}
catch ( TransformerConfigurationException t )
{
throw new PortletException( t );
}
catch ( TransformerException t )
{
throw new PortletException( t );
}
finally
{
if ( xmlstream != null )
{