• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Server side includes with XSLT

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Author
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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>
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic