This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Practicality of Separating Data from Presentation
- From: Wendell Piez <wapiez at mulberrytech dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 01 Jul 2002 18:02:26 -0400
- Subject: Re: [xsl] Practicality of Separating Data from Presentation
- Reply-to: xsl-list at lists dot mulberrytech dot com
Tim--
At 05:31 PM 7/1/2002, you wrote:
I have seen some code like the following:
<xsl:text disable-output-escaping="yes"><</xsl:text>%= Now %<xsl:text
disable-output-escaping="yes">></xsl:text>
as a way to create ASP code. What would be some pro's and con's to this
approach - assuming there are both?
One would hope if you're doing this very much that you'd code up something
like:
<xsl:template name="asptag">
<xsl:param name="asp" select="' '"/>
<xsl:text disable-output-escaping="yes"><%</xsl:text>
<xsl:value-of select="asp"/>
<xsl:text disable-output-escaping="yes">%></xsl:text>
</xsl:template>
... <xsl:call-template name="asptag">
<xsl:with-param name="asp">= Now </xsl:with-param>
</xsl:call-template>
And note that this kind of stylesheet only works when outputting serialized
text after your transformation ('cause of the d-o-e).
Doesn't ASP have an XML-friendly format?
FWIW, the notion that XSL is broken since it "doesn't separate data from
presentation" is kind of funny in view of the fact that it was designed to
be a presentation-tier thing ... run in the client, target FO etc. ...;
it's only because it's so darned versatile that everyone's using it in the
middle tier at all....
Cheers,
Wendell
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list