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

Reply via email to