You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (JIRA)" <ji...@apache.org> on 2018/02/03 18:07:02 UTC

[jira] [Commented] (JENA-1477) Updating from Jena 2.12 to Jena 3.0.1 produces different RDF/XML output IF ARQ is loaded

    [ https://issues.apache.org/jira/browse/JENA-1477?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16351465#comment-16351465 ] 

Andy Seaborne commented on JENA-1477:
-------------------------------------

Presumably you are calling {{model.write}} with "RDF/XML", not "RDF/XML-ABBREV"?

See https://jena.apache.org/documentation/io/rdf-output.html#rdfxml

The default format for RDF/XML in RIOT is {{RDFFormat.RDFXML_PRETTY}} which corresponds to "RDF/XML-ABBREV".

Using {{RDFFormat.RDFXML_PLAIN}} with {{RDFDataMgr.write}} is the way to choose a specific form of RDF/XML.

For maximum output control, look at {{RDFWriter.create()}}.

> Is it the best way to ensure backwards compatibility of the RDF/XML output when moving from Jena 2>3?

No. {{RDFWriterFImpl}} should not be considered a public API class.

> What purpose do alternative writers serve

It is the same a pair of writers as jena has had in Jena2. What has changed is the interpretation of the writer name.

The pretty write produces much more readable RDF/XML. Since switching the default, the number of user questions about RDF/XML has dropped off.

The pretty form is stripped RDF/XML.

> Updating from Jena 2.12 to Jena 3.0.1 produces different RDF/XML output IF ARQ is loaded
> ----------------------------------------------------------------------------------------
>
>                 Key: JENA-1477
>                 URL: https://issues.apache.org/jira/browse/JENA-1477
>             Project: Apache Jena
>          Issue Type: Bug
>          Components: RDF/XML, RIOT
>    Affects Versions: Jena 3.0.1
>         Environment: Jena 3.0.1
>            Reporter: Andrew Berezovskyi
>            Priority: Minor
>
> We are in the process of a Jena 2>3 transition in Eclipse Lyo and discovered the following: if the ARQ is used in the application, then the typed node elements will be used by default, which did not occur in Jena 2. It causes problems for some legacy apps that rely on Lyo.
> We were able to eliminate this behaviour by calling the static method
> RDFWriterFImpl.alternative(null);
> Technically, this ensures that the 'org.apache.jena.rdfxml.xmloutput.impl.Basic' implementation is not getting substituted for the 'org.apache.jena.riot.adapters.RDFWriterRIOT'.
> Questions:
>  # Is it the best way to ensure backwards compatibility of the RDF/XML output when moving from Jena 2>3?
>  # Is there any way to control the RIOT writer to produce XML w/o typed node elements so that we can avoid resetting the alternative writer?
>  # (if you have some extra time) What purpose do alternative writers serve? What is the difference between the writers in the respective packages as the two writers above?
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)