Hello there,

I need to check if a node is a type of element, and this element has namespace, the value for namespace and local name are all stored in variable, or at least the local name is in variable, when I tried to use it in typwswitch, it seems that in case part the element does not like variable, like the following:

declare namespace ft="http://www.somens.com";

let $subname := "subsect1"
let $testsubnode := element { fn:QName("http://www.somens.com";, $subname) }
          {  "test node" }
return
   typeswitch ($testsubnode)
   case $a as element( fn:QName("http://www.somens.com";, $subname) )
      return "found"
   default return "not found"


How can I do it?


Thanks, Helen
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to