aboutsummaryrefslogtreecommitdiffstats
path: root/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-10 19:07:14 -0400
committerDavid Robillard <d@drobilla.net>2016-07-10 19:07:14 -0400
commit1e8c93c6e760c4453c4fd1f471feebd7886692d3 (patch)
tree0a7b77f7f27db3ceb401658cf18c883352dc7308 /serd
parentaf9356818981e83d5eb9430d4717b19c7316c154 (diff)
downloadserd-1e8c93c6e760c4453c4fd1f471feebd7886692d3.tar.gz
serd-1e8c93c6e760c4453c4fd1f471feebd7886692d3.tar.bz2
serd-1e8c93c6e760c4453c4fd1f471feebd7886692d3.zip
Add serd_node_new_relative_uri()
Diffstat (limited to 'serd')
-rw-r--r--serd/serd.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/serd/serd.h b/serd/serd.h
index c34eed01..9e0bf8e9 100644
--- a/serd/serd.h
+++ b/serd/serd.h
@@ -463,7 +463,7 @@ serd_node_new_file_uri(const uint8_t* path,
/**
Create a new node by serialising `uri` into a new string.
- @param uri The URI to parse and serialise.
+ @param uri The URI to serialise.
@param base Base URI to resolve `uri` against (or NULL for no resolution).
@@ -475,6 +475,25 @@ SerdNode
serd_node_new_uri(const SerdURI* uri, const SerdURI* base, SerdURI* out);
/**
+ Create a new node by serialising `uri` into a new relative URI.
+
+ @param uri The URI to serialise.
+
+ @param base Base URI to make `uri` relative to, if possible.
+
+ @param root Root URI for resolution (see serd_uri_serialise_relative()).
+
+ @param out Set to the parsing of the new URI (i.e. points only to
+ memory owned by the new returned node).
+*/
+SERD_API
+SerdNode
+serd_node_new_relative_uri(const SerdURI* uri,
+ const SerdURI* base,
+ const SerdURI* root,
+ SerdURI* out);
+
+/**
Create a new node by serialising `d` into an xsd:decimal string.
The resulting node will always contain a `.', start with a digit, and end