rdfjs / rdfxml-streaming-parser.js

Streaming RDF/XML parser
https://www.rubensworks.net/blog/2019/03/13/streaming-rdf-parsers/
MIT License
24 stars 8 forks source link

RDF/XML serializer #5

Open namedgraph opened 5 years ago

namedgraph commented 5 years ago

Thank you for the great work.

Is there a component to serialize the parsed triples back to RDF/XML?

rubensworks commented 5 years ago

Up until now, I never needed to serialize to RDF/XML myself, so I don't have any good suggestions.

I see here that there's a simple (non-streaming) RDF/XML serializer that looks like it is RDFJS-compliant: https://github.com/kaefer3000/rdf-serializer-rdfxml I haven't tested it myself though.

wouterbeek commented 5 years ago

I liked the approach of allowing RDF/XML legacy data to be converted to non-XML formats, while at the same time disallowing/disincentivising the creation of new RDF/XML.

namedgraph commented 5 years ago

@wouterbeek disallowing? RDF/XML (along with TriX) are important bridges to the XML ecosystem. Love it or hate it, but it includes powerful tools for both generation and consumption of RDF, notably XSLT.

Admittedly the syntax is not pretty, but it gets the job done. If you don't like it, you don't have to use it.

Be conservative in what you do, be liberal in what you accept from others

wouterbeek commented 5 years ago

@namedgraph But the phrase that you quote supports my position and invalidates yours, see:

Be conservative in what you do, be liberal in what you accept from others

  1. The library is liberal in what it accepts: it even accepts RDF/XML.
  2. The library is conservative in what it does: it does not allow RDF/XML output to be generated.