Abbreviated RDF/XMLapplication/rdf+xml+abbrevrdfxml-abbrev
Abbreviated RDF/XML
application/rdf+xml+abbrev
rdfxml-abbrev
[2] Bug 392325 – StackOverflowException in abbreviated RDF XML writer when associating project area from RTC (2016-10-19 20:44:37 +09:00) <https://bugs.eclipse.org/bugs/show_bug.cgi?id=392325>
In this section we offer instructions for creating an XML representation for OSLC Defined Resources. The resultant XML representations are designed to validate as RDF/XML and therefore are often referred to as "constrained RDF/XML" or "abbreviated RDF/XML" representations, however the main intent of these instructions is to document a specific XML representation format for use in scenarios where a more unfettered RDF/XML representation or use of RDF/XML toolkits is not appropriate or preferred. OSLC domain specifications SHOULD refer to these instructions when requiring application/xml representations.XML representations returned by OSLC Defined Resources SHOULD be:Returned when these content types requested: application/xmlReturned as content-type: application/xml
In this section we offer instructions for creating an XML representation for OSLC Defined Resources. The resultant XML representations are designed to validate as RDF/XML and therefore are often referred to as "constrained RDF/XML" or "abbreviated RDF/XML" representations, however the main intent of these instructions is to document a specific XML representation format for use in scenarios where a more unfettered RDF/XML representation or use of RDF/XML toolkits is not appropriate or preferred. OSLC domain specifications SHOULD refer to these instructions when requiring application/xml representations.
XML representations returned by OSLC Defined Resources SHOULD be:
Returned when these content types requested: application/xml
Returned as content-type: application/xml
A second serializer is provided using several of the RDF/XML abbreviations to provide a more compact readable format, at the cost of some pre-processing. This is suitable for small documents.
Raptor (part of Redland framework) can serialise to the following:N-Triples, RDF/XML, RDF/XML (Abbreviated), RDF/XML (XMP Profile), Turtle
Raptor (part of Redland framework) can serialise to the following:
N-Triples, RDF/XML, RDF/XML (Abbreviated), RDF/XML (XMP Profile), Turtle
How can I use some of the abbreviated RDF/XML syntax?Use the “pretty-xml” format argument to the serialize method:myGraph.serialize(target_pretty, format="pretty-xml")
How can I use some of the abbreviated RDF/XML syntax?
Use the “pretty-xml” format argument to the serialize method:
myGraph.serialize(target_pretty, format="pretty-xml")
Serializes the back-end RDF model to a string, using the specified format type, or defaulting to abbreviated RDF/XML.
Transform the RDF to HTML, e.g. for the Reporting Data Dictionary, this is done in two steps. First, the Turtle file is converted using Jena to dd-vocabulary.rdf which contains non-abbreviated RDF/XML. Second, the RDF/XML is converted using XSLT to the HTML file dd-vocabulary.html. See below for an Ant script and XSLT file to automate this process.
Set the Accept HTTP header to define the media type in which you want to get the resource representation. Possible values for the media types are as follows:application/xml to get an abbreviated RDF/XML representation of the resource.application/rdf+xml to get an expanded RDF/XML representation of the resource.If you do not specify this header, you get a resource represented in abbreviated RDF/XML format by default.
Set the Accept HTTP header to define the media type in which you want to get the resource representation. Possible values for the media types are as follows:
application/xml to get an abbreviated RDF/XML representation of the resource.
application/rdf+xml to get an expanded RDF/XML representation of the resource.
If you do not specify this header, you get a resource represented in abbreviated RDF/XML format by default.