[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Xalan Redirect?

Subject: Xalan Redirect?
From: "Ruairi" <ruairi@xxxxxxxxxxxx>
Date: Thu, 5 Jul 2001 13:19:22 +0200
xalan xlink
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.