You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Niklas Koponen <ni...@iki.fi> on 2003/08/16 13:07:31 UTC

Newbie question: Special file

Hi!

I asked this question a few days ago but got no answer. I guess the
formatting of the question was somewhat obscure and nobody understood my
problem. I read from the forrest homepage that this is the only forrest
mailing list otherwise I would not be posting to a developer list.

I have a site with normal documents for which the doc12 format suits
fine (Its a site for a restaurant). The problem is with the page that
lists the lunches for the current week. I need some special formatting
for the html and the pdf version of that page. I have the stylesheets
ready that does the formatting to html and fo and I have the DTD for the
lunch.

The problem is that I cannot figure out how to bypass the normal
processing pipeline for this one file xdocs/lunch.xml. I was able to
register the lunch so its get transformed to doc12. But that is not
really what I was after.

I got have the site ready by monday and all that is missing is this one
page.

I would appreciate if somebody could at least point me to the right
direction or state that the problem cannot be solved. If you need more
information I will submit it.

        HTML <----------------------------\
         ^                                |
         |    PDF<--------------------\   |
         |     ^                      |   |
	 |     |                      |   |
         |     |                      |   |
 |----------------------------|       |   |
 |    doc-v12                 |       |   |
 |                            |       |   |
 |-^------^-----^-------------|       |   |
   |      |     |                     |   |
   |      |     |                     |   |
  DocBook .... FAQ                    Lunch

  Is this possible using Forrest?

-Niklas
-- 
Niklas Koponen   | Hietapellontie 3 B 7 | niklas.koponen@iki.fi
+358 40 757 1459 | 02400 KIRKKONUMMI    | http://www.iki.fi/niklas.koponen


Re: Newbie question: Special file

Posted by Jeff Turner <je...@apache.org>.
On Mon, Aug 18, 2003 at 01:26:50AM +0300, Niklas Koponen wrote:
> On Sat, Aug 16, 2003 at 09:38:22PM +1000, Jeff Turner wrote:
> > On Sat, Aug 16, 2003 at 02:07:31PM +0300, Niklas Koponen wrote:
> > > The problem is that I cannot figure out how to bypass the normal
> > > processing pipeline for this one file xdocs/lunch.xml. I was able to
> > > register the lunch so its get transformed to doc12. But that is not
> > > really what I was after.
> > 
> > Have a look at:
> > 
> > http://xml.apache.org/forrest/your-project.html#adding_new_content_type
> > 
> > You need to:
> >  - Add your custom DTD and register it in the catalog
> >  - Add your stylesheet
> >  - Override and customise the sitemap to apply your stylesheet to
> >    xdocs/lunch.xml
> > 
> > To start with, I'd suggest running Forrest interactively ('forrest run',
> > then browse http://localhost:8888), and tinkering with the sitemap in
> > build/webapp/*.xmap and content in build/webapp/content/xdocs/*.  That
> > way, you can see in realtime how the sitemap works, and what changes need
> > be made to render lunch.xml specially.
> 
> Thank you for the advice. Development went faster after switching to
> "live" mode.

It's great if you're able to symlink build/webapp/content/xdocs to
src/documentation/content/xdocs.  Otherwise you have to use 'forrest
backcopy' to synch the two.

> I got figured out how to generate the pdf but I left the
> html formatting alone. I noticed that the tables were configurable
> using the css stylesheets. Where do I submit a new site using Forrest
> ;-)?

To this list, and we'll add it to live-site.xml

--Jeff

> -Niklas
> 
> -- 
> Niklas Koponen   | Hietapellontie 3 B 7 | niklas.koponen@iki.fi
> +358 40 757 1459 | 02400 KIRKKONUMMI    | http://www.iki.fi/niklas.koponen
> 

Re: Newbie question: Special file

Posted by Niklas Koponen <ni...@iki.fi>.
On Sat, Aug 16, 2003 at 09:38:22PM +1000, Jeff Turner wrote:
> On Sat, Aug 16, 2003 at 02:07:31PM +0300, Niklas Koponen wrote:
> > The problem is that I cannot figure out how to bypass the normal
> > processing pipeline for this one file xdocs/lunch.xml. I was able to
> > register the lunch so its get transformed to doc12. But that is not
> > really what I was after.
> 
> Have a look at:
> 
> http://xml.apache.org/forrest/your-project.html#adding_new_content_type
> 
> You need to:
>  - Add your custom DTD and register it in the catalog
>  - Add your stylesheet
>  - Override and customise the sitemap to apply your stylesheet to
>    xdocs/lunch.xml
> 
> To start with, I'd suggest running Forrest interactively ('forrest run',
> then browse http://localhost:8888), and tinkering with the sitemap in
> build/webapp/*.xmap and content in build/webapp/content/xdocs/*.  That
> way, you can see in realtime how the sitemap works, and what changes need
> be made to render lunch.xml specially.

Thank you for the advice. Development went faster after switching to
"live" mode. I got figured out how to generate the pdf but I left the
html formatting alone. I noticed that the tables were configurable
using the css stylesheets. Where do I submit a new site using Forrest
;-)?

-Niklas

-- 
Niklas Koponen   | Hietapellontie 3 B 7 | niklas.koponen@iki.fi
+358 40 757 1459 | 02400 KIRKKONUMMI    | http://www.iki.fi/niklas.koponen


Re: Newbie question: Special file

Posted by Jeff Turner <je...@apache.org>.
On Sat, Aug 16, 2003 at 02:07:31PM +0300, Niklas Koponen wrote:
> Hi!
> 
> I asked this question a few days ago but got no answer. I guess the
> formatting of the question was somewhat obscure and nobody understood my
> problem.

Sorry, I missed that one.

> I read from the forrest homepage that this is the only forrest
> mailing list otherwise I would not be posting to a developer list.
>
> I have a site with normal documents for which the doc12 format suits
> fine (Its a site for a restaurant). The problem is with the page that
> lists the lunches for the current week. I need some special formatting
> for the html and the pdf version of that page. I have the stylesheets
> ready that does the formatting to html and fo and I have the DTD for the
> lunch.
> 
> The problem is that I cannot figure out how to bypass the normal
> processing pipeline for this one file xdocs/lunch.xml. I was able to
> register the lunch so its get transformed to doc12. But that is not
> really what I was after.

Have a look at:

http://xml.apache.org/forrest/your-project.html#adding_new_content_type

You need to:
 - Add your custom DTD and register it in the catalog
 - Add your stylesheet
 - Override and customise the sitemap to apply your stylesheet to
   xdocs/lunch.xml

To start with, I'd suggest running Forrest interactively ('forrest run',
then browse http://localhost:8888), and tinkering with the sitemap in
build/webapp/*.xmap and content in build/webapp/content/xdocs/*.  That
way, you can see in realtime how the sitemap works, and what changes need
be made to render lunch.xml specially.

HTH,

--Jeff

> I got have the site ready by monday and all that is missing is this one
> page.
> 
> I would appreciate if somebody could at least point me to the right
> direction or state that the problem cannot be solved. If you need more
> information I will submit it.
> 
>         HTML <----------------------------\
>          ^                                |
>          |    PDF<--------------------\   |
>          |     ^                      |   |
> 	 |     |                      |   |
>          |     |                      |   |
>  |----------------------------|       |   |
>  |    doc-v12                 |       |   |
>  |                            |       |   |
>  |-^------^-----^-------------|       |   |
>    |      |     |                     |   |
>    |      |     |                     |   |
>   DocBook .... FAQ                    Lunch
> 
>   Is this possible using Forrest?
> 
> -Niklas
> -- 
> Niklas Koponen   | Hietapellontie 3 B 7 | niklas.koponen@iki.fi
> +358 40 757 1459 | 02400 KIRKKONUMMI    | http://www.iki.fi/niklas.koponen
>