forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject Re: Selective PDF
Date Fri, 19 Nov 2004 22:20:28 GMT


Ross Gardler wrote:
> Sean Wheller wrote:
> 
>> On Friday 19 November 2004 14:38, Ross Gardler wrote:
> 
> 
> <snip/>
> 
>>>> This way we don't have to update
>>>> each plugin and have control over all files in a single place.
>>>
>>>
>>> I don't follow this, why would having it in forrest.properties or
>>> skinconf.xml require an update to each plugin?
>>
>>
>>
>> Thinking POD plugin, etc.
>> Let's say a person wants PDF + POD + RTF. NOw you need to specify the 
>> inlcudes and excludes in three places. pdf-plugin, pod-plugin, 
>> rtf-plugin.
> 
> 
> No, its still only one place, skinconf.xml, three elements yes, but only 
> one file. Furthermore since the default behaviour is that the link is 
> included in most cases you will not need to do anything other than add 
> the plugin name to forrest.properties.

Further explanation of the above (this point made me read your docs, 
which I hadn't done before and I realised there was a mismatch between 
our ideas). You say in your docs:

"The choice of method may be either or both and is controlled by adding 
the following properties to the forrest.properties file of the plugin."

The file we put the config stuff into is not in the plugin. The user 
should never edit the plugin. It goes into the configuration of the 
users project. The plugin then pulles that information from the central 
file using standard (and core) forrest techniques. This is exactly what 
currently happens with the enabling/disabling of the PDF button in 
skinconf.xml.

All we are doing is defining skinning behaviour on a per page basis 
rather than a per project basis.

Further...

You say:
<p>In the following example all files with the extension 
&quot;html&quot; and only the &quot;index.html&quot; file residing in 
the &quot;documentation/&quot; directory will be transformed to PDF and 
a button added to the related pages. All &quot;html&quot; files, other 
than &quot;index.html,&quot; in &quot;documentation/&quot; directory 
will be excluded.</p>

<p>
   <code>plugin.pdf.button.include.output=**.html, 
documentation/index.html</code>
</p>

Your description of this value is incorrect. the first match (**.html) 
will match all html files regardless of where they occur. The second 
match (documentation/index.html) has no effect. It is only when you 
include the exclusion (which you describe as a second example) that the 
second match has effect...

<p>
   <strong>Exclusion example:</strong>
</p>
<p>In the next example all files with the extension &quot;html&quot; 
will be excluded from transformation and the button will therefore not 
be displayed on the related pages.</p>
<p>
   <code>plugin.pdf.button.exclude.output=**/index.html</code>
</p>

In this case only files with the name "index.html" will be excluded not 
those with an html extension as you describe.

When you put the first match of the include (**.html) together and the 
exclude match (**/index.html) you include all html files except ones 
named index.html.

The second include match (documentation/index.html) comes into play if 
you put them all together. This would then say include all html files 
except index.html files, but include the documentation/index.html file.

One final observation about your docs. Rather than using 
<p><strong>....</strong></p>, wouldn't it be better to do 
<section><title>...</title></section>?

And rather than <p><code>...</code></p> why not <source>...</source>.

Don't worry about making these changes now, I can do them when I commit 
the patch unless there is a reason for this method that I have not spotted.


Ross



Mime
View raw message