This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Practicality of Separating 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]