forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Crossley <cross...@apache.org>
Subject Re: Howto: "macros" in xdocs?
Date Fri, 05 Nov 2004 08:36:45 GMT
Charles Ames wrote:
> Forgive me if this is in the FAQ, but we didn't see it...

Because the capability is not available
in a neat solution at this stage.

> We're building a product documentation site with Forrest.  We want to define
> site-wide "macros", like ${product-version} and ${release-date}, that can be
> inserted in individual content\xdocs\* files and replaced by corresponding
> literal values, like "6.0.1", at render time.
> 
> What's the easiest way to do this with Forrest?

We have been discussing such a need on the development list.
http://marc.theaimsgroup.com/?l=forrest-dev&r=4&b=200410
http://marc.theaimsgroup.com/?l=forrest-dev&m=109895958631116

I don't want to get into too much tech discussion
on this "user" list.

One potential solution would be to use xml entities.
Each project could define a text file with entity
definitions ...

------
<!ENTITY project-name 'Some Name'>
<!ENTITY project-url 'http://www.somename.com/'>
...
------

Then you use then in your XML instances like
this ... &project-name;
and maybe even use them in stylesheets too. Not sure yet.

There would be a project-based set and a Forrest main set.

-- 
David Crossley


Mime
View raw message