forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: custom formatting / css
Date Wed, 19 Mar 2003 02:33:08 GMT
On Tue, Mar 18, 2003 at 09:20:19AM -0700, Victor Mote wrote:
> Victor Mote wrote:
> > Jeff Turner wrote:
> > > So to get a custom HTML format, you would simply delete everything from
> > > the transform down, and replace it with:
> > >
> > >    <map:transform src="resources/stylesheets/compliance2html.xsl"/>
> > >    <map:serialize type="xml"/>
> > >
> > > Note that compliance2html.xsl has to have a root tag of <div
> > > class="content">.  This allows the resultant HTML to be merged with the
> > > menu and tabs.  If it doesn't work, try 'forrest run', and then request
> > > http://localhost:8888/body-compliance.xml, and see what's actually being
> > > produced.
> >
> > Thanks -- I'll work on that here shortly. And your answer also gives me a
> > piece of the puzzle I didn't understand before :-)
> 
> OK, I got that done, and the page looks great (or at least as intended)! The
> only remaining issue is that the PDF icon is gone & the pdf does not appear
> to be generated during the build. I should be able to track that down.

Well, by bypassing the intermediate format, you've assumed responsibility
for rendering the end formats (HTML, PDF).  In particular, the
compliance2html.xsl stylesheet now has to insert the link to the PDF,
since the document2html.xsl stylesheet (which normally does it) isn't
invoked.

Should be pretty simple to create a compliance.pdf pipeline, if you
modify Forrest's document2fo.xsl to create a compliance2fo.xsl:

<map:match pattern="compliance.pdf">
  <map:generate type="file-nolabel" src="content/xdocs/compliance.xml" />
  <map:transform src="resources/stylesheets/compliance2fo.xsl" label="content" />
  <map:serialize type="fo2pdf" />
</map:match>

That needs to be inserted before the generic '*.pdf' matcher.


--Jeff

PS: testing sitemap edits with command-line rendering is exceedingly
painful, so if you're not already, you might want to do 'forrest run',
and then play with the sitemap in build/webapp/sitemap.xmap, and view on
http://localhost:8888.


> Thanks again very much.
> 
> Victor Mote
> 

Mime
View raw message