cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: two XSLT processings
Date Mon, 15 May 2000 09:46:37 GMT
Stylesheets strip processing instructions by default. Thus you need 
something like this in your first-applied stylesheet:

<xsl:template match="processing-instruction()">
  <xsl:copy/>
</xsl:template>


MORÁVEK Peter <moravek@pobox.sk> wrote:
>I have and xml document and I want to process it through two XSLTs. 
>Example:
>
>index.xml:
>------------------
><?xml version="1.0" encoding="Cp1250"?>
><?cocoon-process type="xslt"?>
><?xml-stylesheet href="index.xsl" type="text/xsl"?>
><?cocoon-process type="xslt"?>
><?xml-stylesheet href="other.xsl" type="text/xsl"?>
>
><result><first>10</first></result>
>
>index.xsl
>--------------
><?xml version="1.0" encoding="Cp1250"?>
><xsl:stylesheet version="1.0"
>	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >
>
><xsl:template match="/result/first">
>   <root><second><xsl:value-of select=". + 10"/></second></root>
></xsl:template>
>
></xsl:stylesheet>
>
>other.xsl
>------------
><?xml version="1.0" encoding="Cp1250"?>
><xsl:stylesheet version="1.0"
>	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >
>
><xsl:template match="/result/second">
>   <HTML>
>     <HEAD><TITLE>second title</TITLE></HEAD>
>     <BODY>Result is: <xsl:value-of select="."/></BODY>
>   </HTML>
></xsl:template>
>
></xsl:stylesheet>
>--------------------
>
>So the processing should be:
>
>index.xml ---(index.xsl)--> XML ----(other.xsl)-------> HTML output

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message