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 (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: > > > ""> > > > > to this (following the example of samples/ihtml-sample.ihtml): > > > > 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: > >

The VAT rate of France is higher than the VAT rate of Germany .

> > rather than what I had hoped for: > >

The VAT rate of France 19.6% is higher than the VAT rate of Germany > 16%.

> > The source within the VATReport.ihtml file (created by XMLMind) reads: > >

The VAT rate of France href="VATrates.html#france_vat" > xmlns:xi="" />is higher than the > VAT rate > of Germany xmlns:xi="" />.

> > and I do have a file called VATrates.html, with entries such as this: > > 19.6% 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: > >

XMLmind logo

> > 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