forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ferdinand Soethe <ferdin...@apache.org>
Subject Problems transforming XHTML
Date Wed, 17 Aug 2005 12:22:05 GMT

There seems to be a couple of problems with transforming
xhtml-document.

Placing the document below as xhtml-test.html in the xdocs directory of a
freshly seeded forrest I will only see menues and tabs, not the
content of the page.

Calling it as body-xhtml-test.html everything looks fine so I started
looking at the skinning process as follows

1. Uncommented the skinning part in sitemap.xmap

      <!--pipeline that "marries" the docs in the root dir with the skin to produce html-->
      <map:match pattern="*.html">
        <map:aggregate element="site">
          <map:part src="cocoon:/skinconf.xml"/>
          <map:part src="cocoon:/build-info"/>
          <map:part src="cocoon:/tab-{0}"/>
          <map:part src="cocoon:/menu-{0}"/>
          <map:part src="cocoon:/body-{0}"/>
        </map:aggregate>
        
        <!--<map:call resource="skinit">
          <map:parameter name="type" value="site2xhtml"/>
          <map:parameter name="path" value="{0}"/>
        </map:call>-->

        <map:serialize/>
      </map:match>

2. Load the page in my browser and saving the source as
   a new file called xhtml-test-aggregate.xml

   Still everything looks ok up to that point.

3. Now I try to directly apply the transformation

   and get an error message
   "SXXP0003: Error reported by XML parser: The declaration for the entity "HTML.Version"
must
    end with '>'.
  (Same with xalan as well)
  Any idea why?

4. Removing that obstacle by taking out
   <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
   I get an error for 'entity nbsp not referenced'.
   No problem here that's because I removed the doctype where it is
   declared.

5. Removing that obstacle by removing the &nbsp; I get an error
   because two meta elements are not properly terminated.
   'The element type "meta" must be terminated by the matching end-tag
   "</meta>".'
   
   And this is where I am lost.
   Why are they not properly terminated? After all we are still within
   a Cocoon pipeline so this should all be well-formed xml, right?

-----------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Testdocument XHTML</title>
  </head>
  <body>
    <h1>Testchapter</h1>
    <p>This is a test to see what attributes are passed through when processing xhtml.</p>
    <table border="1" width="30%">
      <tr>
        <td>Zell 1-1</td>
        <td>Zell 1-2</td>
        <td>Zell 1-3</td>
      </tr>
      <tr>
        <td>Zell 2-1</td>
        <td>Zell 2-2</td>
        <td>Zell 2-3</td>
      </tr>
      
    </table>
    
  </body>
</html>
-----------


--
Ferdinand Soethe


Mime
View raw message