[MarkLogic Dev General] Stumped on comparing string sequences
Jacob Meushaw
jmeushaw at gmail.com
Thu May 3 11:24:52 PDT 2007
Which isn't very visible (or gets normalized out) when I just run the
tokenize function to check the output.
Thanks for your help, I'll give this a try.
On 5/3/07, Mike Sokolov <sokolov at ifactory.com> wrote:
>
> 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
> _______________________________________________
> General mailing list
> General at developer.marklogic.com
> http://xqzone.com/mailman/listinfo/general
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20070503/d5808738/attachment.html
More information about the General
mailing list