This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Xalan Redirect?
- To: <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] Xalan Redirect?
- From: "Ruairi" <ruairi at rutlands dot com>
- Date: Thu, 5 Jul 2001 13:19:22 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi,
I need to generate a few html files from one request. I have tried
xt:document with little success, so I am now trying Xalan's Redirect. I
run the following XSL through Cocoon and get no error messages. However no
extra files are generated on the server.
Is this a directory permissions issue?
BTW, Is this a question for the users list, or the developers list?
Thanks in advance.
-Ruairi
XSL File:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:redirect="org.apache.xalan.xslt.extensions.Redirect"
extension-element-prefixes="redirect"
xmlns:xlink="http://www.w3.org/1999/xlink"
exclude-result-prefixes="xlink">
<xsl:output method="html"/>
<xsl:template match="*[@xlink:type = 'simple' and @xlink:href]">
<li><a href="{@xlink:href}"
onmouseover=""><xsl:apply-templates/></a></li>
</xsl:template>
<xsl:template match="course">
<html><body>
<h2>Exercise Links</h2>
<xsl:for-each select="solutions|originals">
<h3><a href="{@file}">Exercise <xsl:value-of select="."/></a></h3>
<redirect:write file="ccrap.html">
<html>
<title><xsl:value-of select="."/></title>
<body>
<h2>Exercise <xsl:value-of select="."/></h2>
<ul>
<xsl:apply-templates select="*"/>
</ul>
<a href="xlink.xml">Case Study - Home</a>
</body></html>
</redirect:write>
</xsl:for-each>
Course by <a href="{author/@xlink:href}"><xsl:value-of
select="author"/></a>
</body></html>
</xsl:template>
</xsl:stylesheet>
XML file:
<?xml version="1.0"?>
<?xml-stylesheet href="ex52b.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<course xmlns:xlink="http://www.w3.org/1999/xlink">
<author xlink:href="http:/www.rutlands.com"
xlink:type="simple">Ruairi O'Donnell</author>
<solutions file="soultions.html" tpye="html">
<exercise xlink:href="http:/localhost/solutions/ex11/"
xlink:type="simple"
xlink:title="Ex1.1">Description</exercise>
<exercise xlink:href="http:/localhost/solutions/ex12/"
xlink:type="simple"
xlink:title="Ex1.2">Description</exercise>
</solutions>
<originals file="originals.html" tpye="html">
<exercise xlink:href="http:/localhost/start/ex11/"
xlink:type="simple"
xlink:title="Ex1.1">Description</exercise>
<exercise xlink:href="http:/localhost/start/ex12/"
xlink:type="simple"
xlink:title="Ex1.2">Description</exercise>
</originals>
</course>
Regards,
-Ruairi
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list