You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Miroslav Mocek <mm...@seznam.cz> on 2005/10/06 16:37:49 UTC
using HTML as input
Hello,
I'm trying to process my HTML file through forrest. (HTML --(forrest)-->
internal xml document --(forrest)-->whole site including menus and
skinned HTML)
I've configured sitemap.xmap like this:
<map:pipeline>
<map:match pattern="my/*.xml">
<map:generate src="{project:content.xdocs}{0}.html" type="html"/>
<map:transform src="{forrest:stylesheets}/html2document.xsl"/>
<map:transform type="idgen"/>
<map:serialize type="xml-document"/>
</map:match>
</map:pipeline>
in browser:
localhost:8888/my/test-page.html
I get this error:
content\xdocs\my\test-page.navigation.xml.html (The system cannot find the file specified)
Why it is asking for this?
Thanks Mirek
Re: using HTML as input
Posted by Ross Gardler <rg...@apache.org>.
Miroslav Mocek wrote:
> Great! According to the links, I have an easy solution.
> The only thing that needs to be done, to get HTML in UTF-8 encoding
> processed right is:
> edit <forrest>/main/webapp/WEB-INF/jtidy.properties
> replace
> char-encoding=latin1
> with
> char-encoding=utf8
>
> see http://tidy.sourceforge.net/docs/quickref.html#EncodingHeader for
> additional info
>
> There is no need to play with java's file.encoding.
> Maybe this solves FOR-668?
Thanks for looking into this. Please add a note to that issue so that
others who hit it can find your solution.
Whether we should change it in the default settings or not needs to be
considered, but we should certainly create a FAQ entry about this.
Ross
Re: using HTML as input
Posted by Sjur Moshagen <sj...@mac.com>.
Den 7. okt. 2005 kl. 12.22 skrev Miroslav Mocek:
> Great! According to the links, I have an easy solution.
> The only thing that needs to be done, to get HTML in UTF-8 encoding
> processed right is:
> edit <forrest>/main/webapp/WEB-INF/jtidy.properties
> replace
> char-encoding=latin1
> with
> char-encoding=utf8
>
> see http://tidy.sourceforge.net/docs/quickref.html#EncodingHeader
> for additional info
>
> There is no need to play with java's file.encoding.
> Maybe this solves FOR-668?
>
>
>
Excellent! I hadn't found that setting - it does really solve the
immediate problem, as far as I can see from a short test.
I don't think it is a fix to 668 though, as one has to fiddle with
the forrest installation. A real fix would be to provide a way to
override the setting in
$FORRESTHOME/main/webapp/WEB-INF/jtidy.properties
either in forrest.properties, or in the sitemap, as a parameter to
the HTMLGenerator.
But this is a nice step forward - thanks! :-)
Best regards,
Sjur
Re: using HTML as input
Posted by Miroslav Mocek <mm...@seznam.cz>.
Great! According to the links, I have an easy solution.
The only thing that needs to be done, to get HTML in UTF-8 encoding
processed right is:
edit <forrest>/main/webapp/WEB-INF/jtidy.properties
replace
char-encoding=latin1
with
char-encoding=utf8
see http://tidy.sourceforge.net/docs/quickref.html#EncodingHeader for
additional info
There is no need to play with java's file.encoding.
Maybe this solves FOR-668?
Mirek
Ross Gardler wrote:
> Miroslav Mocek wrote:
>
>> Ok.
>> I added line <echo message="${file.encoding}"/> into forrest.build.xml.
>> I started
>> forrest run -Dfile.encoding=UTF-8
>> in console is written:
>> init:
>> UTF-8
>>
>> So I assume, the java default encoding is now UTF-8. (it was other,
>> previously)
>> Still getting the same wierd characters. (THE SAME)
>>
>> my env: java1.5, forrest0.8-dev,windows.
>>
>> Ok, I need solution. I've looked at sources, haven't found html
>> reader you are reporting to. Where is it, please?
>
>
> http://cocoon.apache.org/2.1/userdocs/generators/html-generator.html
>
> http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/HTMLGenerator.html
>
>
> Ross
>
Re: using HTML as input
Posted by Ross Gardler <rg...@apache.org>.
Miroslav Mocek wrote:
> Ok.
> I added line <echo message="${file.encoding}"/> into forrest.build.xml.
> I started
> forrest run -Dfile.encoding=UTF-8
> in console is written:
> init:
> UTF-8
>
> So I assume, the java default encoding is now UTF-8. (it was other,
> previously)
> Still getting the same wierd characters. (THE SAME)
>
> my env: java1.5, forrest0.8-dev,windows.
>
> Ok, I need solution. I've looked at sources, haven't found html reader
> you are reporting to. Where is it, please?
http://cocoon.apache.org/2.1/userdocs/generators/html-generator.html
http://cocoon.apache.org/2.1/apidocs/org/apache/cocoon/generation/HTMLGenerator.html
Ross
Re: using HTML as input
Posted by Miroslav Mocek <mm...@seznam.cz>.
Ok.
I added line <echo message="${file.encoding}"/> into forrest.build.xml.
I started
forrest run -Dfile.encoding=UTF-8
in console is written:
init:
UTF-8
So I assume, the java default encoding is now UTF-8. (it was other,
previously)
Still getting the same wierd characters. (THE SAME)
my env: java1.5, forrest0.8-dev,windows.
Ok, I need solution. I've looked at sources, haven't found html reader
you are reporting to. Where is it, please?
Mirek
Sjur Moshagen wrote:
> This is a known issue, see:
>
> http://issues.apache.org/jira/browse/FOR-668
>
> Sjur
>
> Den 6. okt. 2005 kl. 19.13 skrev Miroslav Mocek:
>
>> But I have problem with encoding.
>> The HTML file is in UTF-8, specified also in meta.
>> But the resulting page is displayed wierdly.
>>
>> Is there some configuration?
>> Mirek
>>
>> Ross Gardler wrote:
>>
>>
>>> Miroslav Mocek wrote:
>>>
>>>
>>>> Hello,
>>>> I'm trying to process my HTML file through forrest. (HTML --
>>>> (forrest)--> internal xml document --(forrest)-->whole site
>>>> including menus and skinned HTML)
>>>>
>>>
>>>
>>> You don't need to do anything special. Just put you HTML file in
>>> the xdocs directory alongside the XDoc documents and Forrest will/
>>> should) do the rest.
>>>
>>> Ross
>>>
>>>
>>
>>
>
>
Re: using HTML as input
Posted by Sjur Moshagen <sj...@mac.com>.
This is a known issue, see:
http://issues.apache.org/jira/browse/FOR-668
Sjur
Den 6. okt. 2005 kl. 19.13 skrev Miroslav Mocek:
> But I have problem with encoding.
> The HTML file is in UTF-8, specified also in meta.
> But the resulting page is displayed wierdly.
>
> Is there some configuration?
> Mirek
>
> Ross Gardler wrote:
>
>
>> Miroslav Mocek wrote:
>>
>>
>>> Hello,
>>> I'm trying to process my HTML file through forrest. (HTML --
>>> (forrest)--> internal xml document --(forrest)-->whole site
>>> including menus and skinned HTML)
>>>
>>
>>
>> You don't need to do anything special. Just put you HTML file in
>> the xdocs directory alongside the XDoc documents and Forrest will/
>> should) do the rest.
>>
>> Ross
>>
>>
>
>
Re: using HTML as input
Posted by Miroslav Mocek <mm...@seznam.cz>.
But I have problem with encoding.
The HTML file is in UTF-8, specified also in meta.
But the resulting page is displayed wierdly.
Is there some configuration?
Mirek
Ross Gardler wrote:
> Miroslav Mocek wrote:
>
>> Hello,
>> I'm trying to process my HTML file through forrest. (HTML
>> --(forrest)--> internal xml document --(forrest)-->whole site
>> including menus and skinned HTML)
>
>
> You don't need to do anything special. Just put you HTML file in the
> xdocs directory alongside the XDoc documents and Forrest will/should)
> do the rest.
>
> Ross
>
Re: using HTML as input
Posted by Ferdinand Soethe <fe...@apache.org>.
Miroslav Mocek wrote:
> strange. when I was first trying to do that (without configuration), it
> showed only empty page (menus and all, but no content). now it's working.
I've had that problem and the self-healing as well.
Anybody with ideas what is happening there.
--
Ferdinand Soethe
Re: using HTML as input
Posted by Miroslav Mocek <mm...@seznam.cz>.
strange. when I was first trying to do that (without configuration), it
showed only empty page (menus and all, but no content). now it's working.
Thanks
Mirek
Ross Gardler wrote:
> Miroslav Mocek wrote:
>
>> Hello,
>> I'm trying to process my HTML file through forrest. (HTML
>> --(forrest)--> internal xml document --(forrest)-->whole site
>> including menus and skinned HTML)
>
>
> You don't need to do anything special. Just put you HTML file in the
> xdocs directory alongside the XDoc documents and Forrest will/should)
> do the rest.
>
> Ross
>
Re: using HTML as input
Posted by Ross Gardler <rg...@apache.org>.
Miroslav Mocek wrote:
> Hello,
> I'm trying to process my HTML file through forrest. (HTML --(forrest)-->
> internal xml document --(forrest)-->whole site including menus and
> skinned HTML)
You don't need to do anything special. Just put you HTML file in the
xdocs directory alongside the XDoc documents and Forrest will/should) do
the rest.
Ross