Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

XSLT vs Templating, Part 2

by Masem (Monsignor)
on Feb 07, 2002 at 04:37 UTC ( #143791=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    SELECT id, name, xp, lat, long FROM monks ORDER BY lat LIMIT 25
    
  2. or download this
    Benchmark: timing 50 iterations of DBI and CGI, DBI and Print, DBI and
    + TT2, XML and TT2/Simple, XML and TT2/XPath, XML and XSLT...
    DBI and CGI:  5 wallclock secs ( 2.02 usr +  0.02 sys =  2.04 CPU) @ 2
    +4.51/s (n=50)
    ...
    DBI and TT2         4.55/s 1220%    302%  122%  --    -81%  -98%
    DBI and CGI         24.5/s 7003%   2062% 1093%  438%   --   -88%
    DBI and Print        200/s 57860% 17540% 9636% 4292%  716%  --
    
  3. or download this
                   XSLT Transform
    DBI -->  XML -----------------> XHTML
    
  4. or download this
    CGI-->userinfo -----|
                        |         Data Pruning XSLT
    ...
                                                      |
                                                      V
                                                    XHTML
    
  5. or download this
    #!/usr/bin/perl -w
    
    ...
      my $results = $stylesheet->transform( $source );
      print $target $stylesheet->output_string( $results );
    }
    
  6. or download this
    [% colorrow = 0 %] 
    <html>
    ...
    </table>
    </body>
    </html>
    
  7. or download this
    [% USE xml = XML.Simple( results ) %] 
    [% xml %]
    ...
    </table>
    </body>
    </html>
    
  8. or download this
    [% USE xpath= XML.XPath( results ) %] 
    [% colorrow = 0 %] 
    ...
    </table>
    </body>
    </html>
    
  9. or download this
    <xsl:stylesheet version = '1.0'
            xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
    ...
      </xsl:template>
      
    </xsl:stylesheet>
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (8)
As of 2014-11-23 12:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (131 votes), past polls