Hi Shannon, Good catch. It appears that this was simply an error in the version number of the file. The version number in lib-parser.xqy in the repository is now correct.
And to answer your other question, lib-parser.xqy is included as part of the lib-search package. Cheers! Chris -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shannon Scott Shiflett Sent: Tuesday, May 13, 2008 5:09 PM To: General Mark Logic Developer Discussion Subject: Re: [MarkLogic Dev General] Error XDMP-DUPATTR using lib-parser Hi, Chris! At the location you supplied below I don't see lib-parser standalone -- is it included in the lib-search package? I looked inside, but that lib-parser.xqy appears to be out of date (@version 3.2-2008-03-06.1). Thanks, Shannon On May 13, 2008, at 4:53 PM, Christopher Welch wrote: > A new version of lib-parser is available which includes the > following significant changes: > > Version 3.2-2008-05-06.1 > ADD: Added support for shotgun-or queries. > CHG: Forward compatibility with 4.0-EA2 > BUG: Fix of namespace issue. > > http://developer.marklogic.com/code/ > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > ] On Behalf Of Michael Blakeley > Sent: Friday, May 09, 2008 3:08 PM > To: General Mark Logic Developer Discussion > Subject: 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 _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
