You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by MORĂVEK Peter <mo...@pobox.sk> on 2000/05/15 08:19:25 UTC
two XSLT processings
Hi,
while there is no access to http://xml-archive.webweaving.org/ (Connection
failed) now,
I'm trying to get the answer here ...
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
I know I've anywhere in mailing list read something about it,
but I can't get to work it.
Please help
Thanks
Peter