[xquery-talk] The value does not conform to the lexical constraints defined for the xs:anyURI type
Robby Pelssers
robby.pelssers at nxp.com
Wed Dec 19 01:11:55 PST 2012
Hi all,
I tested following Xquery with Sedna and Zorba:
declare function local:getPipUri($id as xs:string) as xs:anyURI {
xs:anyURI(concat("http://www.nxp.com/pip/", $id))
};
local:getPipUri("CX24483 14LZ")
Sedna throws an exception:
2012/12/19 10:07:09 database query/update failed (SEDNA Message: ERROR FORG0001
Invalid value for cast/constructor.
Details: The value does not conform to the lexical constraints defined for the xs:anyURI type.
Query line: 6, column:4
)
http://www.zorba-xquery.com/html/demo happy returns "http://www.nxp.com/pip/CX24483 14LZ"
So how does the xs:anyURI cast work? Is the developer supposed to encode the String before passing it to xs:anyURI or is the anyURI function supposed to do this?
Thx in advance,
Robby
More information about the talk
mailing list