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: http://www.xmlmind.com/xmleditor/_distrib/docs/user/userguide3.html#id.s3
 
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)
 
So move past this I had to rename their file VATReport.html to VATReport.ihtml (following the example of samples/ihtml-sample.ihtml).
 
 
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"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
  <head>
 
to this (following the example of samples/ihtml-sample.ihtml):
 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
 
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="http://www.w3.org/2001/XInclude" />is higher than the VAT rate
    of Germany <xi:include href="VATrates.html#germany_vat"
    xmlns:xi="http://www.w3.org/2001/XInclude" />.</p>
 
and I do have a file called VATrates.html, with entries such as this:
 
<td><span id="france_vat">19.6%</span></td>
 
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
 
***************************
 
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?
 
4    What about processing of different picture types? I seem to have read something about this somewhere, but can't find it now.
 
Thanks - Charles