forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gav...." <brightoncomput...@brightontown.com.au>
Subject RE: Outline FOAF plugin
Date Wed, 06 Jun 2007 13:50:24 GMT
Thanks Oshani, I have committed this initial code to the whiteboard.
I will take a good look at it and test drive it over the next day or two
and answer what I can then.

As a side issue, your emails are coming through in HTML, plain text would
be better for the archivers and for quoting.

Thanks Again, initial glance looks good!

Gav...

________________________________________
From: oshanis@gmail.com [mailto:oshanis@gmail.com] On Behalf Of Oshani
Seneviratne
Sent: Wednesday, 6 June 2007 2:22 PM
To: Forrest Developers List
Subject: Outline FOAF plugin

Hi,

I have created an outline FOAF plugin and attached the patch to a JIRA issue
FOR-1002 [1] . I would really appreciate if my mentor/co-mentor or any one
of the Forrest developers could take a look at it and comment. 

As the first step, I simply wrote an xsl to extract the plain XML data out
of a FOAF document. The idea was to read through a *single* FOAF document
and generate all the person details and index those in a single page.
There's nothing fancy in this yet: in fact, I didn't consider much of the
semantics of FOAF. Only used just the basic terms such as foaf:person,
foaf:knows, etc. 

For the next development step, I believe we could create multiple pages with
multiple FOAF files which could be either related (with a foaf:knows
relationship) or unrelated, and possibly enhance the number of
transformations of the FOAF semantics in the xsl. Anyway, I would like to
hear your comments on this and any other possible enhancements that we could
do. 


While developing this initial version of the plugin, I came across few
forrest specific problems.I apologize if these have been answered before (I
did go through much of Forrest's code, checked almost all of Forrest's
documentation and the mail archives but was not able to find the answers.)
They are not major problems, however I would like to get them clarified:

For instance,

1. After seeding the plugin and after doing all the configurations as
advised in [2], I did 'forrest run'... only to find that it failed because
the plugin descriptor was not to be found. 

So, as a workaround, I did the following:
  Copied a plugins.xml file to the foaf plugin dir
(FORREST_HOME/whiteboard/plugins/o.a.f.p.i.foaf)
  Added a new plugin entry there for the FOAF plugin
  Added ' forrest.plugins.descriptors=file:///${project.home}/plugins.xml'
in to the forrest.properties file. 

After this, it did not complain about any missing plugin descriptors.
So, my question is, is this the expected way of letting the forrest build
know about a new plugin (at least until the plugin is registered in the
official plugin descriptor files)? 


2. When I ran the 'ant test' target against the plugin, it failed saying
that there are broken links in the site. I found the culprit to be a couple
of @rdf:ID and  @rdf:resource elements I embedded in the xsl. 

For example,  there's the following line in the foaf-to-document.xsl
<a href="{foaf:homepage/@rdf:resource}"><xsl:value-of
select="foaf:homepage/@rdf:resource"/></a>

When Forrest renders this link it leads to a relative path like
"http://localhost:8888/homepage_url_given_in_foaf:homepage/@rdf:resource".
How can we make it absolute, so that it will be linked to
"homepage_url_given_in_foaf:homepage/@rdf:resource" and not the relative url
as in above?


3.I was able to see the transformation I intended with the xsl at
http://localhost:8888/personDetails.xml (in one of these forrest's internal
doc forms I believe). However, when I point my browser to
http://localhost:8888/personDetails.html, I could only see a blank page with
the default forrest skin applied. The content was missing! Now, how is this
page generated? Is the FORREST_HOME/main/webapp/sitemap.xmap responsible for
generating this html page? 
More importantly, what changes should I make to get those content from the
transformed FOAF into that html?


4. This could be a very silly question, but thought I'd ask anyway... Would
you advice against making changes to the plugin source within the build dir,
once it is locally deployed in the FORREST_HOME/build/plugins? I ask
because, I found it much more convenient to make changes from the build dir,
rather than from FORREST_HOME/whiteboard/plugins/o.a.f.p.i.foaf, do 'ant
local-deploy' and then do 'forrest run' after each and every change. :) 


Also, I think I should mention that, although I looked in to the possibility
of using dispatcher with this initial outline plugin, I am afraid I did not
make much progress with that. Hopefully, in the coming weeks I would be able
to understand how to use it. Until then I am going to experiment a bit and
learn more. Any hints on how to get up to speed with dispatcher with this
plugin will be appreciated! 


[1] https://issues.apache.org/jira/browse/FOR-1002
[2] http://forrest.apache.org/docs_0_90/howto/howto-buildPlugin.html


Thanks,
Oshani.


Mime
View raw message