Forum .LRN Q&A: Re: Using Xowiki from the Learning Design Player GRAIL

Collapse
Posted by Dave Bauer on
Gustaf, of course, xowiki is very useful, I use it on pretty much every site I build. It is not necessarily the only way to get content into and out of the database. I want people to understand there is a simpler way, built into the core of OpenACS to acheive the same results without having to try to figure out how to xowiki do yet another thing.

The diff procedures are in acs-tcl
http://cvs.openacs.org/cvs/openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl?view=log

There is a plain old diff and an inline HTML diff.

Despite my prior impression, this thread has some value. I was obviously not aware of this functions (although i have changed a few lines in it). It strikes me that i must have obviously forgotten that it exists. Sounds like a sign that i should take some vacation.....

Nobody claimed that xowiki is the only way to get "things into and out from the database" (use this phrase as a placeholder for the set of related features). No doubt that for some applications it might be simpler to do whatever they want without xowiki, but there are as well some applications where it is easier to achieve the desired behavior with xowiki. This is something an application developer has to decide.

Dave, is there any documentation, on which kind of HTML input util::html_diff is supposed to work? The simple example

util::html_diff -old "<a href='.'>x</a>" -new "<a href='.'>x</a>"

returns invalid HTML:

<a href='.'> x </span>

If you look at the code, it is clear why (see the final string map). The following trivial example leads to a tcl-error:

util::html_diff -old "ppp" -new "ppp xxx"

which is easy to fix. But nevertheless, I get certain doubts that this code is tested and in use by any application with HTML.

-gustaf

Just a followup to my own posting: i fixed three bugs in util::html_diff (see commit log http://cvs.openacs.org/cvs/openacs-4/packages/acs-tcl/tcl/util-diff-procs.tcl?view=log) and commited to CVS HEAD. For some random examples, the output seems now quite ok. I'll add some optional support to xowiki to use it.

However, i noticed that tagging of acs-tcl/tcl/util-diff-procs.tcl is unusual/strange/wrong. Although this file is in CVS HEAD, it is tagged with openacs-5-4-compat; as a consequence, it does not show up in a checkout with tag oacs-5-4, but it will be contained in "install/update" from repository. Not sure, who has tagged it with which intentions. Maybe the goal was to include it in oacs-5-4?