cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alexander Weinmann <>
Subject Re: generating xsl processing instructions
Date Tue, 08 Aug 2000 12:27:05 GMT
Lisa van Gelder wrote:
> I'm converting html into xml and xsl. I have one template that strips off
> all formatting info (table tags, paragraph tags, divs, spans etc) and turns
> the rest into xml, and another template that keeps all the formatting info
> and puts placeholders so that the xml elements can be slotted into place
> when the stylesheet is called. What I want is a stylesheet that generates
> another stylesheet including the xsl instructions. I want a stylesheet that
> [...]

Below I give you an example how to write a stylesheet that generates
another stylesheet. The namespaces have to be remapped. 
I had problems with that using Xalan, but it worked with SAXON:

 <?xml version="1.0"?>

<xsl:stylesheet version="1.0"
		xmlns:exsl="" >

  <xsl:namespace-alias stylesheet-prefix="exsl" result-prefix="xsl"/>
  <xsl:output method="xml" indent="yes" />

  <xsl:template match="/" >
    <exsl:stylesheet    version="1.0"
xmlns:xsl="" >

      <exsl:template match="what-you-want">
         <!-- what you want -->

      <exsl:template match="something-else">
	  <exsl:attribute name="href"><exsl:value-of
	  <exsl:value-of select="text()"/> 

View raw message