ssNode = ssNodes.item(i);
if (ssNode.getNodeType() == ssNode.ELEMENT_NODE
&& ((Element)ssNode).getTagName().equals("stylesheet")
&& ssNode instanceof ElemLiteralResult)
{
AVT avt = ((ElemLiteralResult)ssNode).getLiteralResultAttribute("href");
String href = avt.evaluate(xctxt,xt, elem);
String absURI = SystemIDResolver.getAbsoluteURI(href, sysId);
Templates tmpl = saxTFactory.newTemplates(new StreamSource(absURI));
TransformerHandler tHandler = saxTFactory.newTransformerHandler(tmpl);
Transformer trans = tHandler.getTransformer();
// AddTransformerHandler to vector
vTHandler.addElement(tHandler);
paramNodes = ssNode.getChildNodes();
for (int j = 0; j < paramNodes.getLength(); j++)
{
paramNode = paramNodes.item(j);
if (paramNode.getNodeType() == paramNode.ELEMENT_NODE
&& ((Element)paramNode).getTagName().equals("param")
&& paramNode instanceof ElemLiteralResult)
{
avt = ((ElemLiteralResult)paramNode).getLiteralResultAttribute("name");
String pName = avt.evaluate(xctxt,xt, elem);
avt = ((ElemLiteralResult)paramNode).getLiteralResultAttribute("value");
String pValue = avt.evaluate(xctxt,xt, elem);
trans.setParameter(pName, pValue);
}
}
}
}