GeeCON Prague 2014*
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
Author

Server side includes with XSLT

Harish Maringanti
Greenhorn

Joined: Jul 15, 2004
Posts: 1
Hello:

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
Author
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()">
<xsl:copy/>
</xsl:template>
Zhongwu Lin
Greenhorn

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

let's say I have two xsl files

com/test/main.xsl
com/test/second.xsl

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

In main.xsl I do:

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

IN neither way the transformer see it.
I am using java.
 
GeeCON Prague 2014
 
subject: Server side includes with XSLT