You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Koala <ko...@tiscali.it> on 2004/09/29 13:59:32 UTC

A simple question

Hi again,

I post my question. Hoping someone can help me.

I want to add in my index.xml file (home page) a counter that need this 
code in the html code generated file (index.html):

<script type="text/javascript" 
src="http://www.altervista.org/js_tags/contatore.js"></script>

the question is ... how I can add this to my xml file in order to 
generate an index.html containing the code above.

index.xml is a document-v13 DTD.

Thanks again
Bye

Re: A simple question

Posted by David Crossley <cr...@apache.org>.
Koala wrote:
> Dave Brondsema wrote:
> > Koala wrote:
> >> I want to add in my index.xml file (home page) a counter that need 
> >> this code in the html code generated file (index.html):
> >>
> >> <script type="text/javascript" 
> >> src="http://www.altervista.org/js_tags/contatore.js"></script>
> >>
> >> the question is ... how I can add this to my xml file in order to 
> >> generate an index.html containing the code above.
> >>
> >> index.xml is a document-v13 DTD.
> >
> > Do you want to include it on every page?  If so you will have to 
> > modify the skin you are using.  You will have to modify the files in 
> > src/core/context/skins/<<SKIN>>/xslt/html (where <<SKIN>> is the name 
> > of the skin you are using).
> >
> > If you want it on just one page, you should use a .ihtml file (see the 
> > sample in the "forrest seed" site).
> >
> I want to put it only in one page (the home page). You are telling me 
> that it is impossible put it in a document-v13 file. Am I right?

Not at all - nothing is impossible. The power of Cocoon underneath
allows you generate, transform, and aggregate your pipeline. Use your
project sitemap into insert the <script> fragment using aggregation.
Study the core forrest sitemaps for inspiration.

Oh, you would do better to use sensible Subjects for your emails
to attract the attention of busy volunteers.

See the "Contribution Notes and Tips":
http://forrest.apache.org/contrib.html#tips

-- 
David Crossley


Re: Generating aggregate PDF's

Posted by Johannes Schaefer <jo...@uidesign.de>.
Stephen Schaub wrote:

> As a followup to my previous post -- Oops -- I just re-read the original
> thread, and realized that I misunderstood the topic under discussion.
> 
> So let me start a new thread on the issue of specifying subset aggregate
> documents for PDF generation. I'll quote my previous post again here for
> convenience:
> 
> Forrest needs a good mechanism for specifying a subset of pages to convert
> to PDF. I suggest that we explore something like this (hypothetical section
> of a site.xml):
> 
> <about label="About" >
>     <home label="Home" href="index.html" />
>     <vision label="NextGen Vision" href="vision.html"   />
>     <ranking label="Ranking" href="ranking.html" />
> 
>     <printout label="Printout" href="printout.pdf" pdfonly="true">
>       <pdf_overview label="Overview">
>           <pdf_vision label="NextGen Vision" href="vision.html"   />
>  <pdf_ranking label="Ranking" href="ranking.html" />
>       </pdf_overview>
>       <pdf_usecases label="Use cases" href="usecases/" >
>         <pdf_uc_summary label="Summary" href="index.html" />
>         <pdf_process_sale label="Process Sale" href="process_sale.html" />
>         <pdf_handle_returns label="Handle Returns"
> href="handle_returns.html" />
>         <pdf_submit_solution label="Submit Solution"
> href="submit_solution.html" />
>       </pdf_usecases>
>     </printout>
> </about>
> 
> Notice the <printout> element with attribute pdfonly="true". This defines a
> set of project documents to include in a pdf named printout.pdf. Unlike the
> current "pdf-tab" approach, the children of the <printout> element would not
> appear in the menu.
> 
> This approach would allow me to specify not only which documents to include
> in a PDF, but also the ordering and structure of the documents.

We encountered something similar that might result
in a common solution: we want the PDF to have
certain pages that the html version doesn't need
(e.g. a titlepage) or reorder the content (in pdf
put the document info up front, on the web it's
somewhere back in the appendix). I'm not sure if
this matches your suggestions, though. I thought
even about having a special pdfsite.xml and/or
pdfconf.xml ...

Cheers
Johannes



-- 
User Interface Design GmbH * Teinacher Str. 38 * D-71634 Ludwigsburg
Fon +49 (0)7141 377 000 * Fax  +49 (0)7141 377 00-99
Geschäftsstelle: User Interface Design GmbH * Lehrer-Götz-Weg 11 * 
D-81825 München
www.uidesign.de

Generating aggregate PDF's

Posted by Stephen Schaub <ss...@bju.edu>.
As a followup to my previous post -- Oops -- I just re-read the original
thread, and realized that I misunderstood the topic under discussion.

So let me start a new thread on the issue of specifying subset aggregate
documents for PDF generation. I'll quote my previous post again here for
convenience:

Forrest needs a good mechanism for specifying a subset of pages to convert
to PDF. I suggest that we explore something like this (hypothetical section
of a site.xml):

<about label="About" >
    <home label="Home" href="index.html" />
    <vision label="NextGen Vision" href="vision.html"   />
    <ranking label="Ranking" href="ranking.html" />

    <printout label="Printout" href="printout.pdf" pdfonly="true">
      <pdf_overview label="Overview">
          <pdf_vision label="NextGen Vision" href="vision.html"   />
 <pdf_ranking label="Ranking" href="ranking.html" />
      </pdf_overview>
      <pdf_usecases label="Use cases" href="usecases/" >
        <pdf_uc_summary label="Summary" href="index.html" />
        <pdf_process_sale label="Process Sale" href="process_sale.html" />
        <pdf_handle_returns label="Handle Returns"
href="handle_returns.html" />
        <pdf_submit_solution label="Submit Solution"
href="submit_solution.html" />
      </pdf_usecases>
    </printout>
</about>

Notice the <printout> element with attribute pdfonly="true". This defines a
set of project documents to include in a pdf named printout.pdf. Unlike the
current "pdf-tab" approach, the children of the <printout> element would not
appear in the menu.

This approach would allow me to specify not only which documents to include
in a PDF, but also the ordering and structure of the documents.

Thoughts?

Stephen


Re: PDFs only for certain pages (Was: A simple question)

Posted by Stephen Schaub <ss...@bju.edu>.
>>>Ok. I solved my problem. For pages that I do not want to convert in PDF
>>>I will use ehtml file. It is ok for me.
>>>I noticed this file format is deprecated. Why?
>>
>> It is deprecated because it is only convertable to HTML.  We suggest that

> So maybe we should keep it around for that purpose.
> WDYT?

Forrest needs a good mechanism for specifying a subset of pages to convert
to PDF. I suggest that, rather than relying on ad-hoc approaches (like using
ehtml), we explore something like this (hypothetical section of a site.xml):

<about label="About" >
    <home label="Home" href="index.html" />
    <vision label="NextGen Vision" href="vision.html"   />
    <ranking label="Ranking" href="ranking.html" />

    <printout label="Printout" href="printout.pdf" pdfonly="true">
      <pdf_overview label="Overview">
          <pdf_vision label="NextGen Vision" href="vision.html"   />
 <pdf_ranking label="Ranking" href="ranking.html" />
      </pdf_overview>
      <pdf_usecases label="Use cases" href="usecases/" >
        <pdf_uc_summary label="Summary" href="index.html" />
        <pdf_process_sale label="Process Sale" href="process_sale.html" />
        <pdf_handle_returns label="Handle Returns"
href="handle_returns.html" />
        <pdf_submit_solution label="Submit Solution"
href="submit_solution.html" />
      </pdf_usecases>
    </printout>
</about>

Notice the <printout> element with attribute pdfonly="true". This defines a
set of project documents to include in a pdf named printout.pdf. Unlike the
current "pdf-tab" approach, the children of the <printout> element would not
appear in the menu.

This approach would allow me to specify not only which documents to include
in a PDF, but also the ordering and structure of the documents.

Thoughts?

Stephen


Re: PDFs only for certain pages (Was: A simple question)

Posted by thorsten <th...@apache.org>.
Dave Brondsema wrote:
> Quoting Koala <ko...@tiscali.it>:
> 
> 
>>David Crossley wrote:
>>
>>
>>>Koala wrote:
>>> 
>>>
>>>
>>>>Another question.
>>>>I want generate a PDF for my document-v13 articles. How I can avoid to 
>>>>generate pdf for ihtml files?
>>>>   
>>>>
>>>
>>>You cannot - all or nothing. Please add this as an Improvement
>>>request in the Forrest Issue Tracker.
>>>
>>> 
>>>
>>
>>Ok. I solved my problem. For pages that I do not want to convert in PDF 
>>I will use ehtml file. It is ok for me.
>>I noticed this file format is deprecated. Why?
>>
> 
> 
> It is deprecated because it is only convertable to HTML.  We suggest that people
> use ihtml because that can be converted to PDF and other output formats too.
> 
> But you consider not generating PDFs for certain documents to be a feature..
> interesting :-)
> 

So maybe we should keep it around for that purpose.
WDYT?

thorsten


Re: PDFs only for certain pages (Was: A simple question)

Posted by Dave Brondsema <da...@brondsema.net>.
Quoting Koala <ko...@tiscali.it>:

> David Crossley wrote:
> 
> >Koala wrote:
> >  
> >
> >>Another question.
> >>I want generate a PDF for my document-v13 articles. How I can avoid to 
> >>generate pdf for ihtml files?
> >>    
> >>
> >
> >You cannot - all or nothing. Please add this as an Improvement
> >request in the Forrest Issue Tracker.
> >
> >  
> >
> Ok. I solved my problem. For pages that I do not want to convert in PDF 
> I will use ehtml file. It is ok for me.
> I noticed this file format is deprecated. Why?
> 

It is deprecated because it is only convertable to HTML.  We suggest that people
use ihtml because that can be converted to PDF and other output formats too.

But you consider not generating PDFs for certain documents to be a feature..
interesting :-)

-- 
Dave Brondsema : dave@brondsema.net 
http://www.brondsema.net : personal 
http://www.splike.com : programming 
http://csx.calvin.edu : student org 

Re: PDFs only for certain pages (Was: A simple question)

Posted by Koala <ko...@tiscali.it>.
David Crossley wrote:

>Koala wrote:
>  
>
>>Another question.
>>I want generate a PDF for my document-v13 articles. How I can avoid to 
>>generate pdf for ihtml files?
>>    
>>
>
>You cannot - all or nothing. Please add this as an Improvement
>request in the Forrest Issue Tracker.
>
>  
>
Ok. I solved my problem. For pages that I do not want to convert in PDF 
I will use ehtml file. It is ok for me.
I noticed this file format is deprecated. Why?

PDFs only for certain pages (Was: A simple question)

Posted by David Crossley <cr...@apache.org>.
Koala wrote:
> 
> Another question.
> I want generate a PDF for my document-v13 articles. How I can avoid to 
> generate pdf for ihtml files?

You cannot - all or nothing. Please add this as an Improvement
request in the Forrest Issue Tracker.

-- 
David Crossley


Re: A simple question

Posted by Koala <ko...@tiscali.it>.
Stefano Mancarella wrote:

> Koala wrote:
>
>> I want to put it only in one page (the home page). You are telling me 
>> that it is impossible put it in a document-v13 file. Am I right?
>
>
> You are right. To include it in the XML file you'd have to use a 
> modified DTD, AFAIK.

Another question.
I want generate a PDF for my document-v13 articles. How I can avoid to 
generate pdf for ihtml files?

Re: A simple question

Posted by Stefano Mancarella <st...@caboto.it>.
Koala wrote:
> I want to put it only in one page (the home page). You are telling me 
> that it is impossible put it in a document-v13 file. Am I right?

You are right. To include it in the XML file you'd have to use a 
modified DTD, AFAIK.

Re: A simple question

Posted by Koala <ko...@tiscali.it>.
Dave Brondsema wrote:

> Koala wrote:
>
>> Hi again,
>>
>> I post my question. Hoping someone can help me.
>>
>> I want to add in my index.xml file (home page) a counter that need 
>> this code in the html code generated file (index.html):
>>
>> <script type="text/javascript" 
>> src="http://www.altervista.org/js_tags/contatore.js"></script>
>>
>> the question is ... how I can add this to my xml file in order to 
>> generate an index.html containing the code above.
>>
>> index.xml is a document-v13 DTD.
>>
>> Thanks again
>> Bye
>
>
> Do you want to include it on every page?  If so you will have to 
> modify the skin you are using.  You will have to modify the files in 
> src/core/context/skins/<<SKIN>>/xslt/html (where <<SKIN>> is the name 
> of the skin you are using).
>
> If you want it on just one page, you should use a .ihtml file (see the 
> sample in the "forrest seed" site).
>
I want to put it only in one page (the home page). You are telling me 
that it is impossible put it in a document-v13 file. Am I right?

Re: A simple question

Posted by Dave Brondsema <da...@brondsema.net>.
Koala wrote:
> Hi again,
> 
> I post my question. Hoping someone can help me.
> 
> I want to add in my index.xml file (home page) a counter that need this 
> code in the html code generated file (index.html):
> 
> <script type="text/javascript" 
> src="http://www.altervista.org/js_tags/contatore.js"></script>
> 
> the question is ... how I can add this to my xml file in order to 
> generate an index.html containing the code above.
> 
> index.xml is a document-v13 DTD.
> 
> Thanks again
> Bye

Do you want to include it on every page?  If so you will have to modify 
the skin you are using.  You will have to modify the files in 
src/core/context/skins/<<SKIN>>/xslt/html (where <<SKIN>> is the name of 
the skin you are using).

If you want it on just one page, you should use a .ihtml file (see the 
sample in the "forrest seed" site).

-- 
Dave Brondsema : dave@brondsema.net
http://www.splike.com : programming
http://csx.calvin.edu : student org
http://www.brondsema.net : personal

Re: A simple question

Posted by "Ph. Barthelemy" <ph...@gadz.org>.
Hi,

I had the same problem.

As a workaround, I used a counter from nedstat. This
counter is an image on nedstat'd servers and I
included it in the <credits> of skinconf.xml

Maybe that's the easier way...

good luck

--P

 --- Koala <ko...@tiscali.it> a écrit : 
> Hi again,
> 
> I post my question. Hoping someone can help me.
> 
> I want to add in my index.xml file (home page) a
> counter that need this 
> code in the html code generated file (index.html):
> 
> <script type="text/javascript" 
>
src="http://www.altervista.org/js_tags/contatore.js"></script>
> 
> the question is ... how I can add this to my xml
> file in order to 
> generate an index.html containing the code above.
> 
> index.xml is a document-v13 DTD.
> 
> Thanks again
> Bye
>  

=====