ERb question with xml

In the rdoc there’s an example:

xml.em { xml.b(“emp & bold”) }

Which produces:

emph & bold

But what if I wanted to nest tags with text, i.e.:

just emph and emph & bold

?

I’ve messed around with it and have only gotten bizzare results or
nothing displayed at all - any help appreciated - thanks

On Thu Jun 29, 2006 at 12:25:07AM +0200, brez! !! wrote:

just emph and emph & bold

?

are you really making xml? or just abusing it to make HTML. if its the
latter, try markaby:

em do
text “just emph and”
b “emph & bold”
end

are you really making xml? or just abusing it to make HTML. if its the
latter, try markaby:

em do
text “just emph and”
b “emph & bold”
end

Yea I’m really making XML - it’s actually docbook so I want to able to
do something like:

Some text and then an inline word that appears in quotes.

answer:

xml.em {
xml.text! “just emph and”; xml.b(“emp & bold”);
}

and

xml.para {
xml.text! “Some text and then an inline”; xml.quote(“word”); xml.text!
“appears in quotes.”
}

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs