tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruairi" <rua...@rutlands.com>
Subject xt:document with Cocoon?
Date Wed, 04 Jul 2001 19:11:12 GMT
Hi

I want to show an example of using XT in particular xt:document output of
multiple files.  I get an error message saying :

"Call to extension element failed: The declaration for the entity
"HTML.Version" must end with '>'."

Any suggestions?


Regards,
-Ruairi



Here is my XSL:



<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

  xmlns:xt="http://www.jclark.com/xml/xt.html"
                xmlns:xlink="http://www.w3.org/1999/xlink"

                extension-element-prefixes="xt"
                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>

       <xt:document href="{@file}" method="html4.0">
          <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>
       </xt:document>
    </xsl:for-each>

    Course by <a href="{author/@xlink:href}"><xsl:value-of
select="author"/></a>
   </body></html>
  </xsl:template>

</xsl:stylesheet>



Here is my XML:

<?xml version="1.0"?>
<?xml-stylesheet href="ex52.xsl" type="text/xsl"?>
<?cocoon-process type="xslt"?>
<?cocoon-process type="xt"?>

<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>


Mime
View raw message