Hi, I've been using an embedded copy of JSPWiki within my project Ceryle since roughly 2004. I've tracked JSPWiki from about 2.0.52 to 2.8.x — running within Ceryle — which has Jetty built in. The deployment was relatively painless; I wrote a 'WikiUtils' class and an events handler so that when JSPWiki fired up the supporting application was informed and modified the wiki configuration depending on the application's location and settings.

When I upgraded to Jetty 6 the wiki was suddenly operating in a different JVM than Jetty and I lost a great deal of integrated functionality. I've since posted several messages to Jetty mailing lists asking if anyone knew how to force an embedded Jetty to run in the same JVM as the parent application, but after more than a year there's still no answer. So much for the free online Jetty support...

I've just posted my CeryleWiki, which of course is running on JSPWiki.

I'd been looking at alternative Java-based wiki as I'm trying to find a way to do metadata and other forms of data mining off of the wiki pages, essentially to be able to grab DOM-like content off of the pages, or via page metadata. I've started up a pages on WikiMetadataAPI, MultilingualWiki, WikiInternationalizationAPI and DynamicKnowledgeRepository to see what develops.

JohnVolkar has passed along the code of the McKessonApsWikiPlugins, which have now gone through a bit of cleanup, new features, etc. and are now distributed under an Apache 2 license as the CeryleWikiPlugins. I'll likely be hosting some of them (the ones specific to their use within Ceryle) on the CeryleWiki and linking from here.


JSPWiki Events Handling#

I whipped up a WikiEvents API for JSPWiki, which is now part of the JSPWiki code base (somewhere in the 2.4.x range, can't remember exactly when). This enables any code that has access to WikiEngine to add listeners to it, or to fire events that any listeners might hear.

The event types are defined as a set of enumerated values in a WikiEventState class (which might also be named WikiEventType). In looking at the ideas expressed on the IdeasEventHandlers page, it might be good to allow some facility for event types defined in a jspwiki.events.properties file to be imported, rather than fixing the set in a class file. It seems like some combination would be good, i.e., that there would be an initial set but that it be extensible via a property file.


    /** Indicates an undefined state. */
     public static final WikiEventState UNDEFINED

     /** Indicates a WikiEngine initialization event, fired as
       * the wiki service is being initialized (in progress). */
     public static final WikiEventState INITIALIZING

     /** Indicates a WikiEngine initialized event, fired after
       * the wiki service is fully available. */
     public static final WikiEventState INITIALIZED

     /** Indicates a WikiEngine closing event, fired prior to
       * a halt of the wiki service. */
     public static final WikiEventState CLOSING

     /** Indicates a WikiEngine stopped event, fired after
       * halting the wiki service. */
     public static final WikiEventState STOPPED

     /** Indicates a exception or error state. */
     public static final WikiEventState ERROR

     /** Indicates a wiki query event. */
     public static final WikiEventState QUERY

This was my first crack at coding for JSPWiki; at the time I was new to the code base except for playing with some plugins. I'd gotten the prototype firing INITIALIZING at the beginning of WikiEngine.initialize() -- right after m_properties has been assigned the parameter value, so they're available from getWikiProperties() -- and INITIALIZED at the end of the method. Everything was up and running in about a day, testament to JSPWiki's design.

The events API allows implementors to modify properties as they're being passed to the engine, using the setWikiProperties() method. This seems to suit my needs, which are specifically to be able to modify the various paths passed to the engine from a parse of WEB-INF/jspwiki.properties.

(I'm still refactoring this section as time permits to move over to its own documentation page)

Comments#

...


reverseHeadings Patch#

I just posted a possible patch to JSPWiki 2.2.x, which adds a new property to jspwiki.properties and slightly modifies com.ecyrd.jspwiki.TranslatorReader. When the "reverseHeadings" property is set true (the default is false), the markup used to create <h1> through <h3> is reversed, such that "!" then generates <h1>, and "!!!" creates <h1>. I've been using PMWiki recently, and it uses this "reversed" syntax, which I find a bit more intuitive (since the number of "!" characters equals the heading level). Feel free to incorporate this patch into JSPWiki if you like. It does totally screw up the existing pages' headings, so it would be most useful on new installations. Or, someone could write an awk script to alter the existing pages (if anyone does, please post it here).

Comments#

...


Metadata Plugin#

Here's some ideas I started discussing on IdeasMetadata.

I'm looking at various ways of harvesting metadata from wiki pages, such that it could be used for "meta categorization" and creating navigation layers, likely using XML Topic Maps. There's an existing metadata standard that was developed by the library community and is highly advocated for use in web pages, called Dublin Core (DC). The Dublin Core Metadata Element Set (DCMES) is a set of about a dozen elements for common metadata, like author, title, etc. and is used in WorldCat, an international library project that now encompasses over 58 million metadata records in over 9000 libraries. IOW, you can't really go wrong using Dublin Core metadata.

There's even an existing way of encoding DC metadata in HTML <meta> elements, as described in a document Expressing Dublin Core in HTML/XHTML meta and link elements. This basically means you first declare the DC namespace using a <link> element, then in one or more <meta> elements you can embed a DC identifier in the 'name' attribute and the metadata in its 'content' attribute. For example:


  <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
  <meta name="DC.title" lang="en" content="Electric Forest Blog" />
  <meta name="DC.creator" content="Murray Altheim" />
  <meta name="DC.subject" lang="en" content="1. Books. 2. eBooks. 3. Digital Libraries. 4. Topic Maps. 5. Metadata. 6. Information Organization." />
  <meta name="DC.description" lang="en" content="A group blog devoted to discussion of eBooks, digital libraries, and software tools for organizing our thoughts." />
  <meta name="DC.publisher" content="Murray Altheim" />
  <meta name="DC.contributor" content="Murray Altheim, Patrick Durusau, Lee Iverson, Alexander Johannesen, Jack Park, Gary Richmond, Roger Sperberg, Conal Tuohy, Bernard Vatant" />
  <meta name="DC.date" content="2005-05-30" />
  <meta name="DC.type" content="Text" />
  <meta name="DC.format" content="text/html; charset=ISO-8859-1" />
  <meta name="DC.format" content="57486 bytes" />
  <meta name="DC.identifier" content="http://www.altheim.com/ef/" />

Without getting into too much more detail, it's also possible to further characterize DCMES elements with qualifiers and scheme identifiers (e.g., stating what format some data is in), and for this there are additional sets of DC terms, such that it's a relatively rich way of characterizing resources. As a further example (noting that I'm declaring a second namespace, "DCTERMS"):


  <link rel="schema.DCTERMS" href="http://purl.org/dc/terms/" />
  <meta name="DC.date" scheme="DCTERMS.W3CDTF" content="2005-05-30" />
  <meta name="DC.type" scheme="DCTERMS.DCMIType" content="Text" />
  <meta name="DC.identifier" scheme="DCTERMS.URI" content="http://www.altheim.com/ef/" />

Now, this doesn't compare with library MARC records (which have hundreds of fields), but it is certainly suitable for web documents. I'm thinking that if JSPWiki's syntax had a way of either marking off the boundaries for a set of metadata terms, or a way of creating name-value pairs using the "DC" and "DCTERMS" namespaces, it might prove relatively easy to use. And any content so declared could be converted into <meta> elements and embedded in the generated HTML/XHTML documents, which would allow it to be harvested by standardized tools.

I'll be working on something like this for my own purposes but am happy to coordinate with others in the JSPWiki code. I have some ideas for possible syntax, but that can wait until later. I use DC metadata throughout my Ceryle project, so this would all tie in quite nicely.

-- MurrayAltheim, 2005-06-18

Continuing on with this, I'm thinking along the lines of


  [{Meta DC.title "Wuthering Heights"}]
  [{Meta DC.author "Bronte, Emily"}]

or more generically

  [{Meta name "value"}]

which would translate to this in the output:

  <head>
    <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/" />
    <meta name="DC.title" content="Wuthering Heights" />
    <meta name="DC.author" content="Bronte, Emily" />
  </head>

(without the head tags, of course)

If people are okay with me calling this MetadataPlugin, I'll get started. Longer term, I'm thinking of several components:

  1. metadata harvester (to grab into memory the metadata found on a page)
  2. <meta> element generator (to take the in-memory metadata and generate <meta> elements to be inserted in <head>
  3. some kind of feature to allow a page's metadata to be deliberately displayed (normally it's hidden)
  4. some kind of UI editor to simplify creation of page metadata (this could be a web form, but better would be an applet that pops up and allows creation/modification from the wiki edit page

I would like some basic guidance (like just a simple paragraph leading me through what will be required for me to code this, e.g., which classes are involved, do I write a filter, etc.) which would save me a LOT of time figuring it out. If this is already available on the wiki, a pointer would be great.

Comments#

...


I've written a new LinkParser (which requires a few modifications to JSPWikiMarkupParser) that permits users to add almost all of the <a> (link) attributes declared in HTML, all except those that are security risks. This is now included in the default JSPWiki distribution, and is described in more detail on its own page, AugmentedWikiLinks.


Stuff I'm keeping track of, related to things on JSPWiki.

Who's on?#

106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 106.120.173.78, 110.249.201.193, 110.249.201.216, 110.249.201.225, 110.249.201.4, 110.249.201.5, 110.249.201.88, 110.249.201.90, 110.249.201.92, 110.249.202.136, 110.249.202.182, 110.249.202.188, 110.249.202.209, 110.249.202.221, 110.249.202.62, 110.249.202.7, 110.249.202.8, 110.249.202.86, 110.249.202.96, 110.249.202.99, 111.225.148.109, 111.225.148.133, 111.225.148.136, 111.225.148.185, 111.225.148.189, 111.225.148.215, 111.225.148.225, 111.225.148.226, 111.225.148.227, 111.225.148.232, 111.225.148.248, 111.225.148.5, 111.225.149.155, 111.225.149.190, 111.225.149.192, 111.225.149.199, 111.225.149.209, 111.225.149.219, 111.225.149.222, 111.225.149.27, 111.225.149.31, 111.225.149.44, 111.225.149.60, 111.225.149.73, 111.225.149.95, 123.125.71.111, 123.125.71.45, 157.55.39.107, 157.55.39.107, 157.55.39.119, 157.55.39.35, 157.55.39.35, 157.55.39.35, 157.55.39.61, 157.55.39.61, 157.55.39.61, 157.55.39.67, 157.55.39.67, 157.55.39.67, 159.138.152.139, 213.180.203.1, 213.180.203.1, 213.180.203.1, 213.180.203.1, 213.180.203.1, 216.244.66.227, 216.244.66.227, 216.244.66.227, 216.244.66.227, 216.244.66.227, 216.244.66.227, 216.244.66.227, 220.181.108.84, 220.243.135.114, 220.243.135.33, 220.243.136.123, 220.243.136.22, 220.243.136.47, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 3.81.28.94, 40.77.167.158, 40.77.167.158, 40.77.167.158, 46.229.168.129, 46.229.168.129, 46.229.168.130, 46.229.168.130, 46.229.168.131, 46.229.168.131, 46.229.168.132, 46.229.168.132, 46.229.168.132, 46.229.168.132, 46.229.168.134, 46.229.168.134, 46.229.168.134, 46.229.168.135, 46.229.168.135, 46.229.168.135, 46.229.168.136, 46.229.168.137, 46.229.168.138, 46.229.168.138, 46.229.168.138, 46.229.168.138, 46.229.168.139, 46.229.168.139, 46.229.168.139, 46.229.168.139, 46.229.168.139, 46.229.168.140, 46.229.168.140, 46.229.168.140, 46.229.168.140, 46.229.168.140, 46.229.168.141, 46.229.168.141, 46.229.168.141, 46.229.168.142, 46.229.168.142, 46.229.168.142, 46.229.168.142, 46.229.168.142, 46.229.168.143, 46.229.168.143, 46.229.168.143, 46.229.168.143, 46.229.168.143, 46.229.168.146, 46.229.168.146, 46.229.168.146, 46.229.168.146, 46.229.168.147, 46.229.168.147, 46.229.168.147, 46.229.168.147, 46.229.168.147, 46.229.168.148, 46.229.168.149, 46.229.168.149, 46.229.168.150, 46.229.168.150, 46.229.168.151, 46.229.168.151, 46.229.168.153, 46.229.168.154, 46.229.168.154, 46.229.168.154, 46.229.168.161, 46.229.168.161, 54.36.148.120, 54.36.148.121, 54.36.148.13, 54.36.148.130, 54.36.148.138, 54.36.148.145, 54.36.148.150, 54.36.148.151, 54.36.148.157, 54.36.148.17, 54.36.148.170, 54.36.148.172, 54.36.148.18, 54.36.148.185, 54.36.148.191, 54.36.148.227, 54.36.148.228, 54.36.148.249, 54.36.148.250, 54.36.148.34, 54.36.148.40, 54.36.148.45, 54.36.148.50, 54.36.148.78, 54.36.148.82, 54.36.148.93, 54.36.148.99, 54.36.149.102, 54.36.149.15, 54.36.149.17, 54.36.149.26, 54.36.149.37, 54.36.149.53, 54.36.149.66, 54.36.149.87, 54.36.150.100, 54.36.150.103, 54.36.150.104, 54.36.150.115, 54.36.150.115, 54.36.150.121, 54.36.150.121, 54.36.150.137, 54.36.150.142, 54.36.150.145, 54.36.150.159, 54.36.150.16, 54.36.150.161, 54.36.150.171, 54.36.150.172, 54.36.150.176, 54.36.150.177, 54.36.150.178, 54.36.150.185, 54.36.150.186, 54.36.150.189, 54.36.150.190, 54.36.150.191, 54.36.150.21, 54.36.150.22, 54.36.150.26, 54.36.150.37, 54.36.150.41, 54.36.150.55, 54.36.150.57, 54.36.150.59, 54.36.150.62, 54.36.150.67, 54.36.150.73, 54.36.150.73, 54.36.150.73, 54.36.150.75, 54.36.150.76, 54.36.150.77, 54.36.150.8, 54.36.150.80, 54.36.150.83, 54.36.150.83, 54.36.150.9, 54.36.150.90, 54.36.150.93, 66.249.64.103, 66.249.64.103, 66.249.64.103, 66.249.64.96, 66.249.64.96, 66.249.64.99

Pages that I've contaminated #

[idea courtesy of JohnVolkar]

Aggregate Plugin Discussion, Andrew Broughton, Andrew Jaquith, Apache JSP Wiki Manifesto, Better Transclusions, Black Bean Template, Bug Groovy Plugin Does Not Work, Bug Link To Notes Pages Documents, Bug TC.ACL.2.4.103.1, Ceryle Wiki Plugin Discussion, Ceryle Wiki Plugins, Chat Plugin, Concept Plugin, Conditional Comments, Contributed Plugins, Contributed Template, Daily Razor, Dynamic Knowledge Repository, Entity Reference, Extended Insert Page Plugin, FAQ Administration, FAQ Authentication, FAQ General, Frank_Fischer, GIF, Groovy Plugin, Hello World Plugin, How To Insert A Page, Idea Ability To View Wiki Markup From Page Info, Idea Add Tag Function, Idea Adopt Mediawiki Format, Idea Auto Numbered Headings, Idea Four Heading Levels, Idea Idea Wiki Synchronization Via XMLRPC, Idea Installed Plugins, Idea Noise Bot, Idea Redirect Without Java Script, Idea Redirect Without Java Script By Using Alias, Idea Remove The Chrome From The Edit Page, Idea Reverse Headings, Idea Single Version For Saves By Same User Within Hour, Idea Spellcheck, Idea Subversion Provider Should Go Into Core, Idea Suspicious Edit Flag, Idea Wiki Archive Generator, Ideas Metadata, Ideas Plugin Script Language, Ideas User Preferences, Image, Index Plugin, Inline Image Links, JSP Wiki Coding Standard, JSP Wiki FAQ, JSP Wiki Feature Road Map, JSP Wiki Friendly Web Hosting, JSP Wiki Performance, JSP Wiki V 2 Features, Java Preferences, Java Regular Expressions, Link Index Plugin, Multiple Wikis, Murray Altheim, New Page Handler, Olive Branch Template, Opening Externel Links By Default In A New Window, Page Filter Configuration, Permitted Page Filter, Random Pages Plugin, Redirect Plugin, Regular Expression Syntax, Relaxed Wiki Names, Release 2.2 Discussion, Replacing Reference Manager, Search Enhancements, Short URL Constructor, Spam Filter, Stupid Questions, TESTER_RVM, TODO List, Table Of Contents Plugin, Text Formatting Rules Discussion, Ticker Plugin, Timely Greeting Plugin, Todo Lists Without Plugin, Topical Recent Changes Plugin, Touch Graph Wiki Browser, Transclude Plugin, Transclude Plugin Discussion, Unused Pages Plugin, Upgrading JSP Wiki, Upload Link Tag, Wanted Providers, Wiki As Database, Wiki Events, Wiki Forms Example, Wiki Gardener, Wiki Internationalization API, Wiki Metadata API, Wiki RPC Interface 2, World Wide Web, Xml Storage


I sometimes hang out (when I'm hanging out online) over on CommunityWiki, and maintain both a blog for Ceryle and a group blog called Electric Forest.

Comments#

...

Add new attachment

Only authorized users are allowed to upload new attachments.

List of attachments

Kind Attachment Name Size Version Date Modified Author Change note
gz
reverseHeadings.tar.gz 19.4 kB 1 15-Jun-2005 03:30 MurrayAltheim
« This page (revision-38) was last changed on 10-Oct-2010 16:39 by Dirk Frederickx