[ZDP] XML rendering question
Mon, 23 Aug 1999 16:50:17 +0200
Stephan Richter wrote:
> hello Martijn,
> I have question.
> I have the following tag:
> Text, and even more text then <strong>some strong words</strong> and more
> text and more and more and more ...
> How could I best render that?
> It should look like that at the end:
> <p>Text, and even more text then <strong>some strong words</strong> and more
> text and more and more and more ...</p>
> what is the best solution? Really I want to use the first way and make the
> rendering smart. Is that the right approach?
You can do that; it's actually in the ZAML demo I sent you (you can use
<strong> in <p> tags, <li> and <field> tags. What XML does is make a
tree under the 'abstract' node. The first part would be a textnode
containing 'Text, and even more text then ', the next would be an
Element node, containing 'strong' (which in turn contains textnodes
again). Then another text node.
You can see an example of this in renderText in my ZAML demo; it is
horribly layouted code as otherwise extra whitespace is inserted in a
place where HTML doesn't tolerate it, resulting in:
I want to render the '.' just after 'foo'. Usually whitespace doesn't
matter so much in rendering. Anyway, check my ZAML demo.