in reply to Re: HTML::Template Loop Question
in thread HTML::Template Loop Question

<ul> <TMPL_LOOP people> <li> <TMPL_VAR person> </TMPL_LOOP> </ul>
<nit>

Not having used these templates myself yet, I may be spouting off without cause here, but shouldn't you close off the li?

<ul> <TMPL_LOOP people> <li> <TMPL_VAR person> </li> </TMPL_LOOP> </ul>
</nit>

$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

Replies are listed 'Best First'.
Re: Re: HTML::Template Loop Question
by blokhead (Monsignor) on Sep 23, 2003 at 23:34 UTC
    www.w3.org says it's optional:
    The end tag for LI elements can always be omitted.

    blokhead

      That depends which spec you're working with if your working with any spec at all.

      XHTML requires closed tag pairs for <li></li>, <p></p>, <option></option> etc.

      --
      Clayton

      Ack! That was in what year? 1997? That document is at least four versions out of date! Backslashing literal @ characters in Perl strings was optional at one time too! If you go to w3.org and click on "HTML" then on "Recommendations", you will find that such ancient versions are no longer even listed. That's way past deprecated. (HTML 4.01 is deprecated "legacy" HTML; XHTML1.0 is obsolete, but not quite yet (or only very mildly) deprecated; XML1.1 is the current cutting edge.)


      $;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$ ;->();print$/

      But if you're using XHTML, www.w3.org also says:

      Documents must be well-formed

      Some/many/most (please choose your appropriate level of dogmatism) developers use XHTML.

      --
      bowling trophy thieves, die!