Andrew, yes, what you suggested was the first thing I did. Just changed it to

xdmp:directory("/data/store/items/", 
"infinity")//it...@type='title'][starts-with(., 'Radiology']

And found out it works then fine for both 3.2 and 4.1.

-----Original Message-----
From: [email protected] 
[mailto:[email protected]] On Behalf Of Andrew Welch
Sent: Friday, December 04, 2009 11:51 AM
To: General Mark Logic Developer Discussion
Subject: Re: [MarkLogic Dev General] Matching ampersand in 4.1

> I've encountered a problem while moving from 3.2 to 4.1. It seems like
> XQuery dialect 1.0-ml is handling ampersand slightly different from 0.9-ml.
>
>
>
> Suppose I have the file:
>
>
>
> <root>
>
>                 <item type="title">Radiology &amp; Ultrasound</item>
>
> </root>
>
>
>
> Located in /data/store/items/
>
>
>
> I am writing a simple query just to illustrate the problem:
>
>
>
> xdmp:directory("/data/store/items/", "infinity")//it...@type='title'][. =
> 'Radiology &amp; Ultrasound']
>
>
>
> Under 3.2 it returns me the <item> node. Great! But under 4.1 I just get the
> empty sequence (replacing &amp; with &#38; gives no effect). So could anyone
> please suggest another idea of matching ampersand-containing strings in 4.1
> environment?

Are you sure the problem is the ampersand?  What happens if you sanity
check that it should return something (for example change the
predicate to [starts-with(., 'Radiology')] )





-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to