[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: "bryan" <bry@xxxxxxxxxx>
Date: Tue, 2 Jul 2002 10:22:58 +0200
separate data from presentation

Wendell wrote

><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>

yeah, since the above is most appropriate to little snippets of inline
asp code he might also be well off in having a variable start and
variable end which puts out the &lt;% and &gt;%, also for asp at least,
the following while maybe not a good thing otherwise - <xsl:variable
name="crlf"><xsl:text>&#xd;&#xa;</xsl:text></xsl:variable>- will help
keep the code that comes out the other end a little bit readable.


>Doesn't ASP have an XML-friendly format?
Not really, although a lot of the <% %> problem would also be solved by
writing <SCRIPT RUNAT="SERVER">...</SCRIPT>, furthermore if one moves up
to aspx I've found that while not altogether easy one can build an
xml-friendly format out of webforms, as long as one remembers to have
the asp namespace declared somewhere, allowing you to generate stuff
like:

<html>
   <body>
      <asp:xml id="someXML" DocumentSource="some.xml"
TransformSource="some.xsl" runat=server/>
   </body>
</html>

of course somewhere on your backend you've got xml unfriendly code
running around, but doesn't everyone.

>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....

right, I for one have a problem anyway with the separation of data from
presentation holy writ, I think it's a good rule to live by but maybe
not preach so much because every now and then solutions will be required
that darn it, just cry out for presentation with data.







 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.