incubator-jspwiki-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bob Paige" <bobpa...@gmail.com>
Subject page metadata again
Date Fri, 18 Jul 2008 19:38:27 GMT
I have another thought on metadata within a page. I know this doesn't meet
all of Murray's requirements (mine are simpler) but I think it could still
work. The reason I am sharing it here is to see if anyone can point out
holes I don't see yet.

My requirements are these:
1. organize pages by project
2. organize pages by type within a project
3. make it easy for people to create new pages

As I've shared in previous emails, I dislike the workflow of requiring a
user to edit the Project page to add a static link to a non-existent page
just to create a new page. My preference would be that the user view the
Project page and have it automatically (through Tags or
ReferringPagesPlugin) dynamically discover all pages related to this
project. The catch is how to establish this linkage in a way that is not
fragile.

Option 1: Back-links.

Create a page 'Project1'. On that page use ReferringPagesPlugin to find all
pages pointing to it that also end in some keyword (i.e. 'Spec' for
specifications).

Create another page ('my Spec') with a back-link to 'Project1'.

Benefits:
* by using different name suffixes you can have many categories of pages
automatically linked to the project page.

Drawbacks:
* Any page that references Project1 and ends in 'Spec' (even one that really
belongs to 'Project2') appear in the list for Project1.


Option 2: Back-links with page name prefixes

Create a page 'Project1'. On that page use ReferringPagesPlugin but only
display pages whose name starts with 'Project1' and end with 'Spec'.

Create another page ('Project1 My New Spec').

Benefits:
* many categories of pages as in option 1
* only displays pages that actually belong to Project1 (fixes drawback of
option 1)

Drawbacks:
* fragility; if we rename the Project1 page all the back-links to it are
renamed, but the arguments passed to ReferringPagesPlugin are not updated
and the prefixes on all the related pages are not updated.


Nothing really new here; this is the same thing Murray said in the past when
I suggested using naming conventions for tying pages together.


Option 3: Use page-level meta data

This is the holy grail in that it provides page-level information that ties
things together even if the pages are renamed. Murray has his Tags plugin
but it has some limitations (i.e. it indexes the pages itself and doesn't
persist the index).

What I am proposing here (assuming you've read this far) is a way to include
page-level meta data that is automatically indexed by whatever
SearchProvider you use (Lucene, Basic, or whatever).

My proposed solution is this:

Using a plugin (or even a CSS style; the important thing is to encapsulate
your meta-data in something), you insert meta-data into the page, i.e.:

[{Metadata Type=Spec Project=Project1}]

Next (and this is the hackish part) you write a pre-save filter that
rewrites the metadata tags as something like this:

[{Metadata qwertydvorakType=Spec qwertydvorakProject=Project1}]

The SearchProvider will index this.

Finally, you write a pre-translate filter that converts it back to the
original text entered by the user.

Now all you need is another plugin that searches for pages using the hackish
prefixes. The key to making this solution work is the hackish prefix on the
metadata. It is indexable and searchable by the standard SearchProvider and
invisible to the user.

So that's my story. The only drawbacks I see are:
1. looks hackish
2. metadata is embedded within the page instead of separate

What do you think?

-- 
Bobman

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message