> I've just had a quick look at atomicwiki and although the system looks
> quite interesting I was surprised that the wiki markup is stored
> verbatim within the XML files.
Yes, I already thought about changing that. The only problem is that we
would need to transform the XML back into wiki markup for editing.
AtomicWiki allows arbitrary extensions to be written as XQuery
functions, which generate XHTML. We would need a way to reverse this,
i.e. pass in the XHTML and have get the wiki markup back again. This is
probably not a big issue though. Maybe we could use a naming convention
for the XQuery functions that implement an extension...
Wolfgang
> So, to be properly compliant with the RFC I believe that wiki markup
> in a type="text" element is not allowed.
Probably yes.
> I think converting from a subset of XHTML to wikimodel markup is
> pretty easily accomplished using an XSL stylesheet. For the extensions
> I guess the best way to go is use your own elements in a separate
> namespace.
Yes, that's a good solution. We could easily store the extensions as
elements in e.g. the "wiki" namespace and expand them later during the
final rendering of the content. Writing a stylesheet to convert the
XHTML back into wiki text will be easy then.
I guess I'll find some time for AtomicWiki next week and will implement
the ideas we discussed. It shouldn't be too much work and I desperately
need a search feature anyway.
Wolfgang
Sure, I will need to convert my existing wiki contents as well.
Wolfgang
I committed a first bunch of changes today: all wiki markup is now
transformed into XHTML before being stored. For editing, the entries are
changed back into wiki markup (using XHTML2CommonWiki.xsl).
Macros and extensions are saved as elements in the wiki namespace. For
example, the {code} macro is saved as
<wiki:macro xmlns:wiki="http://exist-db.org/xquery/wiki"
name="code">...</wiki:macro>
For display, the XHTML is sent through the XQuery function
atom:filter-entry() to dynamically expand those macros.
To migrate old wiki contents to the new format, you just need to call
build.sh migrate
once after you restored your old stuff (see INSTALL file). So far, I
only tested the standalone version, not the .war distribution.
Next step for me is to implement a general search facility, which should
now be rather easy since everything is stored as proper XHTML.
Wolfgang
http://atomic.exist-db.org/util/Search
The search functionality is implemented by the XQuery script
data/search.xql and relies on Lucene for the full text queries.
To use this with your existing setup and data, a few steps need to be
applied. I guess the easiest approach is to
* backup your data using eXist's backup facility
* shut down and clean your db by removing everything from
webapp/WEB-INF/data
* run "build.sh setup" to restore the default wiki setup
* start the server and selectively restore data from your backup, again
using eXist's backup tools. Do not change /db/system/config or the
/db/wiki/util feed (which contains the search forms)!
* run webapp/migrate.xql or "build.sh migrate" once to transform your
existing data into XHTML
Wolfgang
> "Call to undeclared function: ft:score [at line 299, column 36]"
> whenever I do a search.
I forgot to say that you need to enable the lucene module in eXist
before you build it. Just edit extensions/indexes/build.properties:
# Lucene integration
include.index.lucene = true
and call build.sh/build.bat. After the build, you should find
exist-lucene-module.jar in $EXIST_HOME/lib/extensions from where the
AtomicWiki build script should pick it up.
Wolfgang
No, it is not properly documented yet, but I'm currently writing a
short introduction. I will paste the link here once it has been
published.
Wolfgang
http://atomic.exist-db.org/blogs/eXist/LuceneIndexModule
Wolfgang