Hi Florent,

Could you include a short sample document and a fully written query against it 
that you think should match but doesn't?

-jh-

On Nov 26, 2010, at 3:35 AM, Florent Georges wrote:

>  Hi,
> 
>  I found something very strange with cts:contains().  I probably
> misunderstood something, but the behaviour sounds counter-intuitive
> to me.  If I have an expression like:
> 
>    let $elements := ...
>    let $phrase := 'some sentence'
>    return
>      $elements[child eq $phrase]
> 
> which return a match, then I expect the following expression (with
> the exact same $elements content):
> 
>    let $elements := ...
>    let $phrase := 'some sentence'
>    let $query := cts:element-value-query(
>                    xs:QName('child'), $phrase, 'lang=en')
>    return
>      $elements[cts:contains(., $query)]
> 
> to return at least the same result.  Unfortunately, it does return
> the empty sequence.  The element which matches has an xml:lang set
> to 'en', which is the default language and which I pass explicitly
> to be sure this is not the cause.
> 
>  Even further, if I use the following query instead, it does not
> match anything neither (I just added the options):
> 
>    cts:element-value-query(
>      xs:QName('child'),
>      $phrase,
>      ('case-insensitive',
>       'diacritic-insensitive',
>       'punctuation-insensitive',
>       'whitespace-insensitive',
>       'unwildcarded',
>       'lang=en'))
> 
>  How is it possible?
> 
>  Regards,
> 
> -- 
> Florent Georges
> http://fgeorges.org/
> 
> 
> 
> 
> 
> _______________________________________________
> General mailing list
> [email protected]
> http://developer.marklogic.com/mailman/listinfo/general

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

Reply via email to