You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by Berin Loritsch <bl...@apache.org> on 2003/02/07 22:29:41 UTC

Forrest and Forms

We need a way to generate the form and selection list for bin downloads.
Essentially I need to do something like this:

	    <section>
	      <title>Mirror</title>
	      <p>
		      You are currently using the <strong>[preferred]</strong>.  If 
you encounter
		a problem with this mirror, please select another mirror.  If
		all mirrors are failing, there are <em>backup</em> mirrors (at the
		end of the mirrors list) that should be available.
	      </p>
	      <form action="[location]" method="get" id="SelectMirror">
		  Other mirrors:
		  <select name="Preferred">
[if-any http]
   [for http]<option value="[http]">[http]</option>[end]
[end]
[if-any ftp]
   [for ftp]<option value="[ftp]">[ftp]</option>[end]
[end]
[if-any backup]
   [for backup]<option value="[backup]">[backup] (backup)</option>[end]
[end]
		  </select>
		  <input type="submit" value="Change"/>
	      </form>
             </section>


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Berin Loritsch wrote, On 07/02/2003 23.42:
> Nicola Ken Barozzi wrote:
> 
>>
>>>
>>> What I want is something that Forrest renders to the .html location:
>>>
>>> bindownload.html
>>> srcdownload.html
>>
>>
>>
>> make
>>
>>   bindownload.ehtml
>>   srcdownload.ehtml
>>
>> And link them somewhere as
>>
>>   bindownload.html
>>   srcdownload.html
>>
>> They will be processed.
>>
>> ehtml, ihtml, cwiki extensions are the source extensions. The 
>> resulting one is html.
>>
>> Is this ok or are there issues I miss?
> 
> 
> Can the EHTML file be rendered from a document-v1.1 compliant doc,
> with only the embedded HTML tags being copied verbatim?

Nope. The form tags are not contemplated in document-v1.1.
But the appearance will be equivalent, because the navigation bars are 
added and the CSS kicks in.

> Also, regarding linking them:
> 
> We need to link to the **.cgi files.  I.e. bindownload.cgi
> 
> so the link needs to be done without rendering it.

Put them in content and they will be copied over. If the link gets 
mangled, use an absolute link.

I want to make it configurable not to do this mangling in Cocoon... 
eventually ;-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Berin Loritsch <bl...@apache.org>.
Nicola Ken Barozzi wrote:
> 
>>
>> What I want is something that Forrest renders to the .html location:
>>
>> bindownload.html
>> srcdownload.html
> 
> 
> make
> 
>   bindownload.ehtml
>   srcdownload.ehtml
> 
> And link them somewhere as
> 
>   bindownload.html
>   srcdownload.html
> 
> They will be processed.
> 
> ehtml, ihtml, cwiki extensions are the source extensions. The resulting 
> one is html.
> 
> Is this ok or are there issues I miss?

Can the EHTML file be rendered from a document-v1.1 compliant doc,
with only the embedded HTML tags being copied verbatim?

Also, regarding linking them:

We need to link to the **.cgi files.  I.e. bindownload.cgi

so the link needs to be done without rendering it.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Berin Loritsch wrote, On 07/02/2003 23.32:
> Nicola Ken Barozzi wrote:
> 
>>
>> Berin Loritsch wrote, On 07/02/2003 23.10:
>> ...
>>
>>> Could you set up the bindownload/srcdownload pages so that they
>>> are rendered, and the link is to the bindownload.cgi file and not
>>> the bindownload.cgi.html?
>>
>>> The bindownload.cgi/srcdownload.cgi files look for an HTML file
>>> with the same name (but with the .html extension) and hunt for
>>> the entries with [**] and process them.
>>
>> Sorry, I don't get it. Can you please reexplain?
> 
> The CGI files read an HTML file.  In the HTML file it looks for
> directives like [preferred] or [http] and [for-each], and
> processes them by replacing the text with what the CGI script
> found.
> 
> What I want is something that Forrest renders to the .html location:
> 
> bindownload.html
> srcdownload.html

make

   bindownload.ehtml
   srcdownload.ehtml

And link them somewhere as

   bindownload.html
   srcdownload.html

They will be processed.

ehtml, ihtml, cwiki extensions are the source extensions. The resulting 
one is html.

Is this ok or are there issues I miss?

> The associated CGI scripts (bindownload.cgi and srcdownload.cgi)
> process them.
> 
> Its how we have our own face on mirroring code.

Cool.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Berin Loritsch <bl...@apache.org>.
Nicola Ken Barozzi wrote:
> 
> 
> Berin Loritsch wrote, On 07/02/2003 23.10:
> ...
> 
>> Could you set up the bindownload/srcdownload pages so that they
>> are rendered, and the link is to the bindownload.cgi file and not
>> the bindownload.cgi.html?
> 
>  >
> 
>> The bindownload.cgi/srcdownload.cgi files look for an HTML file
>> with the same name (but with the .html extension) and hunt for
>> the entries with [**] and process them.
> 
> 
> Sorry, I don't get it. Can you please reexplain?
> 


The CGI files read an HTML file.  In the HTML file it looks for
directives like [preferred] or [http] and [for-each], and
processes them by replacing the text with what the CGI script
found.

What I want is something that Forrest renders to the .html location:

bindownload.html
srcdownload.html


The associated CGI scripts (bindownload.cgi and srcdownload.cgi)
process them.

Its how we have our own face on mirroring code.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Nicola Ken Barozzi <ni...@apache.org>.

Berin Loritsch wrote, On 07/02/2003 23.10:
...
> Could you set up the bindownload/srcdownload pages so that they
> are rendered, and the link is to the bindownload.cgi file and not
> the bindownload.cgi.html?
 >
> The bindownload.cgi/srcdownload.cgi files look for an HTML file
> with the same name (but with the .html extension) and hunt for
> the entries with [**] and process them.

Sorry, I don't get it. Can you please reexplain?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Berin Loritsch <bl...@apache.org>.
Nicola Ken Barozzi wrote:
> 
> Berin Loritsch wrote, On 07/02/2003 22.29:
> 
>> We need a way to generate the form and selection list for bin downloads.
> 
> 
> Short answer: Use an ehtml file.
> 
> Long answer: Forrest now works with these document file types:
> 
> * Forrest documentDTD11 (*.xml)
>    the usual format
> * embedded html (*.ehtml)
>    all html in the body tags is tidied and included in the
>    page as-is
> * converted html (*.ihtml)
>    the html is tidied and converted to documentDTD11
> * wiki format (*.cwiki)
>    the format is a WIP, and we now have a soon2be committed
>    quite nice subwiki-type format

Could you set up the bindownload/srcdownload pages so that they
are rendered, and the link is to the bindownload.cgi file and not
the bindownload.cgi.html?

The bindownload.cgi/srcdownload.cgi files look for an HTML file
with the same name (but with the .html extension) and hunt for
the entries with [**] and process them.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Berin Loritsch wrote, On 07/02/2003 22.59:
> Nicola Ken Barozzi wrote:
> 
>>
>> Berin Loritsch wrote, On 07/02/2003 22.29:
>>
>>> We need a way to generate the form and selection list for bin downloads.
>>
>> Short answer: Use an ehtml file.
>>
>> Long answer: Forrest now works with these document file types:
>>
>> * Forrest documentDTD11 (*.xml)
>>    the usual format
>> * embedded html (*.ehtml)
>>    all html in the body tags is tidied and included in the
>>    page as-is
> 
> 
> How does this work.  Is it not stylized or something?

Simply copied as-is, and embedded in the navigations. The style is the 
CSS one.

To see the latest Forrest template regenned regularly, see here
http://forrestbot.cocoondev.org/site/xml-forrest-template


-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Berin Loritsch <bl...@apache.org>.
Nicola Ken Barozzi wrote:
> 
> Berin Loritsch wrote, On 07/02/2003 22.29:
> 
>> We need a way to generate the form and selection list for bin downloads.
> 
> 
> Short answer: Use an ehtml file.
> 
> Long answer: Forrest now works with these document file types:
> 
> * Forrest documentDTD11 (*.xml)
>    the usual format
> * embedded html (*.ehtml)
>    all html in the body tags is tidied and included in the
>    page as-is


How does this work.  Is it not stylized or something?



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org


Re: Forrest and Forms

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Berin Loritsch wrote, On 07/02/2003 22.29:
> We need a way to generate the form and selection list for bin downloads.

Short answer: Use an ehtml file.

Long answer: Forrest now works with these document file types:

* Forrest documentDTD11 (*.xml)
    the usual format
* embedded html (*.ehtml)
    all html in the body tags is tidied and included in the
    page as-is
* converted html (*.ihtml)
    the html is tidied and converted to documentDTD11
* wiki format (*.cwiki)
    the format is a WIP, and we now have a soon2be committed
    quite nice subwiki-type format

DocBook support is coming.

BTW, the usage of book.xml can be switched to using site.xml, a single 
sitemap that can also be used for linking. (href="site:mysite" ans 
mysite is an element in the sitemap, and will show in the navigation)

I'm submitting your patch now BTW.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@avalon.apache.org
For additional commands, e-mail: dev-help@avalon.apache.org