summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ntriples_parse.c16
-rw-r--r--src/raptor_grddl.c3
-rw-r--r--src/raptor_guess.c3
-rw-r--r--src/raptor_json.c8
-rw-r--r--src/raptor_librdfa.c8
-rw-r--r--src/raptor_parse.c28
-rw-r--r--src/raptor_rdfxml.c8
-rw-r--r--src/raptor_rss.c3
-rw-r--r--src/raptor_serialize.c7
-rw-r--r--src/raptor_serialize_dot.c8
-rw-r--r--src/raptor_serialize_html.c8
-rw-r--r--src/raptor_serialize_json.c11
-rw-r--r--src/raptor_serialize_ntriples.c16
-rw-r--r--src/raptor_serialize_rdfxml.c8
-rw-r--r--src/raptor_serialize_rdfxmla.c16
-rw-r--r--src/raptor_serialize_rss.c16
-rw-r--r--src/raptor_serialize_turtle.c8
-rw-r--r--src/turtle_parser.y16
18 files changed, 128 insertions, 63 deletions
diff --git a/src/ntriples_parse.c b/src/ntriples_parse.c
index 4c27da44..83cb0d06 100644
--- a/src/ntriples_parse.c
+++ b/src/ntriples_parse.c
@@ -1088,6 +1088,11 @@ raptor_ntriples_parse_recognise_syntax(raptor_parser_factory* factory,
static const char* const ntriples_names[2] = { "ntriples", NULL };
+static const char* const ntriples_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-testcases/#ntriples",
+ NULL
+};
+
#define NTRIPLES_TYPES_COUNT 1
static const raptor_type_q ntriples_types[NTRIPLES_TYPES_COUNT + 1] = {
{ "text/plain", 10, 1},
@@ -1102,10 +1107,9 @@ raptor_ntriples_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = ntriples_names;
factory->desc.mime_types = ntriples_types;
- factory->desc.mime_types_count = NTRIPLES_TYPES_COUNT;
factory->desc.label = "N-Triples";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-testcases/#ntriples";
+ factory->desc.uri_strings = ntriples_uri_strings;
factory->desc.flags = 0;
@@ -1168,6 +1172,11 @@ raptor_nquads_parse_recognise_syntax(raptor_parser_factory* factory,
static const char* const nquads_names[2] = { "nquads", NULL };
+static const char* const nquads_uri_strings[2] = {
+ "http://sw.deri.org/2008/07/n-quads/",
+ NULL
+};
+
#define NQUADS_TYPES_COUNT 0
static const raptor_type_q nquads_types[NQUADS_TYPES_COUNT + 1] = {
{ NULL, 0, 0}
@@ -1181,10 +1190,9 @@ raptor_nquads_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = nquads_names;
factory->desc.mime_types = nquads_types;
- factory->desc.mime_types_count = NQUADS_TYPES_COUNT;
factory->desc.label = "N-Quads";
- factory->desc.uri_string = "http://sw.deri.org/2008/07/n-quads/";
+ factory->desc.uri_strings = nquads_uri_strings;
factory->desc.flags = 0;
diff --git a/src/raptor_grddl.c b/src/raptor_grddl.c
index 964c7055..7389e232 100644
--- a/src/raptor_grddl.c
+++ b/src/raptor_grddl.c
@@ -1978,10 +1978,9 @@ raptor_grddl_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = grddl_names;
factory->desc.mime_types = grddl_types;
- factory->desc.mime_types_count = GRDDL_TYPES_COUNT;
factory->desc.label = "Gleaning Resource Descriptions from Dialects of Languages";
- factory->desc.uri_string = NULL;
+ factory->desc.uri_strings = NULL;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;
diff --git a/src/raptor_guess.c b/src/raptor_guess.c
index c639ecac..ee49e3f7 100644
--- a/src/raptor_guess.c
+++ b/src/raptor_guess.c
@@ -225,10 +225,9 @@ raptor_guess_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = guess_names;
factory->desc.mime_types = NULL;
- factory->desc.mime_types_count = 0;
factory->desc.label = "Pick the parser to use using content type and URI";
- factory->desc.uri_string = NULL;
+ factory->desc.uri_strings = NULL;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;
diff --git a/src/raptor_json.c b/src/raptor_json.c
index f76072cf..f62feba0 100644
--- a/src/raptor_json.c
+++ b/src/raptor_json.c
@@ -703,6 +703,11 @@ raptor_json_parse_recognise_syntax(raptor_parser_factory* factory,
static const char* const json_names[2] = { "json", NULL };
+static const char* const json_uri_strings[2] = {
+ "http://n2.talis.com/wiki/RDF_JSON_Specification",
+ NULL
+};
+
#define JSON_TYPES_COUNT 2
static const raptor_type_q json_types[JSON_TYPES_COUNT + 1] = {
{ "application/json", 16, 1},
@@ -718,10 +723,9 @@ raptor_json_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = json_names;
factory->desc.mime_types = json_types;
- factory->desc.mime_types_count = JSON_TYPES_COUNT;
factory->desc.label = "RDF/JSON (either Triples or Resource-Centric)";
- factory->desc.uri_string = NULL; /* "http://n2.talis.com/wiki/RDF_JSON_Specification"; */
+ factory->desc.uri_strings = json_uri_strings;
factory->desc.flags = 0;
diff --git a/src/raptor_librdfa.c b/src/raptor_librdfa.c
index e64cc2a6..f14a0a28 100644
--- a/src/raptor_librdfa.c
+++ b/src/raptor_librdfa.c
@@ -322,6 +322,11 @@ raptor_librdfa_parse_recognise_syntax(raptor_parser_factory* factory,
static const char* const rdfa_names[2] = { "rdfa", NULL };
+static const char* const rdfa_uri_strings[2] = {
+ "http://www.w3.org/TR/rdfa/",
+ NULL
+};
+
#define RDFA_TYPES_COUNT 2
static const raptor_type_q html_types[RDFA_TYPES_COUNT + 1] = {
{ "text/html", 9, 6},
@@ -337,10 +342,9 @@ raptor_librdfa_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = rdfa_names;
factory->desc.mime_types = html_types;
- factory->desc.mime_types_count = RDFA_TYPES_COUNT;
factory->desc.label = "RDF/A via librdfa";
- factory->desc.uri_string = "http://www.w3.org/TR/rdfa/";
+ factory->desc.uri_strings = rdfa_uri_strings;
factory->desc.flags = 0;
diff --git a/src/raptor_parse.c b/src/raptor_parse.c
index c7405308..0ec25204 100644
--- a/src/raptor_parse.c
+++ b/src/raptor_parse.c
@@ -211,12 +211,6 @@ raptor_world_register_parser_factory(raptor_world* world,
(int)len, (int)type_q->mime_type_len);
}
}
-
- if(i != parser->desc.mime_types_count) {
- fprintf(stderr,
- "Parser %s saw %d mime types static count %d\n",
- parser->desc.names[0], i, parser->desc.mime_types_count);
- }
}
#endif
@@ -1301,12 +1295,22 @@ raptor_world_guess_parser_name(raptor_world* world,
if(score >= 10)
break;
- if(uri && factory->desc.uri_string &&
- !strcmp((const char*)raptor_uri_as_string(uri),
- (const char*)factory->desc.uri_string))
- /* got an exact match syntax for URI - return result */
- break;
-
+ if(uri && factory->desc.uri_strings) {
+ int j;
+ const char* uri_string = (const char*)raptor_uri_as_string(uri);
+ const char* factory_uri_string;
+
+ for(j = 0;
+ (factory_uri_string = factory->desc.uri_strings[j]);
+ j++) {
+ if(!strcmp(uri_string, factory_uri_string))
+ break;
+ }
+ if(uri_string)
+ /* got an exact match syntax for URI - return result */
+ break;
+ }
+
if(factory->recognise_syntax) {
int c = -1;
diff --git a/src/raptor_rdfxml.c b/src/raptor_rdfxml.c
index 2ae8fce7..0418788a 100644
--- a/src/raptor_rdfxml.c
+++ b/src/raptor_rdfxml.c
@@ -3145,6 +3145,11 @@ raptor_rdfxml_parse_finish_factory(raptor_parser_factory* factory)
static const char* const rdfxml_names[3] = { "rdfxml", "raptor", NULL};
+static const char* const rdfxml_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-syntax-grammar",
+ NULL
+};
+
#define RDFXML_TYPES_COUNT 2
static const raptor_type_q rdfxml_types[RDFXML_TYPES_COUNT + 1] = {
{ "application/rdf+xml", 19, 10},
@@ -3160,10 +3165,9 @@ raptor_rdfxml_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = rdfxml_names;
factory->desc.mime_types = rdfxml_types;
- factory->desc.mime_types_count = RDFXML_TYPES_COUNT;
factory->desc.label = "RDF/XML";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-syntax-grammar";
+ factory->desc.uri_strings = rdfxml_uri_strings;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;
diff --git a/src/raptor_rss.c b/src/raptor_rss.c
index 8c04c766..3f6e7ced 100644
--- a/src/raptor_rss.c
+++ b/src/raptor_rss.c
@@ -1689,10 +1689,9 @@ raptor_rss_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = rss_tag_soup_names;
factory->desc.mime_types = rss_tag_soup_types;
- factory->desc.mime_types_count = RSS_TAG_SOUP_TYPES_COUNT;
factory->desc.label = "RSS Tag Soup";
- factory->desc.uri_string = NULL;
+ factory->desc.uri_strings = NULL;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;
diff --git a/src/raptor_serialize.c b/src/raptor_serialize.c
index a162f583..8fe30f82 100644
--- a/src/raptor_serialize.c
+++ b/src/raptor_serialize.c
@@ -193,13 +193,6 @@ raptor_serializer_register_factory(raptor_world* world,
(int)len, (int)type_q->mime_type_len);
}
}
-
- if(i != serializer->desc.mime_types_count) {
- fprintf(stderr,
- "Serializer %s saw %d mime types static count %d\n",
- serializer->desc.names[0], i,
- serializer->desc.mime_types_count);
- }
}
#endif
diff --git a/src/raptor_serialize_dot.c b/src/raptor_serialize_dot.c
index 0875c17a..ddebfd09 100644
--- a/src/raptor_serialize_dot.c
+++ b/src/raptor_serialize_dot.c
@@ -543,6 +543,11 @@ raptor_dot_serializer_statement(raptor_serializer* serializer,
static const char* const dot_names[2] = { "dot", NULL};
+static const char* const dot_uri_strings[2] = {
+ "http://www.graphviz.org/doc/info/lang.html",
+ NULL
+};
+
#define DOT_TYPES_COUNT 1
static const raptor_type_q dot_types[DOT_TYPES_COUNT + 1] = {
{ "text/x-graphviz", 15, 5},
@@ -554,10 +559,9 @@ raptor_dot_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = dot_names;
factory->desc.mime_types = dot_types;
- factory->desc.mime_types_count = DOT_TYPES_COUNT;
factory->desc.label = "GraphViz DOT format";
- factory->desc.uri_string = "http://www.graphviz.org/doc/info/lang.html";
+ factory->desc.uri_strings = dot_uri_strings;;
factory->context_length = sizeof(raptor_dot_context);
diff --git a/src/raptor_serialize_html.c b/src/raptor_serialize_html.c
index 4593612c..6c5afb49 100644
--- a/src/raptor_serialize_html.c
+++ b/src/raptor_serialize_html.c
@@ -232,6 +232,11 @@ raptor_html_serialize_finish_factory(raptor_serializer_factory* factory)
static const char* const html_names[2] = { "html", NULL};
+static const char* const html_uri_strings[2] = {
+ "http://www.w3.org/1999/xhtml",
+ NULL
+};
+
#define HTML_TYPES_COUNT 2
static const raptor_type_q html_types[HTML_TYPES_COUNT + 1] = {
{ "application/xhtml+xml", 21, 10},
@@ -244,10 +249,9 @@ raptor_html_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = html_names;
factory->desc.mime_types = html_types;
- factory->desc.mime_types_count = HTML_TYPES_COUNT;
factory->desc.label = "HTML Table";
- factory->desc.uri_string = "http://www.w3.org/1999/xhtml";
+ factory->desc.uri_strings = html_uri_strings;
factory->context_length = sizeof(raptor_html_context);
diff --git a/src/raptor_serialize_json.c b/src/raptor_serialize_json.c
index 2f7c1c13..fef6b52c 100644
--- a/src/raptor_serialize_json.c
+++ b/src/raptor_serialize_json.c
@@ -475,10 +475,9 @@ raptor_json_triples_serializer_register_factory(raptor_serializer_factory *facto
{
factory->desc.names = json_triples_names;
factory->desc.mime_types = json_triples_types;
- factory->desc.mime_types_count = JSON_TRIPLES_TYPES_COUNT;
factory->desc.label = "RDF/JSON Triples";
- factory->desc.uri_string = NULL;
+ factory->desc.uri_strings = NULL;
factory->context_length = sizeof(raptor_json_context);
@@ -497,6 +496,11 @@ raptor_json_triples_serializer_register_factory(raptor_serializer_factory *facto
static const char* const json_resource_names[2] = { "json", NULL};
+static const char* const json_resource_uri_strings[2] = {
+ "http://n2.talis.com/wiki/RDF_JSON_Specification",
+ NULL
+};
+
#define JSON_RESOURCE_TYPES_COUNT 2
static const raptor_type_q json_resource_types[JSON_RESOURCE_TYPES_COUNT + 1] = {
{ "application/json", 16, 10},
@@ -509,10 +513,9 @@ raptor_json_resource_serializer_register_factory(raptor_serializer_factory *fact
{
factory->desc.names = json_resource_names;
factory->desc.mime_types = json_resource_types;
- factory->desc.mime_types_count = JSON_RESOURCE_TYPES_COUNT;
factory->desc.label = "RDF/JSON Resource-Centric";
- factory->desc.uri_string = "http://n2.talis.com/wiki/RDF_JSON_Specification";
+ factory->desc.uri_strings = json_resource_uri_strings;
factory->context_length = sizeof(raptor_json_context);
diff --git a/src/raptor_serialize_ntriples.c b/src/raptor_serialize_ntriples.c
index eb70cea3..cc39a921 100644
--- a/src/raptor_serialize_ntriples.c
+++ b/src/raptor_serialize_ntriples.c
@@ -257,6 +257,11 @@ raptor_ntriples_serialize_finish_factory(raptor_serializer_factory* factory)
#ifdef RAPTOR_SERIALIZER_NTRIPLES
static const char* const ntriples_names[2] = { "ntriples", NULL};
+static const char* const ntriples_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-testcases/#ntriples",
+ NULL
+};
+
#define NTRIPLES_TYPES_COUNT 1
static const raptor_type_q ntriples_types[NTRIPLES_TYPES_COUNT + 1] = {
{ "text/plain", 10, 1},
@@ -268,10 +273,9 @@ raptor_ntriples_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = ntriples_names;
factory->desc.mime_types = ntriples_types;
- factory->desc.mime_types_count = NTRIPLES_TYPES_COUNT;
factory->desc.label = "N-Triples";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-testcases/#ntriples";
+ factory->desc.uri_strings = ntriples_uri_strings;
factory->context_length = sizeof(raptor_ntriples_serializer_context);
@@ -291,6 +295,11 @@ raptor_ntriples_serializer_register_factory(raptor_serializer_factory *factory)
#ifdef RAPTOR_SERIALIZER_NQUADS
static const char* const nquads_names[2] = { "nquads", NULL};
+static const char* const nquads_uri_strings[2] = {
+ "http://sw.deri.org/2008/07/n-quads/#n-quads",
+ NULL
+};
+
#define NQUADS_TYPES_COUNT 1
static const raptor_type_q nquads_types[NQUADS_TYPES_COUNT + 1] = {
{ "text/x-nquads", 13, 10},
@@ -302,10 +311,9 @@ raptor_nquads_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = nquads_names;
factory->desc.mime_types = nquads_types;
- factory->desc.mime_types_count = NQUADS_TYPES_COUNT;
factory->desc.label = "N-Quads";
- factory->desc.uri_string = "http://sw.deri.org/2008/07/n-quads/#n-quads";
+ factory->desc.uri_strings = nquads_uri_strings;
factory->context_length = sizeof(raptor_ntriples_serializer_context);
diff --git a/src/raptor_serialize_rdfxml.c b/src/raptor_serialize_rdfxml.c
index a8d6f86c..86a40b78 100644
--- a/src/raptor_serialize_rdfxml.c
+++ b/src/raptor_serialize_rdfxml.c
@@ -699,6 +699,11 @@ raptor_rdfxml_serialize_finish_factory(raptor_serializer_factory* factory)
static const char* const rdfxml_names[2] = { "rdfxml", NULL};
+static const char* const rdfxml_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-syntax-grammar",
+ NULL
+};
+
#define RDFXML_TYPES_COUNT 2
static const raptor_type_q rdfxml_types[RDFXML_TYPES_COUNT + 1] = {
{ "application/rdf+xml", 19, 10},
@@ -711,10 +716,9 @@ raptor_rdfxml_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = rdfxml_names;
factory->desc.mime_types = rdfxml_types;
- factory->desc.mime_types_count = RDFXML_TYPES_COUNT;
factory->desc.label = "RDF/XML";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-syntax-grammar",
+ factory->desc.uri_strings = rdfxml_uri_strings,
factory->context_length = sizeof(raptor_rdfxml_serializer_context);
diff --git a/src/raptor_serialize_rdfxmla.c b/src/raptor_serialize_rdfxmla.c
index afd8169c..80fa1fb4 100644
--- a/src/raptor_serialize_rdfxmla.c
+++ b/src/raptor_serialize_rdfxmla.c
@@ -1478,6 +1478,11 @@ raptor_rdfxmla_serialize_finish_factory(raptor_serializer_factory* factory)
static const char* const rdfxml_xmp_names[2] = { "rdfxml-xmp", NULL};
+static const char* const rdfxml_xmp_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-syntax-grammar",
+ NULL
+};
+
#define RDFXML_XMP_TYPES_COUNT 1
static const raptor_type_q rdfxml_xmp_types[RDFXML_XMP_TYPES_COUNT + 1] = {
{ "application/rdf+xml", 19, 0},
@@ -1489,10 +1494,9 @@ raptor_rdfxml_xmp_serializer_register_factory(raptor_serializer_factory *factory
{
factory->desc.names = rdfxml_xmp_names;
factory->desc.mime_types = rdfxml_xmp_types;
- factory->desc.mime_types_count = RDFXML_XMP_TYPES_COUNT;
factory->desc.label = "RDF/XML (XMP Profile)";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-syntax-grammar";
+ factory->desc.uri_strings = rdfxml_xmp_uri_strings;
factory->context_length = sizeof(raptor_rdfxmla_context);
@@ -1511,6 +1515,11 @@ raptor_rdfxml_xmp_serializer_register_factory(raptor_serializer_factory *factory
static const char* const rdfxmla_names[2] = { "rdfxml-abbrev", NULL};
+static const char* const rdfxml_uri_strings[2] = {
+ "http://www.w3.org/TR/rdf-syntax-grammar",
+ NULL
+};
+
#define RDFXMLA_TYPES_COUNT 1
static const raptor_type_q rdfxmla_types[RDFXMLA_TYPES_COUNT + 1] = {
{ "application/rdf+xml", 19, 0},
@@ -1522,10 +1531,9 @@ raptor_rdfxmla_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = rdfxmla_names;
factory->desc.mime_types = rdfxmla_types;
- factory->desc.mime_types_count = RDFXMLA_TYPES_COUNT;
factory->desc.label = "RDF/XML (Abbreviated)";
- factory->desc.uri_string = "http://www.w3.org/TR/rdf-syntax-grammar";
+ factory->desc.uri_strings = rdfxml_uri_strings;
factory->context_length = sizeof(raptor_rdfxmla_context);
diff --git a/src/raptor_serialize_rss.c b/src/raptor_serialize_rss.c
index 051fb5be..2730f23f 100644
--- a/src/raptor_serialize_rss.c
+++ b/src/raptor_serialize_rss.c
@@ -2340,6 +2340,11 @@ raptor_rss10_serialize_finish_factory(raptor_serializer_factory* factory)
static const char* rss10_names[3] = { "rss-1.0", NULL};
+static const char* const rss10_uri_strings[2] = {
+"http://purl.org/rss/1.0/spec",
+ NULL
+};
+
#define RSS10_TYPES_COUNT 5
static const raptor_type_q rss10_types[RSS10_TYPES_COUNT + 1] = {
{ "application/rss+xml", 19, 10},
@@ -2355,10 +2360,9 @@ raptor_rss10_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = rss10_names;
factory->desc.mime_types = rss10_types;
- factory->desc.mime_types_count = RSS10_TYPES_COUNT;
factory->desc.label = "RSS 1.0";
- factory->desc.uri_string = "http://purl.org/rss/1.0/spec";
+ factory->desc.uri_strings = rss10_uri_strings;
factory->context_length = sizeof(raptor_rss10_serializer_context);
@@ -2378,6 +2382,11 @@ raptor_rss10_serializer_register_factory(raptor_serializer_factory *factory)
static const char* atom_names[3] = { "atom", NULL};
+static const char* const atom_uri_strings[2] = {
+ "http://www.ietf.org/rfc/rfc4287.txt",
+ NULL
+};
+
#define ATOM_TYPES_COUNT 1
static const raptor_type_q atom_types[ATOM_TYPES_COUNT + 1] = {
{ "application/atom+xml", 20, 10},
@@ -2389,10 +2398,9 @@ raptor_atom_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = atom_names;
factory->desc.mime_types = atom_types;
- factory->desc.mime_types_count = ATOM_TYPES_COUNT;
factory->desc.label = "Atom 1.0";
- factory->desc.uri_string = NULL;
+ factory->desc.uri_strings = atom_uri_strings;
factory->context_length = sizeof(raptor_rss10_serializer_context);
diff --git a/src/raptor_serialize_turtle.c b/src/raptor_serialize_turtle.c
index 43f2ae04..8ac3085a 100644
--- a/src/raptor_serialize_turtle.c
+++ b/src/raptor_serialize_turtle.c
@@ -1130,6 +1130,11 @@ raptor_turtle_serialize_finish_factory(raptor_serializer_factory* factory)
static const char* const turtle_names[2] = { "turtle", NULL};
+static const char* const turtle_uri_strings[2] = {
+ "http://www.dajobe.org/2004/01/turtle/",
+ NULL
+};
+
#define TURTLE_TYPES_COUNT 5
static const raptor_type_q turtle_types[TURTLE_TYPES_COUNT + 1] = {
{ "application/turtle", 18, 10},
@@ -1145,10 +1150,9 @@ raptor_turtle_serializer_register_factory(raptor_serializer_factory *factory)
{
factory->desc.names = turtle_names;
factory->desc.mime_types = turtle_types;
- factory->desc.mime_types_count = TURTLE_TYPES_COUNT;
factory->desc.label = "Turtle Terse RDF Triple Language";
- factory->desc.uri_string = "http://www.dajobe.org/2004/01/turtle";
+ factory->desc.uri_strings = turtle_uri_strings;
factory->context_length = sizeof(raptor_turtle_context);
diff --git a/src/turtle_parser.y b/src/turtle_parser.y
index a0c330a4..451b8f9d 100644
--- a/src/turtle_parser.y
+++ b/src/turtle_parser.y
@@ -1547,6 +1547,11 @@ raptor_trig_parse_recognise_syntax(raptor_parser_factory* factory,
#ifdef RAPTOR_PARSER_TURTLE
static const char* const turtle_names[4] = { "turtle", "ntriples-plus", "n3", NULL };
+
+static const char* const turtle_uri_strings[2] = {
+ "http://www.dajobe.org/2004/01/turtle/",
+ NULL
+};
#define TURTLE_TYPES_COUNT 5
static const raptor_type_q turtle_types[TURTLE_TYPES_COUNT + 1] = {
@@ -1567,10 +1572,9 @@ raptor_turtle_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = turtle_names;
factory->desc.mime_types = turtle_types;
- factory->desc.mime_types_count = TURTLE_TYPES_COUNT;
factory->desc.label = "Turtle Terse RDF Triple Language";
- factory->desc.uri_string = "http://www.dajobe.org/2004/01/turtle/";
+ factory->desc.uri_strings = turtle_uri_strings;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;
@@ -1591,6 +1595,11 @@ raptor_turtle_parser_register_factory(raptor_parser_factory *factory)
#ifdef RAPTOR_PARSER_TRIG
static const char* const trig_names[2] = { "trig", NULL };
+static const char* const trig_uri_strings[2] = {
+ "http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/",
+ NULL
+};
+
#define TRIG_TYPES_COUNT 1
static const raptor_type_q trig_types[TRIG_TYPES_COUNT + 1] = {
/* first one is the default */
@@ -1606,10 +1615,9 @@ raptor_trig_parser_register_factory(raptor_parser_factory *factory)
factory->desc.names = trig_names;
factory->desc.mime_types = trig_types;
- factory->desc.mime_types_count = TRIG_TYPES_COUNT;
factory->desc.label = "TriG - Turtle with Named Graphs";
- factory->desc.uri_string = "http://www.wiwiss.fu-berlin.de/suhl/bizer/TriG/Spec/";
+ factory->desc.uri_strings = trig_uri_strings;
factory->desc.flags = RAPTOR_SYNTAX_NEED_BASE_URI;