forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saremba Andreas <andreas.sare...@siemens.com>
Subject XHTML source files
Date Mon, 28 Apr 2003 14:34:49 GMT
In Forrest's sitemap.xmap there is a rule that leaves HTML files untouched and just extracts
the body parts:

<!-- if the file is present as html, give that to the user... -->
<map:act type="resource-exists">
   <map:parameter name="url" value="content/xdocs/{1}/{2}.ehtml" />
   <map:generate src="content/xdocs/{../1}/{../2}.ehtml"/>
   <map:transform src="library/xslt/html2htmlbody.xsl" />
   <map:transform type="linkrewriter" src="cocoon:/{../1}/linkmap" />
   <map:serialize type="xml"/>
</map:act>

I want to make use of this by using a valid XHTML document as source document:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Titel</title>
</head>
<body>
  <p>Body Text</p>
</body>
</html>

I have, of course, added the XHTML DTD to my project's resources so this document doesn't
trigger an error, but the result in the website generated by Cocoon has empty content (except
of the navigation etc.) Only if I delete the DOCTYPE declaration AND the namespace attribute
everything works as expected.

(1) What is the reason?
(2) I edit my docs with XMetal so I don't want to strip the DOCTYPE (which leaves me without
the advantages of XML validation). How do I have to change the sitemap?

Generally, I think that the condemnation of XHTML as a suitable format for Forrest websites
is a bit too harsh. There are situations when you need nothing more than HTML but the documentation
doctypes are not sufficient (the tables in particular). XHTML should in my view be a format
that is supported "out of the box" because Forrest is a very generic tool not just suited
for documentation.

Thanks,
Andreas

Mime
View raw message