You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by David Crossley <cr...@apache.org> on 2005/12/05 23:34:38 UTC

resolving mechanism for *.fv files (Was: Views)

Ross Gardler wrote:
> Diwaker Gupta wrote:
> >Paul Bolger wrote:
> >
> >>[views: .fv files] Is there a way to specify one .fv file for multiple
> >>input files, or does every page need an individual file?
> >
> >Yes. If you search through the archives, you'll find several emails from 
> >Thorsten covering the resolving mechanism. I believe its something like 
> >this (this is not authoritative, but indicative):
> >
> >o for pagename.html, first check if pagename.fv exists
> 
> if not, look for one in the directory of the source file with the same 
> name as the default *.fv (as defined in forrest.properties)
> 
> if not, look for themename.fv in the PROJECT_HOME/resources/themes directory
> 
> >o if not, look for themename.fv in the resources/themes directory
> 
> (in the themer plugin)
> 
> >o if not, use default.fv that ships with Forrest.

Someone should document that.

-David

Re: resolving mechanism for *.fv files (Was: Views)

Posted by David Crossley <cr...@apache.org>.
Paul Bolger wrote:
> > Edit the doc (retain existing whitespace
> > or your patch will be unreadable).
> 
> Just to clarify, do you mean I need to keep the odd, mid-sentence, linebreaks?

Yes. In general don't touch any existing formatting,
just add your new stuff.

We need to be able to see the exact differences to
the file.

If someone does want to fix up
messy formatting then that must be done in a separate
patch with no other changes.

Yes line breaks are important. Long multi-line
paragraphs are horrid because when someone changes
just one word then the diff will contain lots of extra.
Here is an example. To give a hint, i changed two capital Ps 
to lowercase.

---------------------------
[anziso]$ diff 1.txt 2.txt
1c1
< This is a long Paragraph all in one line. This is a long Paragraph all in one line. This is a long Paragraph all in one line. This is a long Paragraph all in one line. This is a long Paragraph all in one line. 
---
> This is a long paragraph all in one line. This is a long Paragraph all in one line. This is a long Paragraph all in one line. This is a long paragraph all in one line. This is a long Paragraph all in one line.
---------------------------

-David

Re: resolving mechanism for *.fv files (Was: Views)

Posted by Paul Bolger <pb...@gmail.com>.
> Edit the doc (retain existing whitespace
> or your patch will be unreadable).

Just to clarify, do you mean I need to keep the odd, mid-sentence, linebreaks?

Re: resolving mechanism for *.fv files (Was: Views)

Posted by David Crossley <cr...@apache.org>.
Paul Bolger wrote:
> I don't mind having a go, but I'm not sure where that doc is.

At the moment we have these docs. Not sure which doc
it should go in. You can decide. Don't worry too much
if it doesn't quite fit. Just add a new section, we can
move that section later if we decide to restructure the docs..

cd forrest-trunk/site-author/content/xdocs
 docs_0_80/howto/howto-structurer-install.html
 docs_0_80/howto/howto-structurer-dsl.html
 docs_0_80/howto/howto-structurer-contracts.html

> I gave
> it a try and yes, common.fv seems to work. I haven't checked the
> others yet, and won't write it up until I've tested it.
>
> Re. the SVN: I
> have it installed and it seems to work (I'm using the tortoise
> extensions).

Command-line svn is sufficient, but whatever.

> I'm more unclear about protocols, if I edit one of the
> Howtos how do I submit it? If I'm unsure about whether something is
> correct how do I pass it on for a second opinion?

Just do ...
cd docs_0_80/howto

Edit the doc (retain existing whitespace
or your patch will be unreadable).

View the changed doc with 'forrest run'.

svn diff > mypatch.txt

Then go to Jira and add a new Issue, attach the patch.
That enables anyone to apply it to their local system.
http://forrest.apache.org/issues.html

Look at the work that Addi did recently with the
tools/forrestbot.xml
She added <fixme> notes for bits that needed attention
or that she was unsure about. One of the committers
applied that patch and addressed some of the fixmes.
The other fixmes can be gradually addressed on the dev
mailing list.

Most times we will apply the patch and then talk about
fixing anything. 

Don't try to do too much in one go.

-David

> Ross Gardler wrote:
> > David Crossley wrote:
> > > Ross Gardler wrote:
> > >>Diwaker Gupta wrote:
> > >>>Paul Bolger wrote:
> > >>>
> > >>>>[views: .fv files] Is there a way to specify one .fv file for multiple
> > >>>>input files, or does every page need an individual file?
> > >>>
> > >>>Yes. If you search through the archives, you'll find several emails from
> > >>>Thorsten covering the resolving mechanism. I believe its something like
> > >>>this (this is not authoritative, but indicative):
> > >>>
> > >>>o for pagename.html, first check if pagename.fv exists
> > >>
> > >>if not, look for one in the directory of the source file with the same
> > >>name as the default *.fv (as defined in forrest.properties)
> > >>
> > >>if not, look for themename.fv in the PROJECT_HOME/resources/themes directory
> > >>
> > >>
> > >>>o if not, look for themename.fv in the resources/themes directory
> > >>
> > >>(in the themer plugin)
> > >>
> > >>>o if not, use default.fv that ships with Forrest.
> > >
> > > Someone should document that.
> >
> > It's documented in the structurer locationmap ;-)
> >
> > (just a hint for anyone who may have the time to work on such documentation)
> >
> > Ross

Re: resolving mechanism for *.fv files (Was: Views)

Posted by Thorsten Scherler <th...@apache.org>.
El mar, 06-12-2005 a las 12:04 +0930, Paul Bolger escribió:
> I don't mind having a go, but I'm not sure where that doc is. I gave
> it a try and yes, common.fv seems to work. I haven't checked the
> others yet, and won't write it up until I've tested it. 

Here is the important part from 
whiteboard/plugins/org.apache.forrest.plugin.internal.structurer/locationmap.xml:

<!-- File specific strucuturer templates have priority before default
ones. If no strucuturer template 
      can be found in the project, we use either the theme or the
default one of the themes plugin. -->
    <match pattern="resolve.structurer.**">
      <select type="exists">
        <!-- project-based file-based -->
        <location src="{project:content.xdocs}{1}{project:theme-ext}" />
        <!-- @src="" workaround for action bug in the locationmap! -->
        <act type="RecursiveDirectoryTraversalAction" src="">
          <parameter value="{1}" name="request"/>
          <parameter value="{project:theme}" name="projectFallback"/>
          <parameter value="{project:theme-ext}"
name="projectExtension"/>
          <parameter value="{project:content.xdocs}" name="projectDir"/>
          <!--  project-based theme-based = directory-based /
parent-directory based (recursively) -->
          <location src="{uri}" />
        </act>
        <!-- themes-dir: project-application-based theme-dir-based -->
        <location 

src="{lm:themer.project.dir}/{project:theme}{project:theme-ext}" 
          />
        <!-- themer: project-application-based theme-based -->
        <location 

src="{project:themer}/resources/themes/{project:theme}{project:theme-ext}" 
          />
        <!-- themes-dir: project-application-based default -->
        <location 

src="{lm:themer.project.dir}/{defaults:theme}{defaults:theme-ext}" 
          />
        <!-- themer: project-application-based default -->
        <location 

src="{project:themer}/resources/themes/{defaults:theme}{defaults:theme-ext}" 
          />
        <!-- themer: forrest-application-based theme-based -->
        <location 

src="{defaults:themer}/resources/themes/{project:theme}{project:theme-ext}" 
          />
        <!-- themer: forrest-application-based default -->
        <location 

src="{defaults:themer}/resources/themes/{defaults:theme}{defaults:theme-ext}" 
          />
      </select>
    </match>


salu2
-- 
thorsten

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


Re: resolving mechanism for *.fv files (Was: Views)

Posted by Paul Bolger <pb...@gmail.com>.
I don't mind having a go, but I'm not sure where that doc is. I gave
it a try and yes, common.fv seems to work. I haven't checked the
others yet, and won't write it up until I've tested it. Re. the SVN: I
have it installed and it seems to work (I'm using the tortoise
extensions). I'm more unclear about protocols, if I edit one of the
Howtos how do I submit it? If I'm unsure about whether something is
correct how do I pass it on for a second opinion?



On 12/6/05, Ross Gardler <rg...@apache.org> wrote:
> David Crossley wrote:
> > Ross Gardler wrote:
> >
> >>Diwaker Gupta wrote:
> >>
> >>>Paul Bolger wrote:
> >>>
> >>>
> >>>>[views: .fv files] Is there a way to specify one .fv file for multiple
> >>>>input files, or does every page need an individual file?
> >>>
> >>>Yes. If you search through the archives, you'll find several emails from
> >>>Thorsten covering the resolving mechanism. I believe its something like
> >>>this (this is not authoritative, but indicative):
> >>>
> >>>o for pagename.html, first check if pagename.fv exists
> >>
> >>if not, look for one in the directory of the source file with the same
> >>name as the default *.fv (as defined in forrest.properties)
> >>
> >>if not, look for themename.fv in the PROJECT_HOME/resources/themes directory
> >>
> >>
> >>>o if not, look for themename.fv in the resources/themes directory
> >>
> >>(in the themer plugin)
> >>
> >>
> >>>o if not, use default.fv that ships with Forrest.
> >
> >
> > Someone should document that.
>
> It's documented in the structurer locationmap ;-)
>
> (just a hint for anyone who may have the time to work on such documentation)
>
> Ross
>


--
Paul Bolger
19 Raggatt St
Alice Springs
NT 0870
08 8953 6780

Re: resolving mechanism for *.fv files (Was: Views)

Posted by Ross Gardler <rg...@apache.org>.
David Crossley wrote:
> Ross Gardler wrote:
> 
>>Diwaker Gupta wrote:
>>
>>>Paul Bolger wrote:
>>>
>>>
>>>>[views: .fv files] Is there a way to specify one .fv file for multiple
>>>>input files, or does every page need an individual file?
>>>
>>>Yes. If you search through the archives, you'll find several emails from 
>>>Thorsten covering the resolving mechanism. I believe its something like 
>>>this (this is not authoritative, but indicative):
>>>
>>>o for pagename.html, first check if pagename.fv exists
>>
>>if not, look for one in the directory of the source file with the same 
>>name as the default *.fv (as defined in forrest.properties)
>>
>>if not, look for themename.fv in the PROJECT_HOME/resources/themes directory
>>
>>
>>>o if not, look for themename.fv in the resources/themes directory
>>
>>(in the themer plugin)
>>
>>
>>>o if not, use default.fv that ships with Forrest.
> 
> 
> Someone should document that.

It's documented in the structurer locationmap ;-)

(just a hint for anyone who may have the time to work on such documentation)

Ross