diff options
author | Dave Beckett <dave@dajobe.org> | 2007-06-11 06:35:09 +0000 |
---|---|---|
committer | Dave Beckett <dave@dajobe.org> | 2007-06-11 06:35:09 +0000 |
commit | 8bd184154b56ee5964ed4c0fee64782037c782d2 (patch) | |
tree | bf34172fb3da0b4a090ee1fb93b1345bab8fdaf9 /src/raptor_grddl.c | |
parent | 3048c9ccfed21d189f6e8a8b5c5dc0980bc9bbd3 (diff) | |
download | raptor-8bd184154b56ee5964ed4c0fee64782037c782d2.tar.gz |
(raptor_grddl_parse_chunk): Recognise root rdf:RDF element and
process as RDF/XML. Fix RDF/XML parsing of doc to not filter
triples.
Diffstat (limited to 'src/raptor_grddl.c')
-rw-r--r-- | src/raptor_grddl.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/raptor_grddl.c b/src/raptor_grddl.c index 6125a934..b8c87961 100644 --- a/src/raptor_grddl.c +++ b/src/raptor_grddl.c @@ -1420,6 +1420,15 @@ raptor_grddl_parse_chunk(raptor_parser* rdf_parser, int n; RAPTOR_DEBUG2("Root namespace URI is %s\n", ns_uri_string); + + if(!strcmp((const char*)ns_uri_string, + (const char*)raptor_rdf_namespace_uri) && + !strcmp((const char*)xnp->name, "RDF")) { + RAPTOR_DEBUG3("Parser %p: Root element of %s is rdf:RDF - process this as RDF/XML later\n", + rdf_parser, raptor_uri_as_string(rdf_parser->base_uri)); + grddl_parser->process_this_as_rdfxml=1; + } + for(n=0; grddl_namespace_uris_ignore_list[n]; n++) { if(!strcmp(grddl_namespace_uris_ignore_list[n], (const char*)ns_uri_string)) { @@ -1586,7 +1595,7 @@ raptor_grddl_parse_chunk(raptor_parser* rdf_parser, RAPTOR_DEBUG2("Running additional RDF/XML parse on root document URI '%s' content\n", raptor_uri_as_string(rdf_parser->base_uri)); - if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 1)) + if(raptor_grddl_ensure_internal_parser(rdf_parser, "rdfxml", 0)) ret=1; else { if(raptor_start_parse(grddl_parser->internal_parser, |