ruby-rdf / rdf-rdfxml

Ruby RDF/XML reader/writer for RDF.rb.
http://rubygems.org/gems/rdf-rdfxml
The Unlicense
17 stars 7 forks source link

Max Depth option for RDF::RDFXML::Writer? #27

Closed kardeiz closed 9 years ago

kardeiz commented 10 years ago

Does v. 1.1.1.1 provide the max_depth option for RDF::RDFXML::Writer? For example:

puts RDF::RDFXML::Writer.buffer(:max_depth => 100) { |w| w << graph }

I've looked around this repository and rdf-1.1.1.1/lib/rdf/writer.rb and I don't see it.

If it's no longer available, are there alternatives for formatting the serialized RDFXML?

gkellogg commented 10 years ago

The rewrite using Haml doesn't directly support it; ow ever, you can now provide your own templates to so this. If you'd like to contribute one, we could add it as an option again.

barmintor commented 10 years ago

Oof, this hurts. Time to learn about Haml templates.

gkellogg commented 10 years ago

I think it can be supported in the default template without too much trouble, I'll put it on my queue.

barmintor commented 10 years ago

I'm not grokking the context for doing it in the templates, but looks like some combination of overriding the predicate handler and the @depth attribute could do the job.

On Thu, Jul 10, 2014 at 5:25 PM, Gregg Kellogg notifications@github.com wrote:

I think it can be supported in the default template without too much trouble, I'll put it on my queue.

— Reply to this email directly or view it on GitHub https://github.com/ruby-rdf/rdf-rdfxml/issues/27#issuecomment-48666583.

gkellogg commented 9 years ago

Better late than never, sorry it took me so long to get to this.