xquery version "0.9-ml"

define function processm-p() as node()*
{
    <m-ps-group xmlns="msearch">
    {
   let $pos := "1"
   let $new-value := "8888" 
   let $ps-text := "alleights"
   let $pr-qname := xs:QName(fn:concat("ps-rk-",$pos))
   let $epr-qname := xs:QName(fn:concat("m-ps-rk-",$pos))
   return (element  {$epr-qname} {$new-value}, element m-ps-cd  {attribute   
{$pr-qname} {$new-value}, $new-value},<m-ps-text 
ps-cd="{$new-value}">{$ps-text}</m-ps-text>)
      }
   </m-ps-group>
}
let $s := processm-p()
return $s


<m-ps-group xmlns="msearch">
<m-ps-rk-1>8888</m-ps-rk-1>
<m-ps-cd _1:ps-rk-1="8888" xmlns:_1="msearch">8888</m-ps-cd><m-ps-text 
ps-cd="8888">alleights</m-ps-text>
</m-ps-group>


When run under 3.2, the attribute ps-rk-1 does not contain a namespace...

So what would be the best method to make certain ps-rk-1 does not have a 
namespace, if possible?
   let $pr-qname := xs:QName(fn:concat("ps-rk-",$pos))
No namespace was specified.





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

Reply via email to