summaryrefslogtreecommitdiff
path: root/src/raptor_qname.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2013-02-24 09:58:22 -0800
committerDave Beckett <dave@dajobe.org>2013-02-24 09:58:22 -0800
commita34a453bfa1189883a7832b1b3d45b24257b60f3 (patch)
tree3e3fb52820d21f762fe56c41761c6613842cd40a /src/raptor_qname.c
parent793e62bfb9421f092684c9d82650bbd83ce03a02 (diff)
downloadraptor-a34a453bfa1189883a7832b1b3d45b24257b60f3.tar.gz
(raptor_qname_string_to_uri): Handle qnames with two :s
Need to handle ':foo:...' QNames; just care about first ':'
Diffstat (limited to 'src/raptor_qname.c')
-rw-r--r--src/raptor_qname.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/raptor_qname.c b/src/raptor_qname.c
index d59d0247..18321821 100644
--- a/src/raptor_qname.c
+++ b/src/raptor_qname.c
@@ -448,11 +448,12 @@ raptor_qname_string_to_uri(raptor_namespace_stack *nstack,
if(*name == ':') {
name++;
name_len--;
+ p = name + name_len;
+ } else {
+ for(p = name; *p && *p != ':'; p++)
+ ;
}
- for(p = name; *p && *p != ':'; p++)
- ;
-
/* If ends with :, it is the URI of a namespace */
if(RAPTOR_GOOD_CAST(size_t, p-name) == (name_len - 1)) {
ns = raptor_namespaces_find_namespace(nstack, name,