"NAKAMURA, Hiroshi" <nahi / keynauts.com> wrote in
<JIEJKAMAONAMHNNAOOOLCELDCFAA.nahi / keynauts.com>: 

<<snip>>

>
>Hmm.  I want to hear developer's voice.
>RWiki only supports RD's reference extension.
>
>ex. To support inline img with RWiki, add below code
>  and try
>  ((<img:http://www.rubygarden.org/rubygarden.jpg>)).
>  (not tested...)
>
>  class RD
>    class RD2RWikiVisitor
>      def ref_ext_img(label, content)
>        return nil unless /^img:\s*(.+)$/ =~ label
>        ref = $1
>        %Q[<img href="#{ref}" alt="#{content}" />]
>      end
>    end
>  end
>
>First point.  What?
>Clemens, would you explain full detail of "special
>tag-handlers?"  Is "tag" not a RD reference but a
>(X)HTML tag?

The RD2RWikiVisitor looks like the handler I had in mind.
Taking the image example:

<rbi_code: >>ruby code goes here<< >

class RD
  class RD2RWikiVisitor
    def ref_ext_rbi_code(label, content)
      return nil unless /^rbi_code:\s*(.+)$/ =~ label
      rubyCode = $1
      >> and here I would embedd the code into a "textarea" and a "form"
      >> << 
    end
  end
end

My only concern is:
What if the code is:
    	print ">"
Will the RD-parser note that the ">" is NOT the end of the rbi_code-tag?
OR, can the RD parser also handle "normal" xml-tags? 
<rbi_code>
>>ruby code goes here<<
</rbi_code>

>
>Second point.  When?
>This is a simplified DFD around RD.
>
>  RD text
>   | (1) submitted via CGI or E-mail
>   V
>  RD file
>   | (2) compiled by RDtool and rd2rwiki-lib.rb
>   V

here as part of step (2), this is where the visitors get involved

Clemens