diff options
Diffstat (limited to 'include/serd/node.h')
-rw-r--r-- | include/serd/node.h | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/include/serd/node.h b/include/serd/node.h index b308a507..1faba160 100644 --- a/include/serd/node.h +++ b/include/serd/node.h @@ -38,9 +38,14 @@ typedef struct SerdNodeImpl SerdNode; /** Type of a node. - An abstract RDF node can be either a resource or a literal. This type is - more precise to preserve syntactic differences and support additional - features. + Note that this set of types is both more precise than, and extended from, + the possible types of an abstract RDF node. Not all types can occur in all + contexts, for example, a Turtle document can't contain a variable node. + + The string value of a node never contains quoting or other type indicators. + For example, the blank node `_:id3` and the plain literal `"id3"` from a + Turtle document would both have the same string, "id3", returned by + #serd_node_string. */ typedef enum { /** @@ -82,6 +87,19 @@ typedef enum { Turtle](http://www.w3.org/TR/turtle/#grammar-production-BLANK_NODE_LABEL) */ SERD_BLANK = 4, + + /** + A variable node. + + A variable's identity is, like blank nodes, local to its context. + Variables are typically used in interfaces for querying, rather than + present in data (there is no concept of a variable in RDF or its standard + syntaxes). + + @see [SPARQL 1.1 Query + Language](https://www.w3.org/TR/sparql11-query/#rVar) + */ + SERD_VARIABLE = 5, } SerdNodeType; /// Node flags, which ORed together make a #SerdNodeFlags |