You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Borut Bolčina <bo...@najdi.si> on 2005/09/13 10:42:01 UTC
Including HTML
Hello,
I am trying to include several auto generated HTML files with embedded
CSS styles into Forrest. I have exhausted my try-repeat cycle. Mind that
changing this HTML is not an option.
First I tried to
<map:pipelines>
<map:pipeline>
<map:match pattern="news/**.html">
<map:select type="exists">
<map:when test="{project:content}{1}.html">
<map:read src="{project:content}{1}.html"
mime-type="text/html"/>
</map:when>
</map:select>
</map:match>
...
so that Forrest would leave anything in the news directory with html
extension as is. My news directory is located at
%SEED_HOME%\src\documentation\content\xdocs\interseek\sheme\news
It does not work, as HTML is rendered differently - corrupted. Next I
tried to add those external HTML file's embedded CSS to skinconf.xml
like this:
.textElement { font-family: Courier New; font-size: 9pt; color:
#800000; }
.textAttr { font-family: Courier New; font-size: 9pt; color: #FF0000; }
[more elements follow]
Nothing happened. Next I tried to load the document with class="fork"
and class="jump". Again nothing. I did stop the server in between the tries.
The best would be if this external HTML could be displayed in the main
area with its own added styles. How can I do this, if at all possible?
Re: Including HTML
Posted by Ross Gardler <rg...@apache.org>.
Borut Bolčina wrote:
> Hello,
>
> I am trying to include several auto generated HTML files with embedded
> CSS styles into Forrest. I have exhausted my try-repeat cycle. Mind that
> changing this HTML is not an option.
>
> First I tried to
>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="news/**.html">
> <map:select type="exists">
> <map:when test="{project:content}{1}.html">
> <map:read src="{project:content}{1}.html"
> mime-type="text/html"/>
> </map:when>
> </map:select>
> </map:match>
> ...
>
> so that Forrest would leave anything in the news directory with html
> extension as is. My news directory is located at
>
> %SEED_HOME%\src\documentation\content\xdocs\interseek\sheme\news
Do the following:
mkdir seed
cd seed
forrest fresh-site
forrest
http://localhost:8888/samples/linking.html#Serving+%28X%29HTML+content+without+Skinning
You will see a more complete description (and an example) of how to do
it there.
Ross
Re: Including HTML
Posted by Ferdinand Soethe <fe...@apache.org>.
Ross Gardler wrote:
> If you want skinned content you should be aware of this known issue:
> http://issues.apache.org/jira/browse/FOR-394
If you are using 0.7 or before skinning will remove or change a
number of class and id attributes in the skinned file. So if your css
is not working first check to see if element in the skinned page
actually has the class or id-attributes you are expecting.
If not and the problem is IDs you could either uses the current
developer version of Forrest where most ID problems are fixed or ask
some developer to apply the fix to the id-problem that I mentioned a
few days ago in the dev forum (Rev 226492).
Or wait until I come back in two weeks and will apply that patch
myself.
--
Ferdinand Soethe
Re: Including HTML
Posted by Borut Bolčina <bo...@najdi.si>.
Just came back from a two hour session at the Cocoon site - it works
now. Geee. I'll go get a beer now.
-Borut
Ross Gardler wrote:
>>> <map:pipeline>
>>> <map:match pattern="news/**.html">
>>> <map:select type="exists">
>>> <map:when test="{project:content}{1}.html">
>>> <map:read src="{project:content}{1}.html"
>>> mime-type="text/html"/>
>>> </map:when>
>>> </map:select>
>>> </map:match>
>>
> <map:pipelines>
>
> This match will look for the content in content/news/**.html, you
> stated it was somewhere else in your original post (can't remember
> where), so your "{project:content}{1}.html" needs to be modified to
> point at the right location.
>
> I am assuming your request URL is something like
> "domain.org/news/myNews.html" if not then your match attribute is also
> incorrect.
>
> Ross
>
Re: Including HTML
Posted by Ross Gardler <rg...@apache.org>.
Borut Bolčina wrote:
> we must be running different versions. I am using 0.7.
No, as my subsequent mail said, I was being stupid and not reading my
own docs properly - I'm rushing too much today, sorry.
Hopefully my subsequent pointer to more docs helps.
> Section 2.17. How can I include HTML content that is not to be skinned
> by Forrest? at http://forrest.apache.org/docs_0_70/faq.html#rawTML has
> an error - this XML excerpt is not well-formed. (map:select closing
> element name expected)
Thanks, I'll fix that.
>
> Also, I don't think there is fresh-site target in 0.7.
Another symptom of my rushing I should have said "forrest seed".
> I guess the directory
> with HTML which must not be skinned and displayed in the main area must
> reside in some special location???
No, but it does need to be where you tell Forrest to look...
> Maybe the match pattern isn't right?
It is not...
>> <map:pipelines>
>> <map:pipeline>
>> <map:match pattern="news/**.html">
>> <map:select type="exists">
>> <map:when test="{project:content}{1}.html">
>> <map:read src="{project:content}{1}.html" mime-type="text/html"/>
>> </map:when>
>> </map:select>
>> </map:match>
This match will look for the content in content/news/**.html, you stated
it was somewhere else in your original post (can't remember where), so
your "{project:content}{1}.html" needs to be modified to point at the
right location.
I am assuming your request URL is something like
"domain.org/news/myNews.html" if not then your match attribute is also
incorrect.
Ross
Re: Including HTML
Posted by Borut Bolčina <bo...@najdi.si>.
Hello,
we must be running different versions. I am using 0.7.
Section 2.17. How can I include HTML content that is not to be skinned
by Forrest? at http://forrest.apache.org/docs_0_70/faq.html#rawTML has
an error - this XML excerpt is not well-formed. (map:select closing
element name expected)
File sitemap.xmap generated by "forrest seed" includes exactly what I
posted, except for the name of the directory (I used "news" instead of
"old_site"). So yes, it is nothing like what is in the FAQ entry. The
doc example (Section 2.17) has different test case
test="{project:content}{0}"
in comparison with my sitemap.xmap
test="{project:content}{1}.html"
I don't know (yet) what that means for my problem, but I am just stating
the difference.
Also, I don't think there is fresh-site target in 0.7. Now, I just tried
with the first test, but it does not work for me, I guess the directory
with HTML which must not be skinned and displayed in the main area must
reside in some special location??? Maybe the match pattern isn't right?
Regards,
Borut
On 13.9.2005 12:24, Ross Gardler wrote:
> Borut Bolčina wrote:
>
>> Hi Ross,
>>
>> I thought I did the impression of reading the docs by including
>> exactly this section in my question you are pointing me at.
>
>
> You are mistaken. What you quoted in your mail was:
>
> <map:pipelines>
> <map:pipeline>
> <map:match pattern="news/**.html">
> <map:select type="exists">
> <map:when test="{project:content}{1}.html">
> <map:read src="{project:content}{1}.html" mime-type="text/html"/>
> </map:when>
> </map:select>
> </map:match>
>
> Which is nothing like what is in the FAQ entry I linked to:
>
> http://forrest.apache.org/docs_0_70/faq.html#rawTML
>
>> As I am new to Forrest, I guess skinning means chewing my HTML which
>> was supposed to be swallowed.
>
>
> Do you want it skinned or not, you still haven't made that clear. The
> above FAQ is to include *unskinned* docs. If you want it skinned then
> there is nothing special you need to do (see the example in a freshly
> seeded site).
>
> If you want skinned content you should be aware of this known issue:
>
> http://issues.apache.org/jira/browse/FOR-394
>
> Ross
>
> Ross
>
Re: Including HTML
Posted by Ross Gardler <rg...@apache.org>.
Ross Gardler wrote:
> Borut Bolčina wrote:
>
>> Hi Ross,
>>
>> I thought I did the impression of reading the docs by including
>> exactly this section in my question you are pointing me at.
>
>
> You are mistaken. What you quoted in your mail was:
Ooopps, sorry it is *me* that is mistaken. I'll respond again in a
minute with a more helpful reply, this is a quick one to prevent you
wasting time telling me I'm an idiot ;-)
Ross
Re: Including HTML
Posted by Ross Gardler <rg...@apache.org>.
Borut Bolčina wrote:
> Hi Ross,
>
> I thought I did the impression of reading the docs by including exactly
> this section in my question you are pointing me at.
You are mistaken. What you quoted in your mail was:
<map:pipelines>
<map:pipeline>
<map:match pattern="news/**.html">
<map:select type="exists">
<map:when test="{project:content}{1}.html">
<map:read src="{project:content}{1}.html"
mime-type="text/html"/>
</map:when>
</map:select>
</map:match>
Which is nothing like what is in the FAQ entry I linked to:
http://forrest.apache.org/docs_0_70/faq.html#rawTML
> As I am new to
> Forrest, I guess skinning means chewing my HTML which was supposed to be
> swallowed.
Do you want it skinned or not, you still haven't made that clear. The
above FAQ is to include *unskinned* docs. If you want it skinned then
there is nothing special you need to do (see the example in a freshly
seeded site).
If you want skinned content you should be aware of this known issue:
http://issues.apache.org/jira/browse/FOR-394
Ross
Ross
Re: Including HTML
Posted by Borut Bolčina <bo...@najdi.si>.
Hi Ross,
I thought I did the impression of reading the docs by including exactly
this section in my question you are pointing me at. As I am new to
Forrest, I guess skinning means chewing my HTML which was supposed to be
swallowed.
I'll try a couple of more cycles...
Regards,
Borut
On 13.9.2005 11:46, Ross Gardler wrote:
> You could try reading the documentation ;-)
>
> http://forrest.apache.org/docs_0_70/faq.html#rawTML
>
> Using the search box on our web site is a great help, try searching
> for "include html", hit number one is the above FAQ entry.
>
> I'm not sure if this solution will do what you want because you don't
> say whther you want the page skinned or not, but looking at the
> pipeline you tried you don't want skinnning, so the above should be
> ideal.
>
> Ross
>
Re: Including HTML
Posted by Ross Gardler <rg...@apache.org>.
Borut Bolčina wrote:
> I am trying to include several auto generated HTML files with embedded
> CSS styles into Forrest. I have exhausted my try-repeat cycle.
You could try reading the documentation ;-)
http://forrest.apache.org/docs_0_70/faq.html#rawTML
Using the search box on our web site is a great help, try searching for
"include html", hit number one is the above FAQ entry.
I'm not sure if this solution will do what you want because you don't
say whther you want the page skinned or not, but looking at the pipeline
you tried you don't want skinnning, so the above should be ideal.
Ross