From 1e8c93c6e760c4453c4fd1f471feebd7886692d3 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 10 Jul 2016 19:07:14 -0400 Subject: Add serd_node_new_relative_uri() --- serd/serd.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'serd/serd.h') 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). @@ -474,6 +474,25 @@ SERD_API 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. -- cgit v1.2.1