forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: Link to CSS howto-structurer-dsl.html
Date Fri, 16 Dec 2005 13:59:44 GMT
El vie, 16-12-2005 a las 14:36 +0100, Cyriaque Dupoirieux escribió:
> >BTW IMO we have to rethink the default url prefixing/rewriting!
> >Since css support is based now on contracts they can be as well
> >requested with *.fv files (like I have shown in the xhtml2 & dispatcher
> >thread). 
> >
> >...but since we rewrite e.g.
> ><forrest:css url="common.css"/>
> >to 
> ><DEFANGED_link href="../themes/common.css" rel="stylesheet" title="common.css"
> >type="text/css" />
> >it is not possible to refer to a css fv that may resist in the same root
> >like the request.
> >
> >e.g. the index-foo.fv has a type="css" meaning there is a match for
> >index-foo.css, but we would not be able to match this since we rewrite
> >it to "../themes/index-foo.fv". IMO we need an attribute to prevent this
> >rewriting. like:
> >
> ><forrest:contract name="branding-css-links">
> > <forrest:property name="branding-css-links-input">
> >  <css url="index-foo.css" rewrite="false"/>
> > </forrest:property>
> ></forrest:contract>
> >
> >Which will have to be outputted like:
> ><DEFANGED_link href="index-foo.css" rel="stylesheet" title="common.css"
> >type="text/css" />
> >
> >After "forrest site" you would find
> >root
> >|--index-foo.html
> >`--index-foo.css
> >
> >wdyt?
> >  
> >
> Can't we add a fallback to the current directory ? My previous 
> description should become :
> 	*url* attribute indicates the name of the css file, the dispatcher
>       searches for this file in the following order :
>           o Does the css file exists in the *current *directory - if yes, use this one.

That is actually the problem, how do you determine this? 

Let me explain the problem a wee bit. Since we will generate the css
from a *.fv file we not only have to test the existence of this file
(*.fv) but as well that there is a type="css" in it. That means a
"simple" locationmap lookup will not work this time, since we cannot
assume that there is a type="css" part in the structurer, or?

...hmm that made me think...

Anyway if so then we have to use this file if not we have to ...

>         * Does the css file exists in the following directory - if
>             yes, use this one :
> $PROJECT_HOME/src/documentation/resources/themes/yourtheme/css/layout.screen.css

Actually I would like to add here as well a fallback before (testing
whether there is a *.fv which determine the css) meaning in your xdocs
structure you can define:

which contains all the css contracts you are going to use. That would be
before matching to the *static* css. 

In all resource/.../css dirs there only should be
a) css contracts
b) static css
and *no* *.fv

>           o Else, does the css file exists in the following directory -
>             if yes, use this one :
>         $FORREST_HOME/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/yourtheme/css/layout.screen.css
>           o Else, does the css file exists in the following directory -
>             if yes, use this one :
>         $FORREST_HOME/whiteboard/plugins/org.apache.forrest.plugin.output.themer/resources/themes/common/css/layout.screen.css
> Cyriaque,

The rest I agree.

> >salu2
> >  
> >

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)

View raw message