You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Christophe Dupriez <ch...@poisoncentre.be> on 2008/07/04 15:32:22 UTC

Page types

Hi !

I would like to follow-up the "aliases" discussions by one on the "page types".

The idea is that "constant" plugin calls would be very useful for a given type of pages in a Wiki.

Examples: In a Wiki with "events", "white papers", "definitions", one would like:

Page about an Event: list at the bottom of the pages referring to this event

Page with a White Paper: Always a TableOfContent at the top;
  + list at the bottom of the pages referring to this White Paper
about an Event: list at the bottom of the page of the pages referring to this event

Page with a definition:
   At the top: links to broader terms; links to narrower terms
   At the bottom: list at the bottom of the pages referring to this definition

For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise> in PageTop/PageBottom.JSP
(one c:when per page type)

Any better idea ???

Christophe

P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.

Re: Page types

Posted by Dirk Frederickx <di...@gmail.com>.
@Christophe:

Here is how you could use the IfPlugin. Add following markup to the
LeftMenu page.

[{If var='pagename' contains='^WhitePaper-*'

%%(background:yelllow;) [{TableOfContents }]/%  }]


dirk


On Sat, Jul 5, 2008 at 1:46 PM, Bob Paige <bo...@gmail.com> wrote:
> Christophe,
>
> What if you wrote a page filter that included the semantic content? Tying
> this back to the Alias/Macro discussion, the content to be inserted could be
> in other wiki pages named after the different type, i.e. WhitePaper-Header,
> WhitePaper-Footer, Event-Header, Event-Footer, etc.
>
> The catch would be to identify what 'type' of page is being processed.
>
> The simplest solution is to base in on the page name. For example,
> whitepapers could always have a suffix of 'WhitePaper', i.e. 'Agricultural
> WhitePaper'.
>
> A more complicated solution would be to add arbitrary meta-data to the page
> and have the filter choose based on this meta-data. I see some discussion of
> metadata here (http://www.jspwiki.org/wiki/IdeasMetadata). Personally, I
> think the CSS approach makes the most sense.
>
> --
> Bobman
>
>
> On Sat, Jul 5, 2008 at 4:42 AM, Dirk Frederickx <di...@gmail.com>
> wrote:
>
>> Did you check the http://www.jspwiki.org/wiki/IfPlugin  which should
>> give you quite some power too.
>> You could eg consder to add this to [TitleBox] page or
>> [CopyrightNotice] pages, which allows to do this kind of stuff without
>> touching the template.jsp pages.
>>
>>
>> dirk
>>
>>
>>
>> On Fri, Jul 4, 2008 at 3:32 PM, Christophe Dupriez
>> <ch...@poisoncentre.be> wrote:
>> > Hi !
>> >
>> > I would like to follow-up the "aliases" discussions by one on the "page
>> types".
>> >
>> > The idea is that "constant" plugin calls would be very useful for a given
>> type of pages in a Wiki.
>> >
>> > Examples: In a Wiki with "events", "white papers", "definitions", one
>> would like:
>> >
>> > Page about an Event: list at the bottom of the pages referring to this
>> event
>> >
>> > Page with a White Paper: Always a TableOfContent at the top;
>> >  + list at the bottom of the pages referring to this White Paper
>> > about an Event: list at the bottom of the page of the pages referring to
>> this event
>> >
>> > Page with a definition:
>> >   At the top: links to broader terms; links to narrower terms
>> >   At the bottom: list at the bottom of the pages referring to this
>> definition
>> >
>> > For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise> in
>> PageTop/PageBottom.JSP
>> > (one c:when per page type)
>> >
>> > Any better idea ???
>> >
>> > Christophe
>> >
>> > P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.
>>
>

Re: Page types

Posted by Bob Paige <bo...@gmail.com>.
I just did a little experiment regarding metadata and I am really liking the
CSS approach.

Suppose you add something like this to your page:
%%collapsebox
!Metadata
|tag|Whitepaper
|tag|Event
%%

This defines two pieces of metadata. In this example they are both of type
'tag', but with different values. Metadata could have any name (and any
number of columns!) but this illustrates how you could have multiple tags
with the same name if you needed it.

Notice that I used the 'collapsebox' CSS tag. This is part of the
TableOfContents plugin, so it is already available. You need to provide a
header (the "!Metadata" line) for the collapsebox to hook into.

This gives us:
1. arbitrary structure over the metadata
2. metadata is easily editable
3. metadata is easily viewable/hideable
4. metadata is easily searchable (the standard search mechanism will find
"tag|Whitepaper" in my example above

One step further:
Coupled with SearchPlugin you *almost* have a replacement for Categories or
even TagPlugin. Once I had sample metadata as described above I tried using
SearchPlugin to find only pages with certain tags (i.e. "[{Search
query='Type|Whitepaper'}]"). While this works, there are a few downsides:
1. the output always contains the current page (since it satisfies the query
as well)
2. the output is displayed in a search table with rankings
3. accidental hits are possible if your criteria are not sufficiently
specific.

The second point is interesting. My sample wiki has < 100 pages. Added some
metadata to 5 pages and setup another page with the SearchPlugin. Even
though these were the *only* pages with those tags, some were given a score
as low as 19 and others as high as (only) 57. The score seems to be based on
how large the page is. If the page contained only the metadata and one other
link, the score was 57. If the page contained about a dozen lines with the
metadata at the end, the score was 19.

-- 
Bobman

On Sat, Jul 5, 2008 at 7:46 AM, Bob Paige <bo...@gmail.com> wrote:

> Christophe,
>
> What if you wrote a page filter that included the semantic content? Tying
> this back to the Alias/Macro discussion, the content to be inserted could be
> in other wiki pages named after the different type, i.e. WhitePaper-Header,
> WhitePaper-Footer, Event-Header, Event-Footer, etc.
>
> The catch would be to identify what 'type' of page is being processed.
>
> The simplest solution is to base in on the page name. For example,
> whitepapers could always have a suffix of 'WhitePaper', i.e. 'Agricultural
> WhitePaper'.
>
> A more complicated solution would be to add arbitrary meta-data to the page
> and have the filter choose based on this meta-data. I see some discussion of
> metadata here (http://www.jspwiki.org/wiki/IdeasMetadata). Personally, I
> think the CSS approach makes the most sense.
>
> --
> Bobman
>
>
>
> On Sat, Jul 5, 2008 at 4:42 AM, Dirk Frederickx <di...@gmail.com>
> wrote:
>
>> Did you check the http://www.jspwiki.org/wiki/IfPlugin  which should
>> give you quite some power too.
>> You could eg consder to add this to [TitleBox] page or
>> [CopyrightNotice] pages, which allows to do this kind of stuff without
>> touching the template.jsp pages.
>>
>>
>> dirk
>>
>>
>>
>> On Fri, Jul 4, 2008 at 3:32 PM, Christophe Dupriez
>> <ch...@poisoncentre.be> wrote:
>> > Hi !
>> >
>> > I would like to follow-up the "aliases" discussions by one on the "page
>> types".
>> >
>> > The idea is that "constant" plugin calls would be very useful for a
>> given type of pages in a Wiki.
>> >
>> > Examples: In a Wiki with "events", "white papers", "definitions", one
>> would like:
>> >
>> > Page about an Event: list at the bottom of the pages referring to this
>> event
>> >
>> > Page with a White Paper: Always a TableOfContent at the top;
>> >  + list at the bottom of the pages referring to this White Paper
>> > about an Event: list at the bottom of the page of the pages referring to
>> this event
>> >
>> > Page with a definition:
>> >   At the top: links to broader terms; links to narrower terms
>> >   At the bottom: list at the bottom of the pages referring to this
>> definition
>> >
>> > For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise> in
>> PageTop/PageBottom.JSP
>> > (one c:when per page type)
>> >
>> > Any better idea ???
>> >
>> > Christophe
>> >
>> > P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.
>>
>
>

Re: Page types

Posted by Murray Altheim <mu...@altheim.com>.
Bob Paige wrote:
> Christophe,
> 
> What if you wrote a page filter that included the semantic content? Tying
> this back to the Alias/Macro discussion, the content to be inserted could be
> in other wiki pages named after the different type, i.e. WhitePaper-Header,
> WhitePaper-Footer, Event-Header, Event-Footer, etc.
> 
> The catch would be to identify what 'type' of page is being processed.
> 
> The simplest solution is to base in on the page name. For example,
> whitepapers could always have a suffix of 'WhitePaper', i.e. 'Agricultural
> WhitePaper'.

I've always found attempts at overloading use of the page name to be
fraught with a lot of issues, not the least of which is to force page
names sometimes into very ugly patterns just to conform to a specific
need, then not fit a different need.

One of the major benefits of faceted classification in library systems
is to mitigate the fragility of enumerated classification systems, and
while it's not using a controlled vocabulary, the WikiTag [1] function-
ality (part of the CeryleWikiPlugins) does permit a separation of what
you're calling "semantic content" from the page name.

   [{Tag WhitePaper }]

Given you can query the TagManager [2] directly with a page to see if
it has a tag (using a direct match or a regex, see [3]), it's possible
to obtain a list of pages containing a tag, which could be used as
input into another plugin (e.g., the IfPlugin) for further processing.

> A more complicated solution would be to add arbitrary meta-data to the page
> and have the filter choose based on this meta-data. I see some discussion of
> metadata here (http://www.jspwiki.org/wiki/IdeasMetadata). Personally, I
> think the CSS approach makes the most sense.

If that arbitrary metadata were in the form of tags or say, a Dublin
Core subject (keyword) list, yes. I don't understand the idea of using
a stylesheet (presentation) approach to embedding meaning (semantics)
that can be "reasoned" upon.

On IdeasMetadata my note from 2005 might indicate some of the work I've
been doing since then in developing an "Assertion Framework" that
incorporates the TagPlugin in a more complicated system that permits
assertions of the form

    [{Assert [BassettHound] KindOf [Dog] }]

with a (relatively) simple inference engine permitting "answers" to
queries. I'll be presenting a paper on this at Balisage 2008 in
Montreal this August.

Murray

----
PS. there is a known bug in the TagPlugin: the 'AND' logical operator
is currently non-functional and will be fixed in an upcoming release.
[1] WikiTags
     http://www.altheim.com/ceryle/wiki/Wiki.jsp?page=WikiTags
[2] TagManager
     http://www.altheim.com/ceryle/wiki/Wiki.jsp?page=TagManager
[3] javadocs, see hasTag(String pagename, String tag)
     http://www.altheim.com/ceryle/api/index.html?org/ceryle/wiki/plugin/tag/TagManager.html
...........................................................................
Murray Altheim <murray07 at altheim.com>                           ===  = =
http://www.altheim.com/murray/                                     = =  ===
SGML Grease Monkey, Banjo Player, Wantanabe Zen Monk               = =  = =

       Boundless wind and moon - the eye within eyes,
       Inexhaustible heaven and earth - the light beyond light,
       The willow dark, the flower bright - ten thousand houses,
       Knock at any door - there's one who will respond.
                                       -- The Blue Cliff Record

Re: Page types

Posted by Bob Paige <bo...@gmail.com>.
Christophe,

What if you wrote a page filter that included the semantic content? Tying
this back to the Alias/Macro discussion, the content to be inserted could be
in other wiki pages named after the different type, i.e. WhitePaper-Header,
WhitePaper-Footer, Event-Header, Event-Footer, etc.

The catch would be to identify what 'type' of page is being processed.

The simplest solution is to base in on the page name. For example,
whitepapers could always have a suffix of 'WhitePaper', i.e. 'Agricultural
WhitePaper'.

A more complicated solution would be to add arbitrary meta-data to the page
and have the filter choose based on this meta-data. I see some discussion of
metadata here (http://www.jspwiki.org/wiki/IdeasMetadata). Personally, I
think the CSS approach makes the most sense.

-- 
Bobman


On Sat, Jul 5, 2008 at 4:42 AM, Dirk Frederickx <di...@gmail.com>
wrote:

> Did you check the http://www.jspwiki.org/wiki/IfPlugin  which should
> give you quite some power too.
> You could eg consder to add this to [TitleBox] page or
> [CopyrightNotice] pages, which allows to do this kind of stuff without
> touching the template.jsp pages.
>
>
> dirk
>
>
>
> On Fri, Jul 4, 2008 at 3:32 PM, Christophe Dupriez
> <ch...@poisoncentre.be> wrote:
> > Hi !
> >
> > I would like to follow-up the "aliases" discussions by one on the "page
> types".
> >
> > The idea is that "constant" plugin calls would be very useful for a given
> type of pages in a Wiki.
> >
> > Examples: In a Wiki with "events", "white papers", "definitions", one
> would like:
> >
> > Page about an Event: list at the bottom of the pages referring to this
> event
> >
> > Page with a White Paper: Always a TableOfContent at the top;
> >  + list at the bottom of the pages referring to this White Paper
> > about an Event: list at the bottom of the page of the pages referring to
> this event
> >
> > Page with a definition:
> >   At the top: links to broader terms; links to narrower terms
> >   At the bottom: list at the bottom of the pages referring to this
> definition
> >
> > For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise> in
> PageTop/PageBottom.JSP
> > (one c:when per page type)
> >
> > Any better idea ???
> >
> > Christophe
> >
> > P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.
>

Re: Page types

Posted by Dirk Frederickx <di...@gmail.com>.
Did you check the http://www.jspwiki.org/wiki/IfPlugin  which should
give you quite some power too.
You could eg consder to add this to [TitleBox] page or
[CopyrightNotice] pages, which allows to do this kind of stuff without
touching the template.jsp pages.


dirk



On Fri, Jul 4, 2008 at 3:32 PM, Christophe Dupriez
<ch...@poisoncentre.be> wrote:
> Hi !
>
> I would like to follow-up the "aliases" discussions by one on the "page types".
>
> The idea is that "constant" plugin calls would be very useful for a given type of pages in a Wiki.
>
> Examples: In a Wiki with "events", "white papers", "definitions", one would like:
>
> Page about an Event: list at the bottom of the pages referring to this event
>
> Page with a White Paper: Always a TableOfContent at the top;
>  + list at the bottom of the pages referring to this White Paper
> about an Event: list at the bottom of the page of the pages referring to this event
>
> Page with a definition:
>   At the top: links to broader terms; links to narrower terms
>   At the bottom: list at the bottom of the pages referring to this definition
>
> For now, I am thinking of a <c:choose>, <c:when>, and <c:otherwise> in PageTop/PageBottom.JSP
> (one c:when per page type)
>
> Any better idea ???
>
> Christophe
>
> P.S. To come nearer from a Semantic Wiki, page type is somewhat a must.