Antony Grinyer wrote:
I seem to have got a bit further with this issue. I think it's a Xalan
problem so I configured Cocoon to use Saxon instead which gives me a bit
more error detail during the transformation:
INFO (2005-08-04) 18:50.52:052 [sitemap] (/kde/showsyscontainer)
PoolThread-4/BDBXMLTransformer: >>> Transformer Initialised
INFO (2005-08-04) 18:50.52:130 [sitemap] (/kde/showsyscontainer)
PoolThread-4/HandleErrorsNode: Processing handle-errors at
file:/C:/cocoon-2.1.7/build/webapp/kde/sitemap.xmap:85:23
WARN (2005-08-04) 18:50.52:318 [sitemap.serializer.html]
(/kde/showsyscontainer) PoolThread-4/AbstractTextSerializer: Cannot know
if transformer needs namespaces attributes - assuming NO.
org.xml.sax.SAXException: Saxon requires an XML parser that reports the
QName of each element
The code that generates the XML that is passed to the saxon XSLT
transformer is:
private void generateDocumentToSAX(String queryResults)
{
SAXParser parser = null;
try
{
parser = (SAXParser)this.manager.lookup(SAXParser.ROLE);
InputSource inputSource = new InputSource(new
StringReader(queryResults));
parser.parse(inputSource, super.xmlConsumer);
}
catch(Exception e)
{
m_resultMessage = "Unable to get parser: " + e.toString();
this.getLogger().error(m_resultMessage);
}
finally
{
if (parser != null) this.manager.release(parser);
}
}
Do I need to inform the parser in the code to do something to stop this
error below? WHat is the QName?
'Cannot know if transformer needs namespaces attributes - assuming NO.
org.xml.sax.SAXException: Saxon requires an XML parser that reports the
QName of each element'
Thanks,
Ant
Just a guess. Try replacing the SAXParser manager.lookup thing with a
more normal invocation of an XMLParser, e.g. XMLReader. Does that make a
difference? Not necessarily how you would want to do it longterm, but
might work for you for now.
Upayavira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]