[ZDP] XML rendering question

Martijn Faassen m.faassen@vet.uu.nl
Mon, 23 Aug 1999 16:50:17 +0200


Stephan Richter wrote:
> 
> hello Martijn,

Hullo. :)

> I have question.
> 
> I have the following tag:
> 
> <abstract>
>    Text, and even more text then <strong>some strong words</strong> and more
>    text and more and more and more ...
> </abstract>
> 
> 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>
[snip]
 
> 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:

<strong>foo</strong>
.

instead of:

<strong>foo</strong>.

I want to render the '.' just after 'foo'. Usually whitespace doesn't
matter so much in rendering. Anyway, check my ZAML demo.

Good luck!

Martijn