On 07/04/13 18:45, Erich Bremer wrote:
Hi,
I have a jena 2.10.0 Model and when I import a fully-formed turtle
document everything works great. The triples are added and the prefixes
for the Model are created from the imported data. However, if I define
my prefixes first in the Model, and then import the same turtle document
in, but, with imported document's prefix definitions removed, the import
fails. Should it fail? Or would it make more sense that if there are
matching prefixes, that it would use the pre-defined prefixes of the
model? - Erich
Erich Bremer
http://www.ebremer.com
Erich,
A parsed file has be a complete and self contained graph serialization
so it does need the prefixes in the file. Turtle is not defined for
fragments.
(You could create the Turtle parser directly and add the prefix mappings
before it's called but you are essentially creating a fragment parser -
the data isn't portable. You could also prepend the prefixes to the
stream somehow.)
Andy