forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <>
Subject Re: Using <!ENTITY> or XIncludes
Date Fri, 06 Aug 2004 16:14:08 GMT
Charles Palmer wrote:
> Team
> I have been struggling with getting some simple text substitution,
> working with Forrest and XMLMind as an editor.
> The first problem is that XMLMind doesn't support <!ENTITY> (it makes
> the substitution immediately). They suggest the XInclude construction,
> referred to in their tutorial here:
> So I have been working through their tutorial example, but it's not
> easy:
> 1    The first problem I had seems to be that their XHTML document
> doesn't seem to be recognised by Forrest if I add it to the site.xml
> and folder unmodified. I get this error:
> X [0]                       html_only/VATReport.html    BROKEN:
> C:\Forrest\proje
> cts\trm_test2\build\tmp\context\content\xdocs\html_only\VATReport.xml
> (The syste
> m cannot find the file specified)

When you request a .html file by specifying it in your site.xml
configuration, then Forrest's default sitemap looks for a 
matching XML file to use as the source to generate that .html

> So move past this I had to rename their file VATReport.html to
> VATReport.ihtml (following the example of samples/ihtml-sample.ihtml).

That is correct.

> 2    Once the file is renamed, Forrest appears not to know what to do
> about it. Forrest runs without printing errors, but the resulting HTML
> file says: "Error in conversion Warning This file is not in a html
> format, please convert manually." My hack for this was to change the
> header at the top of XMLMind's file from this:
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "">
> <html>
>   <head>
> to this (following the example of samples/ihtml-sample.ihtml):
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
> <html>
> <head>

That is strange, you shouldn't need to do that.

> after which Forrest runs without reporting errors (hurray!) and
> generates HTML (hurray!),
> 3     But alas Forrest does not perform the substitition I had hoped
> for. The HTML that Forrest generates reads: 
> <p>The VAT rate of France is higher than the VAT rate of Germany .</p>
> rather than what I had hoped for:
> <p>The VAT rate of France 19.6% is higher than the VAT rate of Germany
> 16%.</p>
> The source within the VATReport.ihtml file (created by XMLMind) reads:
>     <p>The VAT rate of France <xi:include
> href="VATrates.html#france_vat"
>     xmlns:xi="" />is higher than the
> VAT rate
>     of Germany <xi:include href="VATrates.html#germany_vat"
>     xmlns:xi="" />.</p>
> and I do have a file called VATrates.html, with entries such as this:
> <td><span id="france_vat">19.6%</span></td>

I don't know about these Xincludes, so will leave that
for someone else to answer.

> 4    And then there is the small matter that Forrest doesn't know what
> to do with the GIF file at the bottom of the VATReport.ihtml file:
>     <p><img alt="XMLmind logo" src="xxe.gif" /></p>
> I get this error:
> X [0]                       html_only/xxe.gif   BROKEN: No pipeline
> matched requ
> est: html_only/xxe.gif

Follow the examples in the 'forrest seed' site.
Put them in the src/documentation/content/xdocs/images directory
and refer to them with ../images/xxe.gif or you could treat them
as raw content and put them in src/documentation/content as per

> ***************************
> So that's my results - could I ask these questions:
> 1    What "types" of HTML can Forrest process, and what are the rules?
> 2    Can Forrest process this XInclude code? And if so, how?
> 3    If not, are there any suggestions for the substitution mechanism?

Your original approach with entities should work.

> 4    What about processing of different picture types? I seem to have
> read something about this somewhere, but can't find it now.

What type of pictures do you mean?

David Crossley

View raw message