}
}
addTraceListenersToStylesheet();
try{
StylesheetHandler stylesheetProcessor
= new StylesheetHandler((TransformerFactoryImpl)m_tfactory);
stylesheetProcessor.pushStylesheet(stylesheet);
TreeWalker tw = new TreeWalker(stylesheetProcessor, new org.apache.xpath.DOM2Helper());
tw.traverse(frag);
displayDuration("Setup of "+xslURLString, frag);
}
catch (TransformerConfigurationException tce)
{
throw new SAXException(tce);
}
}
else
{
stylesheetDoc = null;
error(XSLTErrorResources.ER_NODE_NOT_ELEMENT, new Object[] {fragID}); //"Node pointed to by fragment identifier was not an element: "+fragID);
}
}
else
{
// TODO: Use Reader here??
// hmmm.. for now I'll rely on the XML parser to handle
// fragment URLs.
diag(XSLMessages.createMessage(XSLTErrorResources.WG_PARSING_AND_PREPARING, new Object[] {xslURLString})); //"========= Parsing and preparing "+xslURLString+" ==========");
pushTime(xslURLString);
URL xslURL = getURLFromString(xslURLString, xmlBaseIdent);
XSLTInputSource inputSource = new XSLTInputSource(xslURL.toString());
if(isRoot)
{
if(null != m_liaison)
{
try{
m_liaison.parse(SAXSource.sourceToInputSource(inputSource.getSourceObject()));
DOMSource source = new DOMSource(m_liaison.getDocument());
Templates templates = m_tfactory.newTemplates(source);
m_stylesheetRoot = new StylesheetRoot(
(org.apache.xalan.templates.StylesheetRoot)templates);
}
catch (TransformerException tce)
{
throw new SAXException(tce);
}
}
else
{
m_stylesheetRoot = createStylesheetRoot(xslURLString);
}
stylesheet = m_stylesheetRoot.getObject();
}
else
{
stylesheet = new Stylesheet(m_stylesheetRoot.getObject());
}
addTraceListenersToStylesheet();
try{
org.apache.xalan.processor.StylesheetHandler stylesheetProcessor
= new StylesheetHandler((TransformerFactoryImpl)m_tfactory); //this, stylesheet);
stylesheetProcessor.pushStylesheet(stylesheet);
// new StylesheetHandler(this, stylesheet);
}
catch (TransformerConfigurationException tce)
{
throw new SAXException(tce);