Hi there,

On 26/12/2020 08:03, Dr. Chavdar Ivanov wrote:
Hello,

I see that some time ago there was a discussion on similar topic here: 
https://stackoverflow.com/questions/49677174/avoid-nesting-of-element-in-rdf-xml-in-apache-jena
What I would like to achieve if to have the RDFXML_PLAIN way of export, but 
instead of using rdf:Description to have the other way of serializing of the 
elements, like this
<ex:Class rdf:ID=.....

There are some controls documented at:

https://jena.apache.org/documentation/io/rdfxml_howto.html#advanced-rdfxml-output

I think the key method is:

Unparser.wPropertyEltValueObj calling wObj(boolean topLevel = false)

(I haven't been into the "Unparser" code for a very long time!)

----

As for the modfying a writer, it sounds like you want detailed control. The pretty printer has many prettifying rules so maybe building up from Basic is more controllable.

    Andy


e.g. it looks like the

Are there some options in ABBREV that can be combined to achieve the plain 
effect (or in PLAIN to avoid rdf:Description and rdf:about...) or a separate 
writer needs to be designed? So no rdf:Description, no nesting and use of 
rdf:resource instead

This info https://www.w3.org/wiki/SimpleRdfXml is on more or less the same 
topic. So not sure if some special options shall be used for RDFXML.

The basci wrter (Basic.java) only has one control "parseTypeLiteralPropertyElt".

The plain writer does follow that using rdf:Description.


Best regards
Chavdar

Reply via email to