forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian M Dube <brian.d...@gmail.com>
Subject Re: Custom HTML source
Date Mon, 17 Oct 2005 01:15:46 GMT
On 10/16/05, David Crossley <crossley@apache.org> wrote:
> Ross Gardler wrote:
> > Brian M Dube wrote:
> > >Ross Gardler wrote:
> > >>Brian M Dube wrote:
> > >>
> > >>>Following the example in the documentation, I've added a custom
> > >>>pipeline to support rendering existing HTML sources within the local
> > >>>Forrest installation. The pattern match works and the HTML is skinned.
> > >>>The problem is that I can't get the transformation to process the
> > >>>intermediate file. Here is the relevant pipeline:
> > >>>
> > >>> <map:pipeline>
> > >>>   <map:match pattern="/old/*.xml">
> > >>>     <map:generate src="{project:content.xdocs}{uri}.html" type="html"/>
> > >>>     <map:transform
> > >>>     src="{project:resources.stylesheets}/fixoldhtml.xsl"/>
> > >>>     <map:transform src="{forrest:stylesheets}/html2document.xsl"/>
> > >>>     <map:transform type="idgen"/>
> > >>>     <map:serialize type="xml-document"/>
> > >>>   </map:match>
> > >>> </map:pipeline>
> > >>>
> > >>>fixoldhtml.xsl is the stylesheet I made to remove the navigational
> > >>>markup from the old site, as the documentation describes. Any ideas?
>
> Your Generator needs to be
> <map:generate src="{project:content.xdocs}/old/{1}.html" type="html"/>

Thanks. I think it's a mistake here
http://forrest.apache.org/docs_0_70/howto/howto-custom-html-source.html

> Ross' other comments are still relevant, about why
> you are redefining the Generator in the <compoents> section.

I have no components section in my local sitemap. When I comment out
the references to jtidy.properties in the core forrest.xmap and core
sitemap.xmap, the local pipeline works, including the transformation.

Brian

> > >>Your pipeline is not being processed. Let me ask a few questions to work
> > >>out why (I'll also say what the answers should be, in most circumstances).
> > >>
> > >>1) in what file have you placed the above pipeline?
> > >>2) where is your HTML source located?
> > >>3) what is the request you are making with your browser to retrieve this
> > >>document?
> > >
> > >Thanks for the reply.
> > >
> > >1) The pipeline is in SEEDED_SITE/src/documentation/sitemap.xmap
> > >2) The HTML is in SEEDED_SITE/src/documentation/content/xdocs/old
> > >3) The request is http://localhost:8888/old/about.html
> >
> > All good
> >
> > >I've changed the pattern from "/old/*.xml" to "old/*.xml" and I think
> > >the pipeline is being processed.
> >
> > Ahh, yes, I missed that on first reading.
> >
> > >In core.log I get "Cannot load
> > >configuration from WEB-INF/jtidy.properties"
> >
> > You are defining the HTML generator in your own sitemap? You only need
> > to do that if you want to provide your own configuration. If you remove
> > the HTML generator from the components section of your sitemap it will
> > use the one in the core of Forrest and will use the properties from
> > there (I think).
> >
> > If this doesn't work please post the sitemap snippet configuring your
> > html generator.
> >
> > > Thanks for looking into this.
> >
> > I'm off to bed now, will look again in the morning if the above does not
> > solve your problem.

Mime
View raw message