On 28/09/2011 12:33, Rajath.Sakkari@continental-corporation.com wrote:
Hi Michael,

First of all sorry about taking the conversation off-list. I actually did not notice it.

I am new to XML world so still doing bit research :). The change between 8.9 to 9.1 was only to use XdmNode and XdmItem in 9.1 . Well now I have shifted to 9.3.

Coming to the namespace. With your previous reply, my understanding is that, more error checking is introduced in versions above 9. So URI and namespace are a must in versions above 9. Please correct me if I am wrong.

You're using the SAX ContentHandler interface, so you must follow the contract defined in that interface. See here:


This includes the statement:

Any or all of these [namespace URI, local name, and QName] may be provided, depending on the values of the http://xml.org/sax/features/namespaces and the http://xml.org/sax/features/namespace-prefixes properties:

* the Namespace URI and local name are required when the namespaces property is true (the default), and are optional when the namespaces property is false (if one is specified, both must be);
* the qualified name is required when the namespace-prefixes property is true, and is optional when the namespace-prefixes property is false (the default).

The Saxon documentation states (somewhere, I'll find it for you when I'm not rushing to catch a flight...) that for Saxon's ContentHandler, you must follow the conventions that apply when the namespaces property and the namespace-prefixes property are both true.

So you must supply the namespace URI. If your element is not in a namespace, you must supply the value "".

Michael Kay