I don’t know why the default was changed but please bear in mind that you’re not just going from 2.x to 3.x but are jumping from 2.11.0 which was released September 2013 to 3.0.1 which was released December 2015 and there were six other releases between those two. Lots of things changed in that timescale.
Is there a particular reason you are not going straight to 3.1.0 which is from May 2016? Rob On 22/07/2016 10:27, "Martynas Jusevičius" <[email protected]> wrote: RDFWriterRegistry.register(Lang.RDFXML, RDFFormat.RDFXML_PLAIN) did the trick. Why was the default changed though? I think it should be mentioned in the 3.x migration guide: https://jena.apache.org/documentation/migrate_jena2_jena3.html On Fri, Jul 22, 2016 at 10:22 AM, Andy Seaborne <[email protected]> wrote: > On 21/07/16 23:44, Martynas Jusevičius wrote: >> >> Hey, >> >> I noticed that after upgrade from 2.11.0 to 3.0.1 the RDF/XML output >> changed: element name is used instead of rdf:Description + rdf:type, >> rdf:nodeID attribute is gone etc (output below). >> >> The model is written the same way, like this: >> >> model.write(baos, RDFLanguages.RDFXML.getName(), null); > > > RDFFormat for variants: > > RDFDataMgr.write(baos, model, RDFFormat.RDFXML_PLAIN); > >> >> Am I right? How do I get the old behavior, i.e. write the plain RDF/XML >> format? > > > RDFFormat.RDFXML_PLAIN > > Or change the registry? > > model.write(System.out, "RDF/XML") ; > RDFWriterRegistry.register(Lang.RDFXML, RDFFormat.RDFXML_PLAIN); > model.write(System.out, "RDF/XML") ; > > Andy > > >> >> I think I have traced 3.0.1 behaviour to >> RDFWriterRegistry.defaultSerialization(Lang lang) which chooses >> RDFFormat(Lang.RDFXML, ABBREV). >> >> 2.11.0 >> >> <rdf:RDF >> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> xmlns:j.0="http://purl.org/dc/terms/" >> xmlns:j.1="http://www.w3.org/2011/http#"> >> <rdf:Description rdf:nodeID="A0"> >> <j.0:title >> rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Agent not >> authorized</j.0:title> >> <rdf:type >> rdf:resource="http://www.w3.org/2011/http#Response"></rdf:type> >> <j.1:reasonPhrase >> >> rdf:datatype="http://www.w3.org/2001/XMLSchema#string">Forbidden</j.1:reasonPhrase> >> <j.1:sc >> rdf:resource="http://www.w3.org/2011/http-statusCodes#Forbidden"></j.1:sc> >> <j.1:statusCodeValue >> >> rdf:datatype="http://www.w3.org/2001/XMLSchema#long">403</j.1:statusCodeValue> >> </rdf:Description> >> </rdf:RDF> >> >> 3.0.1 >> >> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" >> xmlns:j.0="http://purl.org/dc/terms/" >> xmlns:j.1="http://www.w3.org/2011/http#"> >> <j.1:Response> >> <j.0:title>Agent not authorized</j.0:title> >> <j.1:sc >> rdf:resource="http://www.w3.org/2011/http-statusCodes#Forbidden"></j.1:sc> >> <j.1:reasonPhrase>Forbidden</j.1:reasonPhrase> >> <j.1:statusCodeValue >> >> rdf:datatype="http://www.w3.org/2001/XMLSchema#long">403</j.1:statusCodeValue> >> </j.1:Response> >> </rdf:RDF> >> >> >> Martynas >> atomgraph.com >> >
