On 23/09/2011 05:17, Rajath.Sakkari@continental-corporation.com wrote:
Hi Michael,

The casting to XdmNode worked great. For this I am using saxon-9.1.0.8.jar.  But I am facing a conflict if I use this jar .

- org.xml.sax.SAXException: Parser configuration problem: namespace reporting is not enabled
org.xml.sax.SAXException: Parser configuration problem: namespace reporting is not enabled
        at net.sf.saxon.event.ReceivingContentHandler.getNameCode(ReceivingContentHandler.java:401)
        at net.sf.saxon.event.ReceivingContentHandler.startElement(ReceivingContentHandler.java:278)

This conflict originates when i use xmlHandler.startElement("","",qname,attributes).
You need to supply the URI and local name when calling startElement: that is, you need to make the same calls on the SAX ContentHandler that a namespace-aware XML parser would make.

But if i use saxon-8.9.0.4.jar no errors occur but cant cast XdmItem to XdmNode. I am not sure of the problem.

XdmItem and XdmNode are part of the s9api interface, which was not introduced until Saxon 9.0 (IIRC). The current release is Saxon 9.3, and I would suggest moving forward.

Michael Kay
Saxonica