source: TI07-MOLES/trunk/xqueryLib/Utilities/utility_xquery_lib.xquery @ 2132

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI07-MOLES/trunk/xqueryLib/Utilities/utility_xquery_lib.xquery@2132
Revision 2132, 482 bytes checked in by ko23, 13 years ago (diff)

Refactoring intermediate

Line 
1module namespace utillib='http://ndg.nerc.ac.uk/xquery/lib/utilities';
2
3declare function utillib:strip-namespace($e as element()) as element()
4(: Removes namespace info from the element tree being addressed so that it will lie in the default namespace  :)
5{
6element {QName('', local-name($e))} 
7{
8let $parent :=$e
9let $childcount := count($parent/*)
10return
11if ($childcount>0) then
12for $child in ($e/*)
13return
14utillib:strip-namespace($child)
15else (data($e))
16}
17};
Note: See TracBrowser for help on using the repository browser.