cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Menke" <>
Subject Dynamic selection of stylesheets
Date Thu, 08 Feb 2001 23:58:50 GMT
I have been to .  I
have tried to use the code in my site and have had unpredictable results.
Here is the xsl used in the example to do the dynamic selection:

<?xml version="1.0" encoding="ISO-8859-1" ?>
- <xsl:stylesheet xmlns:xsl="">
  <xsl:param name="portal" />
- <xsl:template match="page">
- <xsl:processing-instruction name="xml-stylesheet">
- <xsl:choose>
  <xsl:when test="$portal='hip'">hip.xsl</xsl:when>
  <xsl:when test="$portal='hop'">hop.xsl</xsl:when>
  " type="text/xsl"
- <xsl:copy>
  <xsl:apply-templates select="@*" />
  <xsl:apply-templates select="node()" />
- <xsl:template match="*|@*">
- <xsl:copy>
  <xsl:apply-templates select="@*" />

Although the code works great with the example files, when I switch to my
own pages. I get unpredictable results.  Does anyone have any example code
or ideas on how to do this?  Can you do it with XSP?

View raw message