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 16:14:10 GMT
Clay Leeds wrote:
> David Crossley wrote:
> <snip>
> >> 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.
> 
> For completeness-sake, where would such ENTITY definitions be placed? 
> Could they go in forrest.properties or skinconf.xml? The 
> forrest.properties file already has many of these, so that makes sense 
> to me.

(As i said, i would rather not get into development issues
on the user list.)

Not forrest.properties because it is not an xml file.

It would probably be a separate file that can be handled
by the catalog entity resolver. Anyway i am still
experimenting.

-- 
David Crossley


Mime
View raw message