[MarkLogic Dev General] Stumped on comparing string sequences
Mike Sokolov
sokolov at ifactory.com
Thu May 3 11:13:08 PDT 2007
Looks like a whitespace problem:
tokenize ("x, y, b, z", ",") => ("x", " y", " b", " z")
note the spaces before y, b, z.
-Mike
Jacob Meushaw wrote:
> I'm completely stumped on why something isn't working and hopefully I
> haven't just missed something in the documentation.
>
> I want to determine if anything in Sequence A is in Sequence B where
> Sequence A is generated by tokenizing a comma delimited string. This
> only seems to work when the matching value is the first one returned
> from fn:tokenize.
>
> Running my example below should do a much better job of explaining my
> problem.
>
>
> <iThinkTheseShouldAllReturnTrue>
> <shouldWorkButDoesnt> { fn:tokenize("x, y, b, z",",") = ("a", "b",
> "c") } </shouldWorkButDoesnt>
> <works> { ("x", "y", "b", "z") = ("a", "b", "c") } </works>
> <alsoWorks> { fn:tokenize("b, x, y, z", ",") = ("a", "b", "c") }
> </alsoWorks>
> </iThinkTheseShouldAllReturnTrue>
>
> =>
>
> <iThinkTheseShouldAllReturnTrue>
> <shouldWorkButDoesnt>false</shouldWorkButDoesnt>
> <works>true</works>
> <alsoWorks>true</alsoWorks>
> </iThinkTheseShouldAllReturnTrue>
>
>
> Any help would be greatly appreciated.
>
> Thanks,
> Jake
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
More information about the General
mailing list