I tried again using a very small RDF/XML file (attached). This RDF/XML file defined namespace alias at the very beginning. model.listNameSpaces() gave me all four actual namespaces without the alias. But getNsPrefixMap() only gave me an empty Map.
Could this be a bug in getNsPrefixMap()? Thanks! - Charles On Thu, Aug 1, 2013 at 4:02 AM, Chris Dollin <[email protected]>wrote: > On Thursday, August 01, 2013 09:31:22 AM Dave Reynolds wrote: > > > Given that the getNsPrefixMap is empty I imagine that the RDF/XML > > doesn't actually define any prefixes. > > It's going to need prefixes for all the predicate namespaces. (That's > why Jena sometimes invents j.NNNN prefixes when it writes models out.) > > Chris > > -- > "The wizard seemed quite willing when I talked to him." /Howl's Moving > Castle/ > > Epimorphics Ltd, http://www.epimorphics.com > Registered address: Court Lodge, 105 High Street, Portishead, Bristol BS20 > 6PT > Epimorphics Ltd. is a limited company registered in England (number > 7016688) > >
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:oslc_blog="http://open-services.net/ns/bogus/blogs#"> <oslc_blog:Entry rdf:about="http://example.com/blogs/entry/1"> <dcterms:title>I love trash</dcterms:title> <dcterms:modified>2002-10-10T12:00:00-05:00</dcterms:modified> <dcterms:content> Anything dirty or dingy or dusty. Anything ragged or rotten or rusty. </dcterms:content> <dcterms:creator> <foaf:Person> <foaf:name>Oscar T. Grouch</foaf:name> </foaf:Person> </dcterms:creator> </oslc_blog:Entry> </rdf:RDF>
