SourceFiles.org - Use the Source, Luke
Home | Register | News | Forums | Guide | MyLinks | Bookmark

Related Sites

Latest News
  General News
  Reviews
  Press Releases
  Software
  Hardware
  Security
  Tutorials
  Off Topic


Back to files

Virgule - XML Virgule Language Scripting Interpreter

This is virgule, the source code for the virgule scripting engine.

Raph originally released mod_virgule under the GPL, with the hope that members of the free software community will:

  • Enhance Advogato.
  • Develop mod_virgule as a generic tool for creating community web sites.
  • Learn from mod_virgule's design and implementation, which is unusual in a number of respects.

virgule is implemented as an Apache C module, using libxml to store the state as a XML files in the filesystem. There is an abstraction layer, however, which means that using a different backend (such as a "real" database) will be possible in the future.

[lkcl 6jun2001: given that the combination of using the native filesystem (files and directories) and XML for file content is now proven to be very robust, this isn't likely to happen in a hurry.]

The process of turning the hard-coded c of the original mod_virgule is progressing well, including splitting the virgule engine into a separate, generic command-line tool.

Luke Kenneth Casson Leighton
25th October 2000

Well, I read this file for the first time, today, after working with mod_virgule for the last four months. I am pleased to say that Raph's hopes are being fulfilled, not just by me.

I can attest to mod_virgule's design being unusual (although my experience of working with apache modules is limited to just this one!), with the enhancements I have been adding, it is even more unusual, having almost turned into a basic scripting language (oh, no, not another one).

some specific enhancements. PLEASE NOTE THAT A LOT OF THESE ARE INCOMPATIBLE WITH THE OLD MOD_VIRGULE:

  • generic XMLising - lots of it. for example, xml schema files are used to specify the format of xml files [plan B: use a standard templating format!].
  • removal of hard-coded font stuff [lucida isn't everyone's taste, although i personally really like it].
  • addition of a few extra extension types [hard-coded]: .jpeg, .img and .css are a few.
  • file include facility, which has been ... urr ... extended to allow... it's a little complicated to explain, but it is possible to do a simultaneous walk of nodes in an xml database file using an xml schema file as the format-guide for the database, and then for every (or a selected) node in the database file, action an "include" file, with a substitution of the values in the database node into locations specified in the "included" file.

    in this way, it is possible to generate a form to edit an xml database. the form to be presented to the web-user is specified in the "include" file. the schema tells you the format of the xml database file. you then hit the Update button (if you put one in the form!), and the walk-through process occurs all over again, but this time with a different include file, with the result being that the values input into the html form are stored in the correct location in the xml database file.

    well, i did say it was complicated to explain!!!

    at the moment, then, mod_virgule can be used to do XML database editing. i will be extending this later on to be able to use mod_virgule as a free-form XML editor.

  • capability to create and use more than one Certification type, stored in [yep, you guessed it] xml files.
  • groups, or more specifically, forums.
  • messages - similar to diary entries, except they can be sent to anyone. [there is a very basic mechanism by which it is possible to stop people sending you messages].
  • enhancements to the trust metric system to make it more robust. under the old mod_virgule system, the number of certifications required from anyone else at an existing level to take you to a level is just one.

    with the new scheme (which raph and i thrashed out: i got to implement it as an encouragement to understand net_flow.c :-), the number of certifications required must be greater or equal to a certain number, where the number required is stored in [surprise, surprise] xml files on a per-cert-level basis.

    [lkcl 6Jun2001: well, it has bugs, but is disabled. i've been working on http://sourceforge.net/projects/pymmetry and the task i set - to make trust metrics more robust - is trickier than i thought. ah well :) ]

Luke Kenneth Casson Leighton
3 Oct 2000

configure

Added GNU autoconf support. mod_virgule is now compiled with:

        ./configure
        make
        make install

In particular, I liked the way that glibc has a --enable-add-ons option, which fits with the principles behind the extended mod_virgule (i.e. you can add your own functionality). If you wish to add your own <tagsupport/> then create a subdirectory, make sure that there is a Makefile.in in it, and then either do ./configure --enable-add-ons=yourmodule or, like in glibc, just do ./configure --enable-add-ons and the Makefile.in files will automatically be detected.

Keynote

An article by advogato on advogato.org pointed out the existence of Keynote (http://www.cis.upenn.edu/~keynote). In order to add Keynote support, you will need to do this:

        ./configure --enable-add-ons=keynote
        make

This assumes that you have:

  1. compiled Keynote or...
  2. compiled Keynote with Crypto support [see Keynote HOWTO, which includes installing SSL or OpenSSL].
  3. copied libkeynote.a into /usr/local/lib or thereabouts
  4. copied keynote.h into /usr/local/include or thereabouts

If you don't want Crypto support, which if you do not want Digital Signing (or if your country does not allow you to use, import, display, write, modify, distribute, perform derivate works of, deface etc. anything remotely resembling Cryptographic Material), you don't have to have. You will need to do this:

        ./configure --enable-add-ons=keynet --without-crypto
        make

[btw "thereabouts" in c) and d) means, you will need to put the keynote library and header files somewhere in your compile path, because keynote doesn't do this for you, as of version 2.3].

Luke Kenneth Casson Leighton
14 Oct 2000

Moved over to a separate executable for the scripting engine. Added domain sockets capability so that mod_virgule can interface to it via that. mod_virgule can then be stripped down to a few hundred lines of code, and more importantly, a security review will be a lot easier and simpler [run the scripting engine in a chroot jail, run mod_virgule as normal: it's only 400 lines, 150 of which are comments].

Luke Kenneth Casson Leighton
23 Oct 2000

Investigated APR lib, which i had been meaning to do for a while. xvl now uses APR - i tested with 2.0a9. Some of the code that had to be cut over from apache 1.3.14 now goes: it was hacked about and down-to-size anyway.

This will make integration into Apache 2.0 as either a stand-alone executable or as an apache module (similar to the php executable and mod_php) a great deal simpler.

Luke Kenneth Casson Leighton
6 Jun 2001


Other Sites

Discussion Groups
  Beginners
  Distributions
  Networking / Security
  Software
  PDAs

About | FAQ | Privacy | Awards | Contact
Comments to the webmaster are welcome.
Copyright 2006 Sourcefiles.org All rights reserved.