aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS1
-rw-r--r--src/n3.c21
-rw-r--r--src/writer.c36
-rw-r--r--test/bad/bad-ext-namedblank-op.ttl3
-rw-r--r--test/bad/manifest.ttl6
-rw-r--r--test/good/manifest.ttl14
-rw-r--r--test/good/test-ext-namedblank-iri.nt2
-rw-r--r--test/good/test-ext-namedblank-iri.ttl3
-rw-r--r--test/good/test-ext-namedblank-prefix.nt2
-rw-r--r--test/good/test-ext-namedblank-prefix.ttl3
10 files changed, 7 insertions, 84 deletions
diff --git a/NEWS b/NEWS
index 37bcf88f..67ccdac4 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
serd (1.0.1) unstable;
* Remove serd_uri_to_path()
+ * Remove support for Turtle named inline nodes extension
* Remove useless character counting from API
-- David Robillard <d@drobilla.net> Wed, 13 Jan 2021 13:29:44 +0000
diff --git a/src/n3.c b/src/n3.c
index 33828258..101768bc 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1057,22 +1057,6 @@ read_BLANK_NODE_LABEL(SerdReader* const reader,
return SERD_SUCCESS;
}
-static Ref
-read_blankName(SerdReader* const reader)
-{
- eat_byte_safe(reader, '=');
- if (eat_byte_check(reader, '=') != '=') {
- r_err(reader, SERD_ERR_BAD_SYNTAX, "expected `='\n");
- return 0;
- }
-
- Ref subject = 0;
- bool ate_dot = false;
- read_ws_star(reader);
- read_iri(reader, &subject, &ate_dot);
- return subject;
-}
-
static SerdStatus
read_anon(SerdReader* const reader,
ReadContext ctx,
@@ -1086,11 +1070,6 @@ read_anon(SerdReader* const reader,
*ctx.flags |= (subject) ? SERD_EMPTY_S : SERD_EMPTY_O;
} else {
*ctx.flags |= (subject) ? SERD_ANON_S_BEGIN : SERD_ANON_O_BEGIN;
- if (peek_delim(reader, '=')) {
- if (!(*dest = read_blankName(reader)) || !eat_delim(reader, ';')) {
- return SERD_ERR_BAD_SYNTAX;
- }
- }
}
if (!*dest) {
diff --git a/src/writer.c b/src/writer.c
index 6e49156a..d208a1cf 100644
--- a/src/writer.c
+++ b/src/writer.c
@@ -565,20 +565,13 @@ is_name(const uint8_t* buf, const size_t len)
}
static bool
-write_uri_node(SerdWriter* const writer,
- const SerdNode* node,
- const Field field,
- const SerdStatementFlags flags)
+write_uri_node(SerdWriter* const writer,
+ const SerdNode* node,
+ const Field field)
{
SerdNode prefix;
SerdChunk suffix;
- if (is_inline_start(writer, field, flags)) {
- ++writer->indent;
- write_sep(writer, SEP_ANON_BEGIN);
- sink("== ", 3, writer);
- }
-
const bool has_scheme = serd_uri_string_has_scheme(node->buf);
if (supports_abbrev(writer)) {
if (field == FIELD_PREDICATE &&
@@ -632,19 +625,11 @@ write_uri_node(SerdWriter* const writer,
}
write_sep(writer, SEP_URI_END);
- if (is_inline_start(writer, field, flags)) {
- sink(" ;", 2, writer);
- write_newline(writer);
- }
-
return true;
}
static bool
-write_curie(SerdWriter* const writer,
- const SerdNode* node,
- const Field field,
- const SerdStatementFlags flags)
+write_curie(SerdWriter* const writer, const SerdNode* const node)
{
SerdChunk prefix = {NULL, 0};
SerdChunk suffix = {NULL, 0};
@@ -664,16 +649,7 @@ write_curie(SerdWriter* const writer,
break;
case SERD_TURTLE:
case SERD_TRIG:
- if (is_inline_start(writer, field, flags)) {
- ++writer->indent;
- write_sep(writer, SEP_ANON_BEGIN);
- sink("== ", 3, writer);
- }
write_lname(writer, node->buf, node->n_bytes);
- if (is_inline_start(writer, field, flags)) {
- sink(" ;", 2, writer);
- write_newline(writer);
- }
}
return true;
@@ -741,10 +717,10 @@ write_node(SerdWriter* writer,
ret = write_literal(writer, node, datatype, lang, flags);
break;
case SERD_URI:
- ret = write_uri_node(writer, node, field, flags);
+ ret = write_uri_node(writer, node, field);
break;
case SERD_CURIE:
- ret = write_curie(writer, node, field, flags);
+ ret = write_curie(writer, node);
break;
case SERD_BLANK:
ret = write_blank(writer, node, field, flags);
diff --git a/test/bad/bad-ext-namedblank-op.ttl b/test/bad/bad-ext-namedblank-op.ttl
deleted file mode 100644
index 5e648393..00000000
--- a/test/bad/bad-ext-namedblank-op.ttl
+++ /dev/null
@@ -1,3 +0,0 @@
-@prefix eg: <http://example.org/eg#> .
-
-eg:s eg:p [ =: _:o ; eg:name "o" ] .
diff --git a/test/bad/manifest.ttl b/test/bad/manifest.ttl
index 5f208983..96a0b593 100644
--- a/test/bad/manifest.ttl
+++ b/test/bad/manifest.ttl
@@ -47,7 +47,6 @@
<#bad-eof-in-uri>
<#bad-eof-in-uri-scheme>
<#bad-escape>
- <#bad-ext-namedblank-op>
<#bad-graph-blank-label>
<#bad-hex-digit>
<#bad-id-clash>
@@ -280,11 +279,6 @@
mf:name "bad-escape" ;
mf:action <bad-escape.ttl> .
-<#bad-ext-namedblank-op>
- rdf:type rdft:TestTurtleNegativeSyntax ;
- mf:name "bad-ext-namedblank-op" ;
- mf:action <bad-ext-namedblank-op.ttl> .
-
<#bad-graph-blank-label>
rdf:type rdft:TestTrigNegativeSyntax ;
mf:name "bad-graph-blank-label" ;
diff --git a/test/good/manifest.ttl b/test/good/manifest.ttl
index 1a482f2d..2bf36caf 100644
--- a/test/good/manifest.ttl
+++ b/test/good/manifest.ttl
@@ -32,8 +32,6 @@
<#test-empty>
<#test-eof-at-page-end>
<#test-escapes>
- <#test-ext-namedblank-iri>
- <#test-ext-namedblank-prefix>
<#test-form-feed>
<#test-id>
<#test-lang>
@@ -193,18 +191,6 @@
mf:action <test-escapes.ttl> ;
mf:result <test-escapes.nt> .
-<#test-ext-namedblank-iri>
- rdf:type rdft:TestTurtleEval ;
- mf:name "test-ext-namedblank-iri" ;
- mf:action <test-ext-namedblank-iri.ttl> ;
- mf:result <test-ext-namedblank-iri.nt> .
-
-<#test-ext-namedblank-prefix>
- rdf:type rdft:TestTurtleEval ;
- mf:name "test-ext-namedblank-prefix" ;
- mf:action <test-ext-namedblank-prefix.ttl> ;
- mf:result <test-ext-namedblank-prefix.nt> .
-
<#test-form-feed>
rdf:type rdft:TestTurtleEval ;
mf:name "test-form-feed" ;
diff --git a/test/good/test-ext-namedblank-iri.nt b/test/good/test-ext-namedblank-iri.nt
deleted file mode 100644
index 26075a73..00000000
--- a/test/good/test-ext-namedblank-iri.nt
+++ /dev/null
@@ -1,2 +0,0 @@
-<http://example.org/eg#s> <http://example.org/eg#p> <http://example.org/object> .
-<http://example.org/object> <http://example.org/eg#name> "o" .
diff --git a/test/good/test-ext-namedblank-iri.ttl b/test/good/test-ext-namedblank-iri.ttl
deleted file mode 100644
index 28fb32ab..00000000
--- a/test/good/test-ext-namedblank-iri.ttl
+++ /dev/null
@@ -1,3 +0,0 @@
-@prefix eg: <http://example.org/eg#> .
-
-eg:s eg:p [ == <http://example.org/object> ; eg:name "o" ] .
diff --git a/test/good/test-ext-namedblank-prefix.nt b/test/good/test-ext-namedblank-prefix.nt
deleted file mode 100644
index 9a2710fb..00000000
--- a/test/good/test-ext-namedblank-prefix.nt
+++ /dev/null
@@ -1,2 +0,0 @@
-<http://example.org/eg#s> <http://example.org/eg#p> <http://example.org/eg#o> .
-<http://example.org/eg#o> <http://example.org/eg#name> "o" .
diff --git a/test/good/test-ext-namedblank-prefix.ttl b/test/good/test-ext-namedblank-prefix.ttl
deleted file mode 100644
index 7de79655..00000000
--- a/test/good/test-ext-namedblank-prefix.ttl
+++ /dev/null
@@ -1,3 +0,0 @@
-@prefix eg: <http://example.org/eg#> .
-
-eg:s eg:p [ == eg:o ; eg:name "o" ] .