Inserting attributes with new namespaces into elements.
The Saxon XSLT and XQuery processor, developed by Saxonica
Brought to you by:
mhkay
Dear Michael,
I have run the following query with Saxon-EE 9.2.0.3J:
declare namespace b="B";
insert node attribute { 'b:b' } { }
into doc('x.xml')/a
The source document "x.xml" contains the empty element "<x>", and the query yields the following result:</x>
I'd have expected that the namespace declaration would be added to the element..
Sorry for the update... Of course the input document contains "".
Yes, this is confirmed as a bug. I've raised a patch on the 9.2 branch and have submitted a new test to the W3C XQuery Update test suite.
Thanks for reporting it: but I'd be grateful if in future you raise problems first via the saxon-help mailing list or forum. I try to keep this tracker for confirmed bugs only, to avoid it becoming filled with spurious user queries. Also, if a bug isn't assigned to me, I don't get any notification - I only spotted this one by chance.
Fixed in 9.2.0.5