jQuery in Action, 3rd edition
The moose likes XML and Related Technologies and the fly likes Server side includes with XSLT Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Server side includes with XSLT" Watch "Server side includes with XSLT" New topic

Server side includes with XSLT

Harish Maringanti

Joined: Jul 15, 2004
Posts: 1

I want to know if its possible to use server side includes (SSI) with xslt.

Usually in html the way we do it is by using the following syntax:
<!-- ssi code here -->

But the start & end tags are treated as comments in xslt. Is there a way out? I appreciate any response.

Thank you.
Dmitry Kirsanov
Ranch Hand

Joined: Apr 26, 2004
Posts: 33
You can generate comments using XSLT using the xsl:comment instruction. Or, if the SSI comments are in your XML source, you can match them using comment() and pass unchanged to the output, for example:

<xsl:template match="comment()">
Zhongwu Lin

Joined: Mar 06, 2001
Posts: 11
How do you specify href in <xsl:include href="" />?

let's say I have two xsl files


and we want to include second.xsl in main.xsl

In main.xsl I do:

<xsl:include href="second.xsl" />
<xsl:include href="com/test/second.xsl" />

IN neither way the transformer see it.
I am using java.
I agree. Here's the link: http://aspose.com/file-tools
subject: Server side includes with XSLT
jQuery in Action, 3rd edition