tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jann VanOver <Jann.VanO...@loudeye.com>
Subject RE: document with Cocoon?
Date Thu, 05 Jul 2001 22:13:39 GMT
Perhaps you need a "/" before a ">" somewhere
 
Maybe

<xsl:stylesheet version="1.0"
  xmlns:xsl="  <http://www.w3.org/1999/XSL/Transform>
http://www.w3.org/1999/XSL/Transform"
  
  xmlns:xt="  <http://www.jclark.com/xml/xt.html>
http://www.jclark.com/xml/xt.html"
                xmlns:xlink="  <http://www.w3.org/1999/xlink>
http://www.w3.org/1999/xlink"
                
                extension-element-prefixes="xt"
                exclude-result-prefixes="xlink"
                >

Should be

<xsl:stylesheet version="1.0"
  xmlns:xsl="  <http://www.w3.org/1999/XSL/Transform>
http://www.w3.org/1999/XSL/Transform"
  
  xmlns:xt="  <http://www.jclark.com/xml/xt.html>
http://www.jclark.com/xml/xt.html"
                xmlns:xlink="  <http://www.w3.org/1999/xlink>
http://www.w3.org/1999/xlink"
                
                extension-element-prefixes="xt"
                exclude-result-prefixes="xlink"
                />


-----Original Message-----
From: Ruairi [mailto:ruairi@rutlands.com]
Sent: Wednesday, July 04, 2001 12:11 PM
To: tomcat-user@jakarta.apache.org
Subject: xt:document with Cocoon?


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
<http://www.w3.org/1999/XSL/Transform> "
  
  xmlns:xt=" http://www.jclark.com/xml/xt.html
<http://www.jclark.com/xml/xt.html> "
                xmlns:xlink=" http://www.w3.org/1999/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 <mailto:{@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=" Exercise'>{@file}" <mailto:{@file}> >Exercise
<xsl:value-of select="."/></a></h3>
       
       <xt:document href=" {@file <mailto:{@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="  <mailto:{author/@xlink: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
<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