[Zope] XMLWidgets question

Richard.Folwell@symbian.com Richard.Folwell@symbian.com
Mon, 15 May 2000 12:30:00 +0100


I am trying to use XMLWidgets to render some simple structured
documentation, and am running into problems extending it.  The problem I
have is with trying to add new elements that can be included in <p>
elements.  For example, I have created a new element <table>, which works
OK if inserted into a section, but produces no output (and no errors) if
placed into a paragraph.

The isNodeSupported() method was changed to:

<dtml-return "getParentNode().getNodeName() == 'section'" || "getParentNode
().getNodeName() == 'p'">

so that it will be legal in both contexts.  I guess the problem is that the
render() method for <p> is:

<p><dtml-var text_content></p>

which of course will not produce anything for contained elements.  However
changing it to:

<p><dtml-var render_helper></p>

will not work because it will never get to the point where it will extract
the paragraph content to display (though it will now display contained
elements).

Am I going about this the wrong way, or am I just missing something
obvious?

Richard