From: Wolfgang M. <wol...@ex...> - 2011-07-19 15:37:29
|
To conform to the standard, we have changed how namespaces are handled when calling a function. Previously, if you called a function from within an XML fragment, the function body used to see the same in-scope namespace declarations as the calling code. This was clearly violating the XQuery spec and has been corrected by Adam. This means you now have to be careful when using default namespaces: make sure the XML nodes returned from your function are still in the correct namespace. For example, the following query: declare function local:test() { <h1>title</h1> }; <html xmlns="http://www.w3.org/1999/xhtml"> <body>{local:test()}</body> </html> does now (correctly!) return <html xmlns="http://www.w3.org/1999/xhtml"> <body> <h1 xmlns="">title</h1> </body> </html> The xhtml namespace is no longer "inherited" by the called function. So if your queries stopped working after updating trunk, just check all function return XML in a default namespace. Wolfgang |