Closed a-andreyev closed 9 years ago
ns0:Person is closed (next to last line). ns0:mbox should be self-closing, and this might be an issue with the Haml generator, I'll look into it.
Is Issue closed? Should ns0:mbox be self-closing?
It is self closing, when I run the example using Ruby 2.1.4, anyway. The only way for it to not self-close if you had an odd version of Haml, AFAIK. If you have some better steps to reproduce, then I'm happy to re-open and look further into it; better give details about your platform, ruby version, and gem versions. Consider doing a bundle install
within the gem directory and run using bundle exec irb -Ilib -r rdf/rdfsml
.
My output looks like the following:
<?xml version='1.0' encoding='utf-8' ?>
<rdf:RDF xmlns:ns0='http://xmlns.com/foaf/0.1/' xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'>
<ns0:Person>
<ns0:mbox rdf:resource='mailto:jhacker@example.org' />
<ns0:name>J. Random Hacker</ns0:name>
<ns0:nick>jhacker</ns0:nick>
</ns0:Person>
</rdf:RDF>
Thank you!! Found that I had haml-4.1.0.beta.1 version (not sure how I've got exactly this version), which contains this problem. Switching to haml-4.0.5 fixed the problem.
Am I right that something wrong with
RDF::Writer
while working withrdf:resource
type of object?Output looks like:
Am I right that unclosed tags
<ns0:Person>
and<ns0:mbox rdf:resource='mailto:jhacker@example.org'>
are wrong?