You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Ferdinand Soethe <fe...@apache.org> on 2005/08/12 14:16:22 UTC

How to use XHTML as input format



What is required if I want to use XHTML as an input format.
Just placing it in xdocs will not work, strangely enough if I do that
with

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Testdocument XHTML</title>
  </head>
  <body>
    <h1>Testchapter</h1>
    <p>This is a test to see what attributes are passed through when processing xhtml.</p>
    <table border="1" width="30%">
      <tr>
        <td>Zell 1-1</td>
        <td>Zell 1-2</td>
        <td>Zell 1-3</td>
      </tr>
      <tr>
        <td>Zell 2-1</td>
        <td>Zell 2-2</td>
        <td>Zell 2-3</td>
      </tr>
      
    </table>
    
  </body>
</html>

I get a Forrest page with empty content area while calling the pipeline
body-... will produce a clean looking document.

Do I need to add a new mapping to the source pipeline, what else would
I need to do.

Thanks
--
Ferdinand Soethe


Re: How to use XHTML as input format

Posted by Ross Gardler <rg...@apache.org>.
Angeshwar Deepak wrote:
> Try renaming the .xhtml files to .ihtml and then place them in the 
> src/docs folder.

No *.ihtml is deprecated, the default behavior for HTML files is now to 
embed them.

Ross

Re: How to use XHTML as input format

Posted by Angeshwar Deepak <an...@yahoo.com>.
Try renaming the .xhtml files to .ihtml and then place them in the src/docs folder.
 
 
cheers,
Deepak.


Ferdinand Soethe <fe...@apache.org> wrote:









Ross Gardler wrote:
>> What is required if I want to use XHTML as an input format.
>> Just placing it in xdocs will not work, strangely enough if I do that
>> with

> It should:

> http://forrest.apache.org/docs_0_70/upgrading_07.html#raw

The way I read this is that I need not make any changes to a freshly
seeded Forrest in order to have HTML/XHTML-files places in xdocs
process as skinned documents, right!

> What is the name of your file, it should have the .html extension

The extension is .html and it is in xdocs. As mentioned before it does
get processed up to the http://localhost:8888/body-xhtml-test.html
step of the pipeline, after that the page content simply vanished.

--
Ferdinand Soethe


		
---------------------------------
 Start your day with Yahoo! - make it your home page 

Re: How to use XHTML as input format

Posted by Ferdinand Soethe <fe...@apache.org>.

 






Ross Gardler wrote:
>> What is required if I want to use XHTML as an input format.
>> Just placing it in xdocs will not work, strangely enough if I do that
>> with

> It should:

> http://forrest.apache.org/docs_0_70/upgrading_07.html#raw

The way I read this is that I need not make any changes to a freshly
seeded Forrest in order to have HTML/XHTML-files places in xdocs
process as skinned documents, right!

> What is the name of your file, it should have the .html extension

The extension is .html and it is in xdocs. As mentioned before it does
get processed up to the http://localhost:8888/body-xhtml-test.html
step of the pipeline, after that the page content simply vanished.

--
Ferdinand Soethe


Re: How to use XHTML as input format

Posted by Ross Gardler <rg...@apache.org>.
Ferdinand Soethe wrote:
> 
> 
> What is required if I want to use XHTML as an input format.
> Just placing it in xdocs will not work, strangely enough if I do that
> with

It should:

http://forrest.apache.org/docs_0_70/upgrading_07.html#raw

What is the name of your file, it should have the .html extension

Ross


Re: How to use XHTML as input format

Posted by Ferdinand Soethe <fe...@apache.org>.

David Crossley wrote:

> Actually, this discussion would be useful as an FAQ,
> to explain the power of this source type match method.

Thanks for explaining.

Will try and find the bug in HTML-processing first though.

--
Ferdinand Soethe


Re: How to use XHTML as input format

Posted by David Crossley <cr...@apache.org>.
Ferdinand Soethe wrote:
> 
> What is required if I want to use XHTML as an input format.
> Just placing it in xdocs will not work, strangely enough if I do that
> with
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml">
>   <head>
>     <title>Testdocument XHTML</title>
>   </head>
>   <body>
>     <h1>Testchapter</h1>
>     <p>This is a test to see what attributes are passed through when processing xhtml.</p>
>     <table border="1" width="30%">
>       <tr>
>         <td>Zell 1-1</td>
>         <td>Zell 1-2</td>
>         <td>Zell 1-3</td>
>       </tr>
>       <tr>
>         <td>Zell 2-1</td>
>         <td>Zell 2-2</td>
>         <td>Zell 2-3</td>
>       </tr>
>       
>     </table>
>     
>   </body>
> </html>
> 
> I get a Forrest page with empty content area while calling the pipeline
> body-... will produce a clean looking document.
> 
> Do I need to add a new mapping to the source pipeline, what else would
> I need to do.

Yes, i think that all you need to do is add a new entry
to the sitemap for that source type. Either to your
project sitemap or to main/webapp/forrest.xmap in the core.

SourceTypeAction (content aware pipelines)
http://forrest.apache.org/docs/cap.html

You ask what else. Well you need to construct pipelines
to get your content to match our internal format.
Perhaps re-use the html2xdoc transformer that is used for
handling the html sources.

Yes, the quicker we can go to xhtml2 as our internal format
the better. Then the sitemap would only need to do map:read.

Actually, this discussion would be useful as an FAQ,
to explain the power of this source type match method.

-David