Hmm ... Using the below little program and your data, I can read,
save and re-read your data consistently without errors. Rapper
can also read the output. Using SWI-Prolog 7.3.17. What are
you doing differently? Possibly you have registered prefixes?
Which?
Cheers --- Jan
:- use_module(library(semweb/rdf_db)).
l :-
rdf_load('FinalRDF.rdf').
s :-
rdf_save('test.rdf', []).
rl :-
rdf_reset_db,
rdf_load('test.rdf').
On 02/29/2016 08:44 PM, brolog wrote:
> Hi Jan, thanks for replying.
>
> Using rdf_save_turtle/2 then loading the file with load_turtle/1 works.
> I can work with this for now, thank you for the suggestion.
>
> I've uploaded a sample of my RDF file which produced the errors after
> saving via rdf_save if you would like to reproduce the errors I'm
> getting. If you load the attached into Prolog, perform rdf_save, and try
> to load the new file it will bring up a bunch of errors.
>
>
> On Monday, February 29, 2016 at 2:53:14 AM UTC-5, Jan Wielemaker wrote:
>
> I vaguely recall there is a problem with this, although I do not have a
> reproducible case. I'd use rdf_save_turtle/2. RDF/XML is old school.
> If you can provide me with a reproducible case for the RDF/XML version,
> please share it.
>
> Cheers --- Jan
>
> On 02/29/2016 02:45 AM, brolog wrote:
> > Hello,
> >
> > I am trying to use rdf_save/1 to save some changes I made to my rdf
> > triple store in Prolog. However, some namespace declarations are not
> > being saved into my new file, so I get a bunch of errors when I
> try to
> > load my new file. Wondering if maybe I'm doing something wrong or if
> > there is any way to get the namespaces saved as they are in the
> original
> > file? I tried saving via rdf_save/2 but I can't figure out
> exactly how
> > to use the namespaces option (keeps returning 'false').
> >
> > Thanks!
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "SWI-Prolog" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to
swi-prolog+...@googlegroups.com <javascript:>
> > <mailto:
swi-prolog+...@googlegroups.com <javascript:>>.
> <
https://groups.google.com/group/swi-prolog>.
> <
https://groups.google.com/d/optout>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "SWI-Prolog" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
swi-prolog+...@googlegroups.com
> <mailto:
swi-prolog+...@googlegroups.com>.