xs:anyURI

Converts $string-var that contains a URI (Uniform Resource Identifier Reference) to the anyURI data type.

If the value of $string-var is the empty sequence, the empty sequence is returned. The empty sequence is a sequence containing zero items (), which is similar to null in SQL.

Signatures

xs:anyURI(xs:string $string-var) —> xs:anyURI

Arguments

Data Type
Argument
Description

xs:string

$string-var

Represents the conversion string that contains the URI (Uniform Resource Identifier Reference)

Returns

Returns the $string-var converted to anyURI data type.

Examples

Simple

When you invoke the following query:

<result>{xs:anyURI("http://www.acme.org/")}</result> 

The preceding query generates the following result:

<result>http://www.acme.org/</result> 

Related Topics

W3C anyURI data type description