[tracker/wip/carlosg/anonymous-nodes: 24/24] docs: Mention ANONYMOUS_BNODES flag in the docs
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker/wip/carlosg/anonymous-nodes: 24/24] docs: Mention ANONYMOUS_BNODES flag in the docs
- Date: Fri, 8 Oct 2021 09:40:56 +0000 (UTC)
commit 1be7aa9e00a5207f065245aa3763cff3ca191d7c
Author: Carlos Garnacho <carlosg gnome org>
Date: Wed Oct 6 00:14:54 2021 +0200
docs: Mention ANONYMOUS_BNODES flag in the docs
We briefly mention SPARQL 1.1 behavior WRT blank nodes, change the wording
at these places so the behavior of the
TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES flag is covered.
.../libtracker-sparql/sparql-and-tracker.md | 8 ++++++--
docs/reference/libtracker-sparql/tutorial.md | 23 +++++++++++-----------
2 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/docs/reference/libtracker-sparql/sparql-and-tracker.md
b/docs/reference/libtracker-sparql/sparql-and-tracker.md
index 859985012..dc6ba79c6 100644
--- a/docs/reference/libtracker-sparql/sparql-and-tracker.md
+++ b/docs/reference/libtracker-sparql/sparql-and-tracker.md
@@ -37,11 +37,15 @@ the RDF abstract syntax, a blank node is just a unique node that can
be used in one or more RDF statements, but has no intrinsic name.
```
-Tracker treats blank nodes as an URI generator instead. The string
-referencing a blank node (e.g. as returned by cursors) permanently
+By default Tracker treats blank nodes as an URI generator instead. The
+string referencing a blank node (e.g. as returned by cursors) permanently
identifies that blank node and can be used as an URI reference in
future queries.
+The blank node behavior defined in the RDF/SPARQL specifications can
+be enabled with the [](TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES)
+flag.
+
## Property functions
The [SPARQL documentation](https://www.w3.org/TR/sparql11-query/#expressions)
diff --git a/docs/reference/libtracker-sparql/tutorial.md b/docs/reference/libtracker-sparql/tutorial.md
index d92a17217..0f0691d56 100644
--- a/docs/reference/libtracker-sparql/tutorial.md
+++ b/docs/reference/libtracker-sparql/tutorial.md
@@ -855,12 +855,13 @@ INSERT DATA {
Where any second insert would be redundantly attempting to add the same
triple to the store.
-Tracker deviates from the SPARQL standard in the handling of blank nodes.
-By default blank nodes are not really anonymous, they get a generated
-unique URN. The SPARQL standard makes blank nodes truly anonymous, you can
-only use them to determine that there is something that matches the graph
-pattern you defined. The practical difference could be seen with this
-query:
+By default, Tracker deviates from the SPARQL standard in the handling
+of blank nodes, these are considered a generator of URIs. The
+[](TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES) flag may be used to
+make Tracker honor the SPARQL 1.1 standard with those. The standard
+defines blank nodes as truly anonymous, you can only use them to determine
+that there is something that matches the graph pattern you defined. The
+practical difference could be seen with this query:
```SPARQL
SELECT ?u {
@@ -869,11 +870,11 @@ SELECT ?u {
}
```
-Tracker will provide you with URNs that can be fed into other SPARQL queries
-as URIs, while a other SPARQL engines will not. In these, the returned
-elements will be temporary names that can only be used to determine the
-existence of a distinct match. There, blank nodes can match named nodes, but
-named nodes do not match with blank nodes.
+Tracker by default will provide you with URNs that can be fed into other
+SPARQL queries as URIs. With [](TRACKER_SPARQL_CONNECTION_FLAGS_ANONYMOUS_BNODES)
+enabled, the returned elements will be temporary names that can only be used to
+determine the existence of a distinct match. There, blank nodes can match named
+nodes, but named nodes do not match with blank nodes.
This nature of blank nodes is however useful to query for elements whose
resource URI is irrelevant, e.g.:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]