www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
db.dba.rdf_64bit_upg...
db.dba.rdf_audit_met...
db.dba.rdf_backup_me...
db.dba.rdf_convert_r...
db.dba.rdf_datatype_...
db.dba.rdf_graph_col...
db.dba.rdf_graph_dif...
db.dba.rdf_graph_gro...
db.dba.rdf_graph_gro...
db.dba.rdf_langmatch...
db.dba.rdf_load_rdfa
db.dba.rdf_load_rdfx...
db.dba.rdf_load_rdfx...
db.dba.rdf_quad_uri
db.dba.rdf_quad_uri_...
db.dba.rdf_quad_uri_...
db.dba.rdf_regex
db.dba.rdf_restore_m...
db.dba.rdf_suo_apply...
db.dba.rdf_suo_diff_...
db.dba.rdf_triples_t...
db.dba.rdf_triples_t...
db.dba.rdf_ttl2hash
db.dba.rdf_void_stor...
db.dba.sparql_eval
db.dba.sparql_eval_t...
db.dba.sparql_rdb2rd...
db.dba.sparql_rdb2rd...
db.dba.sparql_rexec
db.dba.sparql_rexec_...
db.dba.sparql_rexec_...
db.dba.sparql_select...
db.dba.ttlp
db.dba.ttlp_mt
db.dba.ttlp_mt_local...
group_concat
group_digest
isref
rdf_view_sync_to_phy...
sample
__xml_get_ns_prefix
__xml_get_ns_uri
__xml_ns_iristr
__xml_ns_uname
__xml_nsexpand_irist...
http_nt_triple
http_ttl_triple
iri_split
ld_dir
rdfs_rule_set
sparql_to_sql_text
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
VAD
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

__xml_nsexpand_iristr

Checks if the string is QName and if it is so then replaces namespace prefix to the full namespace IRI.
__xml_nsexpand_iristr (in str varchar);
Description

Checks if the string is QName and if it is so then replaces namespace prefix to the full namespace IRI. Otherwise signals error if the argument is local IRI without a prefix.

Parameters
str – QName. For ex. if QName is "prefix:local", then conveniently is replaced "prefix:" with the namespace IRI
Examples
Example with FOAF namespace prefix

SQL> SELECT __xml_nsexpand_iristr ('foaf:knows');
__xml_nsexpand_iristr
VARCHAR
_______________________________________________________________________________

http://xmlns.com/foaf/0.1/knows

1 Rows. -- 0 msec.
Example with no namespace prefix

SQL> SELECT __xml_nsexpand_iristr ('no-namespace-prefix-iri');

*** Error 22023: [Virtuoso Driver][Virtuoso Server]SR649: 
No XML namespace prefix in string "no-namespace-prefix-iri"
in
__xml_nsexpand_iristr:(BIF),
        __01 => 'no-namespace-prefix-iri',
<Top Level>
at line 5 of Top-Level:
SELECT __xml_nsexpand_iristr ('no-namespace-prefix-iri')
Example with namespace prefix "local"

SQL> SELECT __xml_nsexpand_iristr ('no-such-prefix:local');

*** Error 22023: [Virtuoso Driver][Virtuoso Server]SR648: 
Unknown XML namespace prefix in IRI "no-such-prefix:local"
in
__xml_nsexpand_iristr:(BIF),
        __01 => 'no-such-prefix:local',
<Top Level>
at line 6 of Top-Level:
SELECT __xml_nsexpand_iristr ('no-such-prefix:local')
Example with namespace prefix ""no-such-prefix""

SQL> SELECT __xml_ns_iristr ('no-such-prefix', 'knows');

*** Error 22023: [Virtuoso Driver][Virtuoso Server]SR648: Unknown XML namespace prefix "no-such-prefix"
in
__xml_ns_iristr:(BIF),
        __01 => 'no-such-prefix',
        __02 => 'knows',
<Top Level>
at line 7 of Top-Level:
SELECT __xml_ns_iristr ('no-such-prefix', 'knows')
See Also

xml_ns_uname

xml_ns_iristr

xml_get_ns_prefix

xml_get_ns_uri