Helen Chen wrote:

  Hi,

> and in documetn http://www.w3.org/TR/xpath-functions/#func-base-uri
> it also returns xs:anyURI.

  Yes you're right.  Weird, I first wrote my response, then
double checked in this same document and added the note about
xs:string...  I guess I was not really awake at that time :-)
Thanks for the correction.

> Maybe I missed something in this problem, I checked the query
> with "/." at the end of the query, it returns node type, I feel
> that I just cannot put this kind of function like fn:base-uri()
> at the end of xpath using "/" operator.  And I don't know where
> I get wrong.  I'm testing more and I'll keep everyone posted.

  I've seen your other email.  Maybe I was not clear, sorry.  The
expression you showed returns an xs:anyURI.  The error message
says that an xs:anyURI item is somewhere it expects a node.

  Because I don't know how you evaluate the expression, and what
you do with its result, I can only guess.  And the most likely
reasons I can think of, but I am sure there are other, are:

    1/ you actually only showed part of your query and the result
       of this sub-expression is later used as the left-hand side
       operand of the operator '/': $uri/path, which is not legal;

    2/ you evaluate the expression from say, Java, and you try to
       use the result as a node.

  But I can't tell from your initial message.  Hope that helps,
regards,

-- 
Florent Georges
http://www.fgeorges.org/
























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

Reply via email to