You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Tim Williams <wi...@gmail.com> on 2005/08/28 18:18:17 UTC

*using* metadata in forrest

I've been exploring the XPathDirectory Generator lately to actually
*use* the document metadata for driving a site.  Our doctype supports
metadata but we don't (so far as I can tell) actively use the
metadata.  I'm exploring this in terms of a webblog use-case.  I'm not
so interested in using forrest as a blog publisher as I am in the more
generic metadata driven site problem.  I'm doing it via a plugin
locally.  So I'll describe it here and if anyone is interested in this
type of problem, then I'll put what I'm doing in the whiteboard?

Each blog entry (in our doctype 2 format) has one or more "meta"
entries that look like this:
<meta name="category">Sports</meta>
<meta name="category">News</meta>

Site.xml has an entry for each of the "categories".  e.g:
<news label="News" href="blog/News/index.html" description="Thoughts
on the current events"/>

Right now, the directory name in the sitemap (e.g. "News") is
"special" because it relates to a category rather than a physical
directory.

The Xpathgenerator in the input.xmap then uses this 'special'
directory to look for any "articles" or "entries" that have a
corresponding meta entry regardless of their physical location.  The
key is that each article might be dynamically listed on any number of
pages by simply adding/removing a meta entry in the content itself.

That's all right now, it's rough and not incredibly useful at the
moment but it should give an idea of where I'm going with it.  Since
it's not a "traditional" plugin, more of an example of how to use the
xpathgenerator in forrest, I wasn't sure if it was appropriate for the
whiteboard or not.

Other use-cases I've thought of are:
o) Product catalogs where each product might belong to more than one category.
o) Product documentation where each document may apply to more than
one version of the product.
o) News site where each article might fall under more than one category.

Others might be already doing this stuff but I recently discovered the
power of xpathdirectory generator and it's caused me to explore it a
little.

I'm interested in hearing if anyone's already doing this sort of thing
and whether it's generally interesting or just peculiar to me.
--tim

Re: *using* metadata in forrest

Posted by Thorsten Scherler <th...@apache.org>.
On Sun, 2005-08-28 at 12:18 -0400, Tim Williams wrote:
> I've been exploring the XPathDirectory Generator lately to actually
> *use* the document metadata for driving a site.  Our doctype supports
> metadata but we don't (so far as I can tell) actively use the
> metadata.  I'm exploring this in terms of a webblog use-case.  I'm not
> so interested in using forrest as a blog publisher as I am in the more
> generic metadata driven site problem.  I'm doing it via a plugin
> locally.  So I'll describe it here and if anyone is interested in this
> type of problem, then I'll put what I'm doing in the whiteboard?
> 

Please, go ahead and add it to the whiteboard/plugin dir. That is the
perfect place to start. I would like to see the code but your
descriptions sounds cool.

salu2
-- 
thorsten

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


Re: *using* metadata in forrest

Posted by Tim Williams <wi...@gmail.com>.
On 8/29/05, Ross Gardler <rg...@apache.org> wrote:
> Tim Williams wrote:
> > On 8/28/05, Ross Gardler <rg...@apache.org> wrote:
> >
> >>Tim Williams wrote:
> >>
> >>>That's all right now, it's rough and not incredibly useful at the
> >>>moment but it should give an idea of where I'm going with it.  Since
> >>>it's not a "traditional" plugin, more of an example of how to use the
> >>>xpathgenerator in forrest, I wasn't sure if it was appropriate for the
> >>>whiteboard or not.
> >>
> >>How about documenting it in a How To? Even dumping the code into a How
> >>To and adding a little padding text would be a great start and since the
> >>plugin doesn't do anything itself as yet it will prevent users getting
> >>confused by it.
> >
> >
> > It's premature for a How-To as I don't quite have the "how" figured
> > out as yet.  I was hoping to find a home for it so that others might
> > be able to take a look and help me flesh a couple things out.  I can
> > figure it out locally then write a how-to though.
> 
> I understand now, probably best to put it in the whiteboard but don't
> add it to whiteboard-plugins.xml. That way we have access via SVN but it
> won't appear on the plugins page or when someone does "forrest
> available-plugins"

I've added it to the plugins.  If it turns out, once it works, that it
would be better in a sample seed then we'll move it then.

My main problem right now is getting the articles to have some menu
context when clicked.  Since they don't exist as a part of the
site.xml, I don't know how to do that.   For example, with an Article
A that belongs to categories Y and Z.  Say the user clicks on category
Y and then Article A, I want category Y to stay selected when the
article shows up.  Then, of course, if they get to Article A through
category Z, I'd want that selected.  Hopefully I've not confused my
own question here.  Anyone got any ideas?

--tim

Re: *using* metadata in forrest

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> On 8/28/05, Ross Gardler <rg...@apache.org> wrote:
> 
>>Tim Williams wrote:
>>
>>>That's all right now, it's rough and not incredibly useful at the
>>>moment but it should give an idea of where I'm going with it.  Since
>>>it's not a "traditional" plugin, more of an example of how to use the
>>>xpathgenerator in forrest, I wasn't sure if it was appropriate for the
>>>whiteboard or not.
>>
>>How about documenting it in a How To? Even dumping the code into a How
>>To and adding a little padding text would be a great start and since the
>>plugin doesn't do anything itself as yet it will prevent users getting
>>confused by it.
> 
> 
> It's premature for a How-To as I don't quite have the "how" figured
> out as yet.  I was hoping to find a home for it so that others might
> be able to take a look and help me flesh a couple things out.  I can
> figure it out locally then write a how-to though.

I understand now, probably best to put it in the whiteboard but don't 
add it to whiteboard-plugins.xml. That way we have access via SVN but it 
won't appear on the plugins page or when someone does "forrest 
available-plugins"


Ross

Re: *using* metadata in forrest

Posted by Tim Williams <wi...@gmail.com>.
On 8/28/05, Ross Gardler <rg...@apache.org> wrote:
> Tim Williams wrote:
> > That's all right now, it's rough and not incredibly useful at the
> > moment but it should give an idea of where I'm going with it.  Since
> > it's not a "traditional" plugin, more of an example of how to use the
> > xpathgenerator in forrest, I wasn't sure if it was appropriate for the
> > whiteboard or not.
> 
> How about documenting it in a How To? Even dumping the code into a How
> To and adding a little padding text would be a great start and since the
> plugin doesn't do anything itself as yet it will prevent users getting
> confused by it.

It's premature for a How-To as I don't quite have the "how" figured
out as yet.  I was hoping to find a home for it so that others might
be able to take a look and help me flesh a couple things out.  I can
figure it out locally then write a how-to though.
Thanks,  
--tim

Re: *using* metadata in forrest

Posted by Ross Gardler <rg...@apache.org>.
Tim Williams wrote:
> That's all right now, it's rough and not incredibly useful at the
> moment but it should give an idea of where I'm going with it.  Since
> it's not a "traditional" plugin, more of an example of how to use the
> xpathgenerator in forrest, I wasn't sure if it was appropriate for the
> whiteboard or not.

How about documenting it in a How To? Even dumping the code into a How 
To and adding a little padding text would be a great start and since the 
plugin doesn't do anything itself as yet it will prevent users getting 
confused by it.

> Other use-cases I've thought of are:
> o) Product catalogs where each product might belong to more than one category.

I have a need for this *now* I am very interested in your proposal.

> o) Product documentation where each document may apply to more than
> one version of the product.
> o) News site where each article might fall under more than one category.

The Resume plugin is another use case for this (as you seem to have 
spotted with your recent question on the user list).

> I'm interested in hearing if anyone's already doing this sort of thing
> and whether it's generally interesting or just peculiar to me.

I'm not aware of this being brought up before. The approach I was going 
to use (in the Resume plugin) was different. I was going to write a new 
directory generator that would only return documents with a given 
schema, that works for the Resume us case, but your approach is more 
flexible and could be enhanced with this generator, so I say go for it.

Ross

Re: *using* metadata in forrest

Posted by addi <ad...@rocktreesky.com>.
On Sunday August 28 2005 12:18 pm, Tim Williams wrote:
> I've been exploring the XPathDirectory Generator lately to actually
> *use* the document metadata for driving a site.  Our doctype supports
> metadata but we don't (so far as I can tell) actively use the
> metadata.  I'm exploring this in terms of a webblog use-case.  I'm not
> so interested in using forrest as a blog publisher as I am in the more
> generic metadata driven site problem.  I'm doing it via a plugin
> locally.  So I'll describe it here and if anyone is interested in this
> type of problem, then I'll put what I'm doing in the whiteboard?
... snip the good stuff ...

> Other use-cases I've thought of are:
> o) Product catalogs where each product might belong to more than one
> category. o) Product documentation where each document may apply to more
> than one version of the product.
> o) News site where each article might fall under more than one category.
>
> Others might be already doing this stuff but I recently discovered the
> power of xpathdirectory generator and it's caused me to explore it a
> little.
>
> I'm interested in hearing if anyone's already doing this sort of thing
> and whether it's generally interesting or just peculiar to me.
> --tim
I don't know if anyone is doing anything with this but I do find the feature 
very interesting and useful.  I could definitely use it for my use case at 
work where we are putting all documentation in one central location broken 
down by category and I can see several things already that could/should be in 
several categories.

I'm kinda slow and not very well versed but I'd be willing to help where I 
could as this is something I would definitely use.

- Addi

Re: *using* metadata in forrest

Posted by David Crossley <cr...@apache.org>.
Tim Williams wrote:
> 
> That's all right now, it's rough and not incredibly useful at the
> moment but it should give an idea of where I'm going with it.  Since
> it's not a "traditional" plugin, more of an example of how to use the
> xpathgenerator in forrest, I wasn't sure if it was appropriate for the
> whiteboard or not.

Could it just be added to the "seed-sample". That is our
place for demonstrations of functionality.

-David