Hello all, I hope that my previous post were rejected by the moderator because of size of the attachment. All I wanted to say was that i developed a new plugin. It can include and transform external resources into xwiki pages. I used it to embed my pages with some external RSS feeds. The plugin is based upon xsl transformations. I attach to this mail only the README included into the package. Tell me if you are intrested. Hope to be useful. -- By MCM. Hello, This is a simple plugin that lets you include an external content into any xwiki page. Actually I used it to show external RSS contents into "dynamic" panels. To work properly the plugin needs an XSL template that produces the desired html code from the source content. The "example" directory of this package countains a simple XSL stylesheet that transform an RSS 2.0 feed into an html fragment. How to build it: - A precompiled version (only for JDK 1.5) is available into the dist/lib directory of the package. - you can build the whole project by typing: ant -f ant/build.xml dist How to install: - Copy all the jars from the "dist/lib" directory into the "WEB-INF/lib" of your XWiki installation. - Edit your "WEB-INF/xwiki.cfg" and add the following line into the "xwiki.plugins" section: com.xpn.xwiki.plugin.xsltransformer.XslURITransformerPlugin - At the end of the same file, append the following lines (WEB-INF/xwiki.cfg) #XSLTransormer Plugin configuration parameters xwiki.xsluritransformer.debug=disabled xwiki.xsluritransformer.connectiontimeout=15000 xwiki.xsluritransformer.fallbackencoding=UTF-8 - Restart your XWiki How to use it: - First of all you need a new Wiki page, so create it. - Now you have to attach the "example/rss2xhtml.xsl" file to the page. - Go to edit the page and add the following snippet code (change the uri with something that works ;O): $xwiki.xslURITransformer.cachedTransformURI("http://rss.host/path/to/the/rssfeed.xml","http://your.wiki.host/xwiki/bin/download/path/to/the/attached/rss2xhtml.xsl", "900") - Save the page and enjoy the included and reformatted rss ;O) How does it works: The plugnin uses 2 http connections to fetch the source and the xsl (that i often attach to the same page) and performs the transformation. It has 2 functions that performs the same work but in 2 different ways: $xwiki.xslURITransformer.cachedTransformURI(SourceURI,XSLURI,Timeout) $xwiki.xslURITransformer.transformURI(SourceURI,XSLURI) Common parameters: The SourceURI parameter is the full URI of the resource that you want include. The XSLURI parameter is the full URI of the XSL stylesheet to use for the transformation (if you followed my instructions you wil find it attached to the page) The "normal" version performs all the tasks every time the page is viewed (with lot of http traffic to fetch the resources and cpu usage for the transformation). The "cached" version has an extra "timeout" parameter that specify the amount of seconds to consider the resource as valid. This function mantains an internal cache of the transformed resources and send them back to the client without perform the whole work every time. The resource is fetched again after it expires (with a great incement of speed and a better memory usage). NOTE: This whole package is released under Apache License. PS: Sorry for my english.. By Marco Casavecchia M. ([email protected])
Hi, On Mon, Apr 7, 2008 at 11:36 AM, Marco Casavecchia Morganti <[email protected]> wrote:
Hello all, I hope that my previous post were rejected by the moderator because of size of the attachment.
All I wanted to say was that i developed a new plugin. It can include and transform external resources into xwiki pages.
I used it to embed my pages with some external RSS feeds. The plugin is based upon xsl transformations.
I attach to this mail only the README included into the package.
Tell me if you are intrested.
You should add you plugin on http://code.xwiki.org/xwiki/bin/view/Main/WebHome (Use "Add Plugin...") for everyone to be able to look at it and to write some description.
Hope to be useful. -- By MCM.
Hello,
This is a simple plugin that lets you include an external content into any xwiki page. Actually I used it to show external RSS contents into "dynamic" panels.
To work properly the plugin needs an XSL template that produces the desired html code from the source content. The "example" directory of this package countains a simple XSL stylesheet that transform an RSS 2.0 feed into an html fragment.
How to build it: - A precompiled version (only for JDK 1.5) is available into the dist/lib directory of the package.
- you can build the whole project by typing: ant -f ant/build.xml dist
How to install: - Copy all the jars from the "dist/lib" directory into the "WEB-INF/lib" of your XWiki installation.
- Edit your "WEB-INF/xwiki.cfg" and add the following line into the "xwiki.plugins" section: com.xpn.xwiki.plugin.xsltransformer.XslURITransformerPlugin
- At the end of the same file, append the following lines (WEB-INF/xwiki.cfg) #XSLTransormer Plugin configuration parameters xwiki.xsluritransformer.debug=disabled xwiki.xsluritransformer.connectiontimeout=15000 xwiki.xsluritransformer.fallbackencoding=UTF-8
- Restart your XWiki
How to use it: - First of all you need a new Wiki page, so create it. - Now you have to attach the "example/rss2xhtml.xsl" file to the page. - Go to edit the page and add the following snippet code (change the uri with something that works ;O):
$xwiki.xslURITransformer.cachedTransformURI("http://rss.host/path/to/the/rssfeed.xml","http://your.wiki.host/xwiki/bin/download/path/to/the/attached/rss2xhtml.xsl", "900")
- Save the page and enjoy the included and reformatted rss ;O)
How does it works:
The plugnin uses 2 http connections to fetch the source and the xsl (that i often attach to the same page) and performs the transformation.
It has 2 functions that performs the same work but in 2 different ways: $xwiki.xslURITransformer.cachedTransformURI(SourceURI,XSLURI,Timeout) $xwiki.xslURITransformer.transformURI(SourceURI,XSLURI)
Common parameters: The SourceURI parameter is the full URI of the resource that you want include. The XSLURI parameter is the full URI of the XSL stylesheet to use for the transformation (if you followed my instructions you wil find it attached to the page)
The "normal" version performs all the tasks every time the page is viewed (with lot of http traffic to fetch the resources and cpu usage for the transformation).
The "cached" version has an extra "timeout" parameter that specify the amount of seconds to consider the resource as valid. This function mantains an internal cache of the transformed resources and send them back to the client without perform the whole work every time. The resource is fetched again after it expires (with a great incement of speed and a better memory usage).
NOTE: This whole package is released under Apache License.
PS: Sorry for my english..
By Marco Casavecchia M. ([email protected])
_______________________________________________ devs mailing list [email protected] http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
Thomas Mortagne wrote:
Hi,
On Mon, Apr 7, 2008 at 11:36 AM, Marco Casavecchia Morganti <[email protected]> wrote:
[SNIP]
You should add you plugin on http://code.xwiki.org/xwiki/bin/view/Main/WebHome (Use "Add Plugin...") for everyone to be able to look at it and to write some description.
I try that but i don't have a username/password.. Can you help me? -- By MCM.
Hi Marco,
I try that but i don't have a username/password.. Can you help me?
You need to create your user on XWiki.org first. To do this, click on the "register" link at the top right of the page and create your own user profile. Then you'll be able to add your plugin to the list :-) Guillaule
Guillaume Lerouge wrote:
Hi Marco,
I try that but i don't have a username/password.. Can you help me?
You need to create your user on XWiki.org first. To do this, click on the "register" link at the top right of the page and create your own user profile. Then you'll be able to add your plugin to the list :-)
..Of course.. :O) Thanks. -- By MCM.
Marco Casavecchia Morganti wrote:
Hello all, I hope that my previous post were rejected by the moderator because of size of the attachment.
All I wanted to say was that i developed a new plugin. It can include and transform external resources into xwiki pages.
I used it to embed my pages with some external RSS feeds. The plugin is based upon xsl transformations.
I attach to this mail only the README included into the package.
Tell me if you are intrested.
Hope to be useful.
Hi, This sounds useful, so please upload it on code.xwiki.org (you can register your own user on www.xwiki.org) You could also look at the (unreleased yet, but mostly written) XML plugin (http://jira.xwiki.org/jira/browse/XPXML-1). Source code can be checked out from http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/xwiki-plugins/trunk/xml/ I would like some feedback from you: - How long have you been using XWiki? - When and why did you decide to go inside the code? - Was it easy to understand the XWiki architecture? - How long did it take you to write this plugin, and how hard/frustrating/easy was it? - Any pitfalls you encountered? - What is your programming background/experience? This would help us understand how an external user sees the XWiki code, and maybe improve the not-so-easy to understand parts. Thanks, -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
Hi,
This sounds useful, so please upload it on code.xwiki.org (you can register your own user on www.xwiki.org)
Done ;O) I just created this page http://code.xwiki.org/xwiki/bin/view/Plugins/XSLPlugin Where i uploaded my source code package.
You could also look at the (unreleased yet, but mostly written) XML plugin (http://jira.xwiki.org/jira/browse/XPXML-1). Source code can be checked out from http://svn.xwiki.org/svnroot/xwiki/xwiki-platform/xwiki-plugins/trunk/xml/
I written the plugin by my self ignoring that there is something similar.
I would like some feedback from you: - How long have you been using XWiki?
2/3 Months
- When and why did you decide to go inside the code?
Last month.. We have choose it for our internal portal.
- Was it easy to understand the XWiki architecture?
In terms of coding.. it was not simple. Before start to write the plugin i needed to extended the authentication subsystem to support "Single Sing On" with our SUN Portal Server (It uses AM Server as Identity Manager)
- How long did it take you to write this plugin, and how hard/frustrating/easy was it?
The SSO takes me about 2 weeks, the plugin was ready in about 3/4 work days.
- Any pitfalls you encountered?
When I developed the plugin i found the documentation very useful. The core development instead was so hard. Anyway, the architecture of xwiki code helps me a lot.
- What is your programming background/experience?
I'm a SysAdmin and a Programmer. My background is focused on Unix/Linux systems where i learned to code bash scripts, C programsm, Java programs, and perform system administration tasks.
This would help us understand how an external user sees the XWiki code, and maybe improve the not-so-easy to understand parts. Thanks,
Thanks to you. -- By MCM.
participants (4)
-
Guillaume Lerouge -
Marco Casavecchia Morganti -
Sergiu Dumitriu -
Thomas Mortagne