Skip to content

Instantly share code, notes, and snippets.

@spig
Created June 10, 2011 18:53
Show Gist options
  • Save spig/1019494 to your computer and use it in GitHub Desktop.
Save spig/1019494 to your computer and use it in GitHub Desktop.
Get namespace of node
xquery version '1.0-ml';
<b xmlns="http://www.w3.org/1999/xhtml">
{
let $element := element test { }
return
for $prefix in fn:in-scope-prefixes($element) return fn:concat("prefix: ", fn:namespace-uri-for-prefix($prefix, $element), ",")
}
</b>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment