This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: JSP includes in XSLT
- From: David Nelson <David dot Nelson at motion-ind dot com>
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Date: Thu, 11 Jul 2002 14:07:16 -0500
- Subject: RE: [xsl] JSP includes in XSLT
- Reply-to: xsl-list at lists dot mulberrytech dot com
I usually just lurk to try to learn a bit from you guys but I have a bit
experience with jsp includes and below is something you could use.
<jsp:include page="{relativeURL | %= expression %}"
[ flush="true | false" ] />
Note that this behaves a bit differently than an include directive. An
include Action really behaves somewhat like a bean. This really just
depends on its design though. Maybe peruse the documentation to see how
this would fit in your design.
HTH
Dave
--> -----Original Message-----
--> From: sara.mitchell@ps.ge.com [mailto:sara.mitchell@ps.ge.com]
--> Sent: Thursday, July 11, 2002 1:45 PM
--> To: xsl-list@lists.mulberrytech.com
--> Subject: RE: [xsl] JSP includes in XSLT
-->
-->
--> The only way to do it is to use d-o-e (disable-output-escaping).
--> I've done this in some of my own stylesheets for very
--> similar reasons.
--> If the URLs to the file attributes are known (i.e., not
--> dynamic), it's fairly simple. Something like this:
-->
--> <xsl:template match="x">
--> <html>
--> <head>
--> <title><xsl:value-of select="title"></title>
--> <xsl:text disable-output-escaping="yes"><![CDATA[<%@ include
--> file="help_fd_table_end.inc"]]></xsl:text>
--> </head>
--> ...
--> </xsl:template>
-->
--> The CDATA sections are required and you may also need to
--> be careful
--> about line ends and other white space. If parts of the
--> file name are
--> dynamic and have to be derived from content in your input
--> XML, you're
--> going to have to flip back and forth inbetween <xsl:text>
--> with d-o-e set
--> and the usual XSLT instructions.
-->
--> It would be nice if JSP had an XML compatible syntax for this,
--> wouldn't it?
-->
--> Sara Mitchell
-->
--> > -----Original Message-----
--> > From: Brad Miller [mailto:Brad.Miller@tririga.com]
--> > Sent: Thursday, July 11, 2002 9:26 AM
--> > To: xsl-list@lists.mulberrytech.com
--> > Subject: [xsl] JSP includes in XSLT
--> >
--> >
--> > I am outputting jsp's with my stylesheet and I need to have a
--> > few includes throught the jsp.
--> > the include looks like this
--> > <%@include file="help_fd_table_end.inc" %>
--> > It seems to be hanging on the % sign.
--> >
--> > 90% of my output is HTML the other 10% is inludes like this one.
--> > So I just need to add the includes in the stylesheet like I
--> > would any other HTML tag.
--> >
--> > Anyone know how to get around this?
--> >
--> >
--> >
--> > Thanks
--> > Brad
--> >
--> > XSL-List info and archive:
http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list