[Petal] Is this a bug?

Chris Croome chris@webarchitects.co.uk
Fri, 20 Sep 2002 14:35:24 +0100


Hi William 

The first example is not legal (X)HTML -- you cannot have a form
element within a p element:

  The P element represents a paragraph. It cannot contain
  block-level elements (including P itself).

  http://www.w3.org/TR/html4/struct/text.html#edef-P

Chris

On Fri 20-Sep-2002 at 09:19:36AM -0400, William McKee wrote:
> 
> Thanks for the updated module. I'll install and test soon. In the
> meantime, I have a template which is generating some odd behaviors
> under 0.71. Perhaps this behavior is correct for XHTML; perhaps
> it's been fixed in the latest release.
> 
> Basically, the template engine does not support elements contained
> within paragraph tags. Consider user_id to be null in both cases.
> In the first, the form prints when it should not. The second works
> using a div tag. I can provide a test script if you'd like. Thanks
> for your input.
> 
> Template that fails (using p tags):
> 	<p petal:if="user_id">
> 	<span petal:content="user_id">testing</span>
> 	<form petal:attr="action scriptname">
> 		<input type="hidden" name="lid" petal:attr="value listing_id">
> 		<input type="submit" name="contact_listing" value=" Contact this Listing 
> ">
> 	</form>
> 	</p>
> 
> 
> Template that works (using div tags):
> 	<div petal:if="user_id">
> 	<span petal:content="user_id">testing</span>
> 	<form petal:attr="action scriptname">
> 		<input type="hidden" name="lid" petal:attr="value listing_id">
> 		<input type="submit" name="contact_listing" value=" Contact this Listing 
> ">
> 	</form>
> 	</div>

-- 
Chris Croome                               <chris@webarchitects.co.uk>
web design                             http://www.webarchitects.co.uk/ 
web content management                               http://mkdoc.com/   
everything else                               http://chris.croome.net/