On 01/08/13 09:34, Chris Dollin wrote:
On Thursday, August 01, 2013 09:18:10 AM Chris Dollin wrote:
Hence you won't get namespaces for URIs used
only as subjects or objects. (And those namespaces don't need prefixes.)

Don't need them for the RDF/XML serialisation, that is.

Chris


A different way is to use the parser on the file and just catch the namespaces.

StreamRDF is the interface of parser events.

RDFDataMgr.parse(StreamRDF, ...)

One catch - this only marks where prefixes are defined, not their scope, and in RDF/XML, prefixes start and stop in scope.

If their scope is the whole file, they will be in the first few lines of the RDF/XML so Chris's solution using "head" works.

        Andy

Reply via email to