[MarkLogic Dev General] question about cts:search

Geert Josten Geert.Josten at daidalos.nl
Wed Jan 20 12:33:42 PST 2010


Hi Helen,

> I changed and I got the same error as when I use fn:base-uri(.)
>
> Description: XDMP-NOTANODE: doc()/child::ns1:article/
> descendant::ns1:sub[not(attribute::temp1 or
> attribute::temp2)]/document-uri(root(.)) --
> xs:anyURI("/pt/ajr_1.xml") is not a node
>
> The result is really only one document, but it seems that I cannot put
> fn:document-uri at the end of the query.

This is actually quite strange. Doc() always returns nodes or empty sequence, child always returns nodes or empty sequence, descendant always returns nodes or empty sequence, so this is very odd. Even a text or binary document would result in a node.

Could you try the following to figure out which document is causing the trouble?

for $doc in doc()/ns1:article//ns1:sub[not(@temp1 or @temp2)]
let $uri := try { base-uri($doc) } catch ($e) { () }
where not($uri)
return
    $doc

Kind regards,
Geert


Drs. G.P.H. Josten
Consultant


http://www.daidalos.nl/
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel.: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
http://www.daidalos.nl/
KvK 27164984
De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend.





More information about the General mailing list