Thanks Mike,

I have found duplicated line in lib-parser.xqy as you say and deleted it.
Now yes work fine.



-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] En nombre de Michael Blakeley
Enviado el: viernes, 09 de mayo de 2008 21:08
Para: General Mark Logic Developer Discussion
Asunto: Re: [MarkLogic Dev General] Error XDMP-DUPATTR using lib-parser

Mariano,

Thanks for reporting this problem. It's caused by a typo in 
lib-parser.xqy, where the "weight" attribute was accidentally repeated. 
Here's a patch:

@@ -592,8 +593,7 @@
        lp:serialize-QNames(cts:element-word-query-element-name($t)),
        cts:element-word-query-text($t),
        for $o in cts:element-word-query-options($t)
-      return element cts:option { $o },
-      attribute weight { cts:element-word-query-weight($t) } }
+      return element cts:option { $o } }
      case cts:word-query
      return element cts:word-query {
        attribute weight { cts:word-query-weight($t) },

Until this has been committed to the repository, you can apply this 
patch to your own copy of lib-parser.xqy.

-- Mike

Mariano Grau Calín wrote:
> Hello,
> 
>  
> 
> I put my field definition in $SEARCH-FIELD-MAP variable in lib-parser.xqy and 
> run this code:
> 
>  
> 
> ...
> 
> let $query := lp:get-cts-query('pub:CADIZ gato')
> 
> return $query
> 
>  
> 
> I get 
> 
>  
> 
> <results warning="non-element 
> node">cts:and-query((cts:element-word-query(xs:QName("DIARIO"), "CADIZ", 
> ("lang=es"), 1), cts:word-query("gato", ("lang=es"), 1)), ())</results>
> 
>  
> 
> Where i can see expanded my search-field-map
> 
>  
> 
> However, my idea is to include this in lib-search search-criteria calling 
> lp:serialize-cts-query but then get this error
> 
>  
> 
> Code:
> 
> let $query := lp:get-cts-query('pub:CADIZ gato')
> 
> return lp:serialize-cts-query($query)
> 
>  
> 
> Result:
> 
> ERROR: eval-in Equis at file:c:/Xquerys/
> 
> XDMP-DUPATTR: element cts:element-word-query { attribute weight { 
> cts:element-word-query-weight($t) }, 
> lp:serialize-QNames(cts:element-word-query-element-name($t)), 
> cts:element-word-query-text($t), for $o as item()* in 
> cts:element-word-query-options($t) return <cts:option>{ $o }</cts:option>, 
> attribute weight { cts:element-word-query-weight($t) } } -- Two attributes 
> with the same name
> 
>  
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://xqzone.com/mailman/listinfo/general


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

Reply via email to