perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [OT] Re: Why I use mod_perl (PR stuff)
Date Wed, 09 Jun 2004 21:52:11 GMT
JGSmith@TAMU.Edu wrote:
> I'm not sure I understand how XHTML can replace TT, H::T, or Mason.
> Could you provide an example?  My understanding is that XHTML is just
> an XML-ized version of HTML, so it retains all the form controls from
> HTML; an <input> tag in HTML is just an <input/> element in XHTML.

Here it is. But the whole thing is about how the XML/XSLT works 
so I put [OT] in title.

Suppose user inputs firstname "Hello" and 
the program gets the lastname "World".

In TT: one has the two scalar variables passing to
[% firstname %] [% lastname %]

And in H:T, it is
<TMPL_VAR firstname> <TMPL_VAR lastname>

And in XHTML it is a style sheet:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" 
<xsl:template match="/topspace">
<xsl:value-of select="firstname"/>,
<xsl:value-of select="lastname"/>

The idea is either to send to client a XML data file with 
the reference to the style sheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="that_file_on_disk.xsl"?>
(this does not work with some 5.0 IE browsers)

Or use a libary to translate the dynamical field 
<xsl:value-of select="firstname"/> into the real string 
(which is "Hello") and then send, in the similar
way to TT, H:T.

Pod Merl

Report problems:
Mail list info:
List etiquette:

View raw message