https://saxonica.plan.io/https://saxonica.plan.io/favicon.ico2021-08-31T10:01:02ZSaxonica Developer CommunitySaxon - Bug #5073: C#.Net saxon-he-api-9.9.1.8: java.lang.NullPointerException: Null prefix supplied to declareNamespace()https://saxonica.plan.io/issues/5073?journal_id=183582021-08-31T10:01:02ZMichael Kaymike@saxonica.com
<ul></ul><p>The API documentation isn't explicit about what happens when you supply null as the prefix, but it doesn't define any meaning for null, so I think it's a reasonable expectation that null is not an allowed value.</p>
<p>Ideally we should probably be catching Java exceptions and rethrowing them as C# exceptions, but in the general case that would lose stack trace information, so I don't think it would be a particularly beneficial change.</p> Saxon - Bug #5073: C#.Net saxon-he-api-9.9.1.8: java.lang.NullPointerException: Null prefix supplied to declareNamespace()https://saxonica.plan.io/issues/5073?journal_id=183662021-09-01T21:59:41ZMichael Kaymike@saxonica.com
<ul></ul><p>What are you actually trying to achieve? If you are trying to set the default namespace, the prefix should be a zero-length string, not null, as stated in the API documentation.</p> Saxon - Bug #5073: C#.Net saxon-he-api-9.9.1.8: java.lang.NullPointerException: Null prefix supplied to declareNamespace()https://saxonica.plan.io/issues/5073?journal_id=184032021-09-06T10:24:07ZMichael Kaymike@saxonica.com
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Rejected</i></li></ul><p>Closed on the grounds that the product is behaving as designed.</p>