RE: [xsl] JSP includes in XSLT

Subject: RE: [xsl] JSP includes in XSLT
From: sara.mitchell@xxxxxxxxx
Date: Thu, 11 Jul 2002 14:44:51 -0400
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@xxxxxxxxxxx]
> Sent: Thursday, July 11, 2002 9:26 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> 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


Current Thread