Beefy Boxes and Bandwidth Generously Provided by pair Networks Frank
more useful options
 
PerlMonks  

Checkstyle For HTML Templates

by vishi83 (Pilgrim)
on Oct 22, 2005 at 13:27 UTC ( #502205=perlquestion: print w/ replies, xml ) Need Help??
vishi83 has asked for the wisdom of the Perl Monks concerning the following question:

Hi Great Ppl !!

Jus wanted to clarify my doubt. I thought of using perltidy for my scripts to check and clean up my PERL scripts.. Also another good option would be using checkstyle.. But my question to you ppl is :

Is there any such sort of programs for HTML Templates.. Anything that can check for badstyle of html templates like wat perltidy and checkstyle does for our perl scripts.

Thanks and awaiting you reply,




Vishi.

Comment on Checkstyle For HTML Templates
Re: Checkstyle For HTML Templates
by Corion (Pope) on Oct 22, 2005 at 13:29 UTC

    You mean, like html tidy (on Sourceforge and the original page, also on CPAN)? It doesn't work for HTML templates, but it works for the output generated by your templates. Well, actually, it works for a certain kind of HTML Templates, namely those used by Petal. If you're using a different templating system, you will need to check the output. But you want to do that anyway, as invalid input to your templates can generate invalid output.

      If you use HTML::Template you can use template tags in the form of HTML comments.

      <!-- TMPL_VAR NAME=PARAM1 -->

      This would allow you to validate the template.

        Well, not everything:

        <div class="<!-- TMPL_VAR NAME=PARAM2 -->">Test</div>

        Comment tags will validate as long as they are used outside of HTML tags.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://502205]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (7)
As of 2014-04-20 00:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (485 votes), past polls