Writing Namespaces in RDF.rb

I'm an RDF.rb newbie trying to write out RDF for a training event.
But I cannot figure out how to write out the namespace specs.
The Rails action looks like this:
	
def show
  @course = Course.find(params[:id])
  respond_to do |format|
      format.rdf  do 
             output = RDF::Writer.for(:rdfxml).buffer do |writer|
                  s = RDF::URI(course_url(@course))
                  p = RDF::DC.event
                  o = RDF::Literal(@course.full_title)
                  writer << RDF::Statement(s, p, o)	
             end 
             render :xml => output
         end
   end     
end

And produces this:
<rdf:RDF>
    <rdf:Description rdf:about="http://mydomain/training/178">
    <ns0:event>  Training: Dallas, Aug 23-24, 2010 </ns0:event>
  </rdf:Description>
</rdf:RDF>

Why is the namespace "ns0" ?
I want something like:

<rdf:RDF
    xmlns:dc="http://purl.org/dc/elements/1.1" >           <==== NOTE HERE
    <rdf:Description rdf:about="http://mydomain/training/178">
    <dc:event>  Training: Dallas, Aug 23-24, 2010 </ns0:event>
  </rdf:Description>
</rdf:RDF>

How can I get RDF.rb to do this?

Regards,
- Mark Windholtz
(513) 226-8259
www.agiledna.com
@agiledna

Received on Tuesday, 8 June 2010 12:14:17 UTC