You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Nicola Ken Barozzi <ni...@apache.org> on 2003/01/15 11:39:46 UTC

*.ihtml - Writing Forrest pages with an Html editor

I have done a working html -> document11 stylesheet, and are now able to 
generate pages from html files as we do for xdocs.

On my machine I have made the following to the sitemap.


   <!-- Generates body HTML for root-level files -->
    <map:match pattern="body-**.xml">

      <!-- if the file is present as ihtml, give that to the user... -->
      <map:act type="resource-exists">
        <map:parameter name="url" value="content/xdocs/{1}.ihtml"/>
        <map:generate src="content/xdocs/{../1}.ihtml" type="html"/>
        <map:transform src="library/xslt/html2document.xsl"/>
        <map:call resource="skinit">
          <map:parameter name="type" value="document2html"/>
          <map:parameter name="path" value="{../1}.xml"/>
        </map:call>
      </map:act>

     <map:generate src="content/xdocs/{1}.xml"/>
     <map:call resource="transform-to-document">
      <map:parameter name="src" value="content/xdocs/{1}.xml"/>
     </map:call>
     <map:call resource="skinit">
      <map:parameter name="type" value="document2html"/>
      <map:parameter name="path" value="{1}.xml"/>
     </map:call>
    </map:match>


It makes ihtml files be used to generate content if they are present, 
instead of the document11 version.

So in essence, there would be an editor for Forrest called Mozilla Composer.

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


Re: *.ihtml - Writing Forrest pages with an Html editor

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Steven Noels wrote:
> Nicola Ken Barozzi wrote:
>>
>> Steven Noels wrote:
> 
>>> Do you handle sections? 
>>
>> Yes.
>>
>>> That was my biggest problem when trying to do the same.
>>
>> Shall I commit it?
> 
> Sure!

Done. It needs more work though to add title, authors from meta tags, etc.

Sorry for the bogus commit messages, they should have read:

       <action dev="NKB" type="add" context="webapp">
         Added the possibility to use html files in xdocs instead
         of xml files.
         They must have an .ihtml extension.
       </action>

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


Re: *.ihtml - Writing Forrest pages with an Html editor

Posted by Steven Noels <st...@outerthought.org>.
Nicola Ken Barozzi wrote:
> 
> 
> Steven Noels wrote:


>> Do you handle sections? 
> 
> 
> Yes.
> 
>> That was my biggest problem when trying to do the same.
> 
> 
> Shall I commit it?

Sure!

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org


Re: *.ihtml - Writing Forrest pages with an Html editor

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

Steven Noels wrote:
> Nicola Ken Barozzi wrote:
> 
>>
>> I have done a working html -> document11 stylesheet, and are now able 
>> to generate pages from html files as we do for xdocs.
> 
> Cool.
> 
> Do you handle sections? 

Yes.

> That was my biggest problem when trying to do 
> the same.

Shall I commit it?

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


Re: *.ihtml - Writing Forrest pages with an Html editor

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

Steven Noels wrote:
> Nicola Ken Barozzi wrote:
> 
>>
>> I have done a working html -> document11 stylesheet, and are now able 
>> to generate pages from html files as we do for xdocs.
> 
> Cool.
> 
> Do you handle sections? 

Yes.

> That was my biggest problem when trying to do 
> the same.

Shall I commit it?

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


Re: *.ihtml - Writing Forrest pages with an Html editor

Posted by Steven Noels <st...@outerthought.org>.
Nicola Ken Barozzi wrote:
> 
> I have done a working html -> document11 stylesheet, and are now able to 
> generate pages from html files as we do for xdocs.

Cool.

Do you handle sections? That was my biggest problem when trying to do 
the same.

</Steven>
-- 
Steven Noels                            http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at            http://blogs.cocoondev.org/stevenn/
stevenn at outerthought.org                stevenn at apache.org