> for $i in doc()/ns1:article//ns1:sub[not(@temp1 or @temp2)]
> return
> base-uri($i)
>
> it returns 7 uris and they are actually the same uri  (/pt/ajr_1.xml), just
> because there are 7 ns1:sub nodes found.
>
> ------------------
>
> when I tried to run
> doc()/ns1:article//ns1:sub[not(@temp1 or @temp2)]/fn:base-uri(.)
>
> I got error  :
> Description: XDMP-NOTANODE:
> doc()/child::ns1:article/descendant::ns1:sub[attribute::temp1 or
> attribute::temp2]/base-uri(.) -- xs:anyURI("/pt/ajr_1.xml") is not a node

Those two look equivalent to me, so either the problem is in some
other part of the code you are not showing (are you literally running
those on their own in CQ or as part of a larger system?), or possibly
one of them is being rewritten behind the scenes differently to the
other...

Could you experiment a little more this time without the leading
doc().... its not necessary in this case.

cheers
andrew
_______________________________________________
General mailing list
General@developer.marklogic.com
http://xqzone.com/mailman/listinfo/general

Reply via email to