[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Practicality of Separating Data from Presentation

Subject: Re: Practicality of Separating Data from Presentation
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 01 Jul 2002 18:02:26 -0400
Re:  Practicality of Separating Data from Presentation
Tim--

At 05:31 PM 7/1/2002, you wrote:
I have seen some code like the following:

<xsl:text disable-output-escaping="yes">&lt;</xsl:text>%= Now %<xsl:text disable-output-escaping="yes">&gt;</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">&lt;%</xsl:text>
  <xsl:value-of select="asp"/>
  <xsl:text disable-output-escaping="yes">%&gt;</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@xxxxxxxxxxxxxxxx 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



Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.