[EMAIL PROTECTED] 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 <html> <body> [% firstname %] [% lastname %] </body> </html> And in H:T, it is <html> <body> <TMPL_VAR firstname> <TMPL_VAR lastname> </body> </html> And in XHTML it is a style sheet: <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="/topspace"> <html> <body> <xsl:value-of select="firstname"/>, <xsl:value-of select="lastname"/> </body> </html> </xsl:template> </xsl:stylesheet> 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"?> <topspace> <firstname>Hello</firstname> <lastname>World</lastname> </topspace> (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: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html