XQuery contains function failing due to carriage return in XML
537206Jul 27 2012 — edited Aug 1 2012I am trying to perform the following xquery:
declare namespace tei="http://www.tei-c.org/ns/1.0";
for $line in //tei:l
where some $value in $line
satisfies (contains($value, "A cherdd, myn Siat"))
return $line
this works fine for almost all cases except when al 'l' element contains a carriage return half way through it, e.g.
<l n="15">A cherdd, myn Siat, yn
batent</l>
if I try to run the xquery above again to find the whole contents of the 'l' element it fails due to the carriage return
declare namespace tei="http://www.tei-c.org/ns/1.0";
for $line in //tei:l
where some $value in $line
satisfies (contains($value, "A cherdd, myn Siat, yn batent"))
return $line
I've been reading all the usual guides/sites and it seems that it might be possible to mitigate the effects of the 'carriage return' by the use of indexes. What I would really like to do however is to remove all the carriage returns. Does anyone know if it is possible to issue a command to dbxml to do this or should I just continue to investigate indexes?
thanks in advance
Edited by: user534203 on 27-Jul-2012 02:05