I don't believe you should get this error in the first case, where nodeName is set to "abcxyz". If you are getting the error, please supply a complete Java program that demonstrates the problem, so that I can run it.


               
                String nodeName = "abcxyz";
                      xmlHandler.startElement(XMLConstants.NULL_NS_URI, nodeName, nodeName, atts);



Also here I am using SAXTransformerFactory and its TransformHandler. So dose this act differently than normal ContentHandler ?


It acts like a ContentHandler but the contract is that your application must act like an XMLReader configured with the appropriate options. Specifically:

* on startElement, supply the URI, the localName, and the qualified name.

* in the attribute list on startElement, do not include xmlns attributes

* call startPrefixMapping and endPrefixMapping to indicate when namespaces go in and out of scope.

There's nothing in the JAXP spec of TransformerHandler that defines this, so other implementations of TransformerHandler may differ.

Michael Kay
Saxonica


From:        Michael Kay <mike@saxonica.com>
To:        saxon-help@lists.sourceforge.net
Date:        10/12/2011 03:13 PM
Subject:        Re: [saxon] Parser configuration problem: namespace reporting is not        enabled




On 12/10/2011 10:25, Rajath.Sakkari@continental-corporation.com wrote:
Hi,

I tried even that


xmlHandler
.startElement(XMLConstants.NULL_NS_URI, nodeName,nodeName, atts);

but no success. I tried with all local node names i have. I am missing something here do not know what :(


The error message you reported happens only if the second argument (the local name) is an empty string. If you're passing something other than an empty string, then please let us know more precisely what you did and what the effect was.

Michael Kay
Saxonica
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct_______________________________________________
saxon-help mailing list archived at
http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct


_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help