You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@forrest.apache.org by Thomas Emmel <em...@abaqus.de> on 2006/11/03 16:44:02 UTC

newbie: how to use own css-files and attributes within html-source

Hi,

I started to use forrest two weeks ago and I managed to set it up to
do many of the tasks I need to do (write a huge technical documentation)
together with a colleague of mine.

However since most of our source documents will be or are native html or
xhtml1 we use Nvu to edit and finish these documents and we use our own
css-stylesheet.

The problem with forrest so far is, that it will clean our definitions
when preparing
a skinned page (which is what we need).
So unless there is no way to put e.g. "<span
class="Button">OK</span>-button"
inside the html-code without removal through forrest it would be useless
in the end...

In addition: I tried a lot of methods to add my css-file to the
generated pages.
I tried each and every method described (faq, mailing-list) without
success and
now I think the point is the html-format which will not be scanned
correctly
or whatever.
Is this true and are we forced to write xml?
However writing xml requires a good editor to avoid going to much into
detail in xml...

A last question: I am willing to learn in this area but I need a
starting point.
It seems that the file html-to-document.xsl plays a big role in that
case.
How can I test what is done here?
Is there an intepreter running (I am using linux) or who is doing the
translation since the xsl-file seems to be just the receipt how to do
the word. I am looking for the cook.

I tested with xhtml(1) too but this just returns an empty page after
skinning.

Any help is appreciated

Thanks

Thomas
-- 
Thomas Emmel <em...@abaqus.de>


versions of docs

Posted by David Crossley <cr...@apache.org>.
Thomas Emmel wrote:
> Chris Grobmeier wrote:
> > Hello Thomas,
> > 
> > i think you are using Version 0.7, right?
> 
> No, 0.8dev

Then make sure that you either use your local copy
of the docs: 'cd site-author; forrest run'
or use the dev docs on the website:
http://forrest.apache.org/docs/dev/ which will re-direct.

There is often not much diffference, but the -dev docs
are the only ones that are ever updated.

-David

Re: newbie: how to use own css-files and attributes within html-source

Posted by Thomas Emmel <em...@abaqus.de>.
Hi Chris.

On Sat, 2006-11-04 at 11:29 +0100, C. Grobmeier wrote:
> Hello Thomas,
> 
> i think you are using Version 0.7, right?

No, 0.8dev

> 
> > However since most of our source documents will be or are native html or
> > xhtml1 we use Nvu to edit and finish these documents and we use our own
> > css-stylesheet.
> 
> See this:
> http://forrest.apache.org/docs_0_70/your-project.html#skins

seems to be promising!
> 
> Please open then skinconf.xml in your editor. Pay attention to the 
> extra-css section. In the documentation in this file has been written:
> 
> "extra-css - here you can define custom css-elements that are
>      A) overriding the fallback elements or
>      B) adding the css definition from new elements that you may have
>         used in your documentation."
> 
> In Addition, you maybe like this link:
> http://forrest.apache.org/docs_0_70/howto/howto-editcss.html

Never used that plugin but I will try. However the Howto mentioned at
the bottom of the page is nowhere.

> > Is this true and are we forced to write xml?
> 
> You will find this link helpful (make: forrest run before):
> http://forrest.apache.org/dtdx/document-v20.dtdx.html

Fine, I will study that if I got more time...

Currently I am using the extra-css ( not very straight forward) and
modify html-to-document.xml (arrg, changing the sources). But I will
follow
your links and see what happens.

Thanks a lot

Thomas
> 
> Depending on what document format you are using, you can use elements 
> from this dtd. Beware, i don't know if v20 is available for forrest 0.7.
> 
> > However writing xml requires a good editor to avoid going to much into
> > detail in xml...
> 
> I have only basics of XML knowledge but didn't catch up any problems.
> 
> The other questions are for the experts ;-)
> Regards,
> Chris
> 
> > A last question: I am willing to learn in this area but I need a
> > starting point.
> > It seems that the file html-to-document.xsl plays a big role in that
> > case.
> > How can I test what is done here?
> > Is there an intepreter running (I am using linux) or who is doing the
> > translation since the xsl-file seems to be just the receipt how to do
> > the word. I am looking for the cook.
> > 
> > I tested with xhtml(1) too but this just returns an empty page after
> > skinning.
> > 
> > Any help is appreciated
> > 
> > Thanks
> > 
> > Thomas

-- 
Thomas Emmel <em...@abaqus.de>


Re: newbie: how to use own css-files and attributes within html-source

Posted by "C. Grobmeier" <gr...@possessed.de>.
Hello Thomas,

i think you are using Version 0.7, right?

> However since most of our source documents will be or are native html or
> xhtml1 we use Nvu to edit and finish these documents and we use our own
> css-stylesheet.

See this:
http://forrest.apache.org/docs_0_70/your-project.html#skins

Please open then skinconf.xml in your editor. Pay attention to the 
extra-css section. In the documentation in this file has been written:

"extra-css - here you can define custom css-elements that are
     A) overriding the fallback elements or
     B) adding the css definition from new elements that you may have
        used in your documentation."

In Addition, you maybe like this link:
http://forrest.apache.org/docs_0_70/howto/howto-editcss.html

> Is this true and are we forced to write xml?

You will find this link helpful (make: forrest run before):
http://forrest.apache.org/dtdx/document-v20.dtdx.html

Depending on what document format you are using, you can use elements 
from this dtd. Beware, i don't know if v20 is available for forrest 0.7.

> However writing xml requires a good editor to avoid going to much into
> detail in xml...

I have only basics of XML knowledge but didn't catch up any problems.

The other questions are for the experts ;-)
Regards,
Chris

> A last question: I am willing to learn in this area but I need a
> starting point.
> It seems that the file html-to-document.xsl plays a big role in that
> case.
> How can I test what is done here?
> Is there an intepreter running (I am using linux) or who is doing the
> translation since the xsl-file seems to be just the receipt how to do
> the word. I am looking for the cook.
> 
> I tested with xhtml(1) too but this just returns an empty page after
> skinning.
> 
> Any help is appreciated
> 
> Thanks
> 
> Thomas


Re: newbie: how to use own css-files and attributes within html-source

Posted by David Crossley <cr...@apache.org>.
Thomas Emmel wrote:
> 
> I started to use forrest two weeks ago and I managed to set it up to
> do many of the tasks I need to do (write a huge technical documentation)
> together with a colleague of mine.
> 
> However since most of our source documents will be or are native html or
> xhtml1 we use Nvu to edit and finish these documents and we use our own
> css-stylesheet.
> 
> The problem with forrest so far is, that it will clean our definitions
> when preparing
> a skinned page (which is what we need).
> So unless there is no way to put e.g. "<span
> class="Button">OK</span>-button"
> inside the html-code without removal through forrest it would be useless
> in the end...

That is the correct approach. Any element can have a class attribute.

> In addition: I tried a lot of methods to add my css-file to the
> generated pages.
> I tried each and every method described (faq, mailing-list) without
> success and

See this FAQ.
 How to include additional Javascript and CSS files?
 http://forrest.apache.org/faq.html#javascript

It tells you where to place the CSS file if you are using
skins. You can verify this in 'forrest run' mode with
localhost:8888/skin/myfile.css

The part that i cannot answer is how to declare the
<head><link> element to include your own CSS. One quick
workaround might be to add it to html-to-document.xsl

As others have mentioned, the new Dispatcher gives much
more CSS flexibility.

> now I think the point is the html-format which will not be scanned
> correctly
> or whatever.
> Is this true and are we forced to write xml?
> However writing xml requires a good editor to avoid going to much into
> detail in xml...
> 
> A last question: I am willing to learn in this area but I need a
> starting point.
> It seems that the file html-to-document.xsl plays a big role in that
> case.
> How can I test what is done here?
> Is there an intepreter running (I am using linux) or who is doing the
> translation since the xsl-file seems to be just the receipt how to do
> the word. I am looking for the cook.

Apache Cocoon does the work behind-the-scenes.
Our documentation explains that.

-David

Re: newbie: how to use own css-files and attributes within html-source

Posted by Tim Williams <wi...@gmail.com>.
On 11/6/06, Thomas Emmel <em...@abaqus.de> wrote:
> Hi Gav...
>
> thanks for your answer. Yes I made the step to 0.8dev the second day I
> used forrest
> since I have seen some limitations regarding pictures and links in
> generated pdf.
>
> I tested xhtml but that giving me just an empty page in the end...
>
> To the dispatcher: I have read only a bit about the dispatcher (mainly
> that this is a new technique in 0.8...)
> What is the point on it and how to start using it?

Here's some info:
http://forrest.apache.org/docs_0_80/status-themes.html

> My current work-around is to use the extra-css-section in skinconf.xml
> and
> I added some small modifications to html-to-document.xsl (after learning
> the
> meaning of those rules..).
>
> However, it would be nice if there would be a way to copy a complete
> css-file
> from the sources instead of puting that to skinconf.xml and I am missing
> a
> realy simple example to write an own filter for my source-files (e.g.
> how to use
> my html-to-document.xsl instead of the global one...).
> Maybe this is in the documenation and I missed it.

You've tried what's described in the FAQ[1] and how did it not work?
If this is broken in 0.8-dev, then we need to know.

--tim

[1] - http://forrest.apache.org/docs_0_80/faq.html#javascript

RE: newbie: how to use own css-files and attributes within html-source

Posted by Thomas Emmel <em...@abaqus.de>.
Hi Gav...

thanks for your answer. Yes I made the step to 0.8dev the second day I
used forrest
since I have seen some limitations regarding pictures and links in
generated pdf.

I tested xhtml but that giving me just an empty page in the end...

To the dispatcher: I have read only a bit about the dispatcher (mainly
that this is a new technique in 0.8...)
What is the point on it and how to start using it?

My current work-around is to use the extra-css-section in skinconf.xml
and
I added some small modifications to html-to-document.xsl (after learning
the
meaning of those rules..).

However, it would be nice if there would be a way to copy a complete
css-file
from the sources instead of puting that to skinconf.xml and I am missing
a
realy simple example to write an own filter for my source-files (e.g.
how to use
my html-to-document.xsl instead of the global one...).
Maybe this is in the documenation and I missed it.

Thanks

Thomas


On Sat, 2006-11-04 at 20:05 +0800, Gav.... wrote:
> Hi Thomas,
> 
> 
> > -----Original Message-----
> > From: Thomas Emmel [mailto:emmel@abaqus.de]
> > Sent: Friday, 3 November 2006 11:44 PM
> > To: user@forrest.apache.org
> > Subject: newbie: how to use own css-files and attributes within html-
> > source
> > 
> > Hi,
> > 
> > I started to use forrest two weeks ago and I managed to set it up to
> > do many of the tasks I need to do (write a huge technical documentation)
> > together with a colleague of mine.
> > 
> > However since most of our source documents will be or are native html or
> > xhtml1 we use Nvu to edit and finish these documents and we use our own
> > css-stylesheet.
> > 
> > The problem with forrest so far is, that it will clean our definitions
> > when preparing
> > a skinned page (which is what we need).
> > So unless there is no way to put e.g. "<span
> > class="Button">OK</span>-button"
> > inside the html-code without removal through forrest it would be useless
> > in the end...
> > 
> > In addition: I tried a lot of methods to add my css-file to the
> > generated pages.
> > I tried each and every method described (faq, mailing-list) without
> > success and
> > now I think the point is the html-format which will not be scanned
> > correctly
> > or whatever.
> > Is this true and are we forced to write xml?
> > However writing xml requires a good editor to avoid going to much into
> > detail in xml...
> 
> Xdoc is the current native input format used by forrest. It can 
> However handle multiple inputs and outputs, xdoc being just one.
> 
> The forrest document type is not really all that different from
> XHTML, you write in xhtml, I don't think it a difficult step to
> Write in xdoc xml. That said, the point I am making is that 
> Forrest are making a step towards accepting xhtml2 as a native
> Input. This will not be in the next release however and so I 
> Wouldn't wait on it, just fyi. 
> 
> > 
> > A last question: I am willing to learn in this area but I need a
> > starting point.
> > It seems that the file html-to-document.xsl plays a big role in that
> > case.
> > How can I test what is done here?
> > Is there an intepreter running (I am using linux) or who is doing the
> > translation since the xsl-file seems to be just the receipt how to do
> > the word. I am looking for the cook.
> > 
> > I tested with xhtml(1) too but this just returns an empty page after
> > skinning.
> > 
> > Any help is appreciated
> 
> To be honest, although Forrest v 0.7 is the current release, the 0.8 dev
> Version is not far away, and if you've been using it only two weeks, I
> Really would consider strongly using 0.8-dev, it is stable , just can
> Not officially be called that yet as there are of course still a few
> Things to iron out before its release.
> 
> In the 0.8-dev version, there is the dispatcher, will make your html inputs
> And stylesheets so much easier to add and configure, along with the 
> Locationmap enhancements. Xhtml as an input has been started here, but is
> Still in early development - due to browser and other program lack of
> support f0or xhtml2, it is currently being transformed back to html
> Anyway, but when they catch up, this step will I guess be ommited.
> 
> Gav...
> 
> > 
> > Thanks
> > 
> > Thomas
> > --
> > Thomas Emmel <em...@abaqus.de>
> > 
> > 
> > 
> > --
> > No virus found in this incoming message.
> > Checked by AVG Free Edition.
> > Version: 7.1.409 / Virus Database: 268.13.24/514 - Release Date: 11/2/2006
> 
> 
-- 
Thomas Emmel 
ABAQUS Deutschland GmbH
Theaterstr. 28-32
D-52062 Aachen

Tel.:   +49 241 474010
Fax:    +49 241 4090963
E-Mail: emmel@abaqus.de
URL:    http://www.abaqus.de
My ABAQUS: http://abaqus.custhelp.com

14.-17.11. Messe "SWISStech"; Basel
 http://www.swisstech2006.com/
29.11-02.12. Messe "EUROMOLD";
Frankfurt/Main
 http://www.euromold.com/
05.-06.12. NAFEMS Seminar
"Materialmodellierung"; Niedernhausen
 http://www.nafems.de


RE: newbie: how to use own css-files and attributes within html-source

Posted by "Gav...." <br...@brightontown.com.au>.
Hi Thomas,


> -----Original Message-----
> From: Thomas Emmel [mailto:emmel@abaqus.de]
> Sent: Friday, 3 November 2006 11:44 PM
> To: user@forrest.apache.org
> Subject: newbie: how to use own css-files and attributes within html-
> source
> 
> Hi,
> 
> I started to use forrest two weeks ago and I managed to set it up to
> do many of the tasks I need to do (write a huge technical documentation)
> together with a colleague of mine.
> 
> However since most of our source documents will be or are native html or
> xhtml1 we use Nvu to edit and finish these documents and we use our own
> css-stylesheet.
> 
> The problem with forrest so far is, that it will clean our definitions
> when preparing
> a skinned page (which is what we need).
> So unless there is no way to put e.g. "<span
> class="Button">OK</span>-button"
> inside the html-code without removal through forrest it would be useless
> in the end...
> 
> In addition: I tried a lot of methods to add my css-file to the
> generated pages.
> I tried each and every method described (faq, mailing-list) without
> success and
> now I think the point is the html-format which will not be scanned
> correctly
> or whatever.
> Is this true and are we forced to write xml?
> However writing xml requires a good editor to avoid going to much into
> detail in xml...

Xdoc is the current native input format used by forrest. It can 
However handle multiple inputs and outputs, xdoc being just one.

The forrest document type is not really all that different from
XHTML, you write in xhtml, I don't think it a difficult step to
Write in xdoc xml. That said, the point I am making is that 
Forrest are making a step towards accepting xhtml2 as a native
Input. This will not be in the next release however and so I 
Wouldn't wait on it, just fyi. 

> 
> A last question: I am willing to learn in this area but I need a
> starting point.
> It seems that the file html-to-document.xsl plays a big role in that
> case.
> How can I test what is done here?
> Is there an intepreter running (I am using linux) or who is doing the
> translation since the xsl-file seems to be just the receipt how to do
> the word. I am looking for the cook.
> 
> I tested with xhtml(1) too but this just returns an empty page after
> skinning.
> 
> Any help is appreciated

To be honest, although Forrest v 0.7 is the current release, the 0.8 dev
Version is not far away, and if you've been using it only two weeks, I
Really would consider strongly using 0.8-dev, it is stable , just can
Not officially be called that yet as there are of course still a few
Things to iron out before its release.

In the 0.8-dev version, there is the dispatcher, will make your html inputs
And stylesheets so much easier to add and configure, along with the 
Locationmap enhancements. Xhtml as an input has been started here, but is
Still in early development - due to browser and other program lack of
support f0or xhtml2, it is currently being transformed back to html
Anyway, but when they catch up, this step will I guess be ommited.

Gav...

> 
> Thanks
> 
> Thomas
> --
> Thomas Emmel <em...@abaqus.de>
> 
> 
> 
> --
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.409 / Virus Database: 268.13.24/514 - Release Date: 11/2/2006