AxKit::XSP::Blog - XSP taglib to include Blogs (weblogs)


Blogs (weblogs),,sid9_gci213547,00.html

can carry diary-like information. The idea of this package is to access these diary entries via an DBI database and expand them into an XSP page.

How these entries find their way into the database is outside the scope of this package. (See the README in the distribution.)

XSP Tags

The package's namespace is

(Note: what is the official?)

which implies that you have to use an appropriate namespace declaration in your XSP files:

    <xsp:page xmlns:xsp=""

Inside such an XSP page you can then use the blog tag to embed weblog data:

        <b:blog src = "dbi:mysql:database=topicmaps;user=nobody;table=blogs" />

The taglib will open a database connection, will create the blog XML representation and will return that to the AxKit processor.

The following attributes can be used:


This will contain the DBI specification (DBI). Note that the string may contain table=where_are_the_blogs to change the table in which the blog entries expected. If that is missing blogs is assumed.


This attribute allows to specify a date/time in the format YYYY-MM-DD HH:MM to control which the youngest entry (inclusive) should be.


This attribute allows to specify a date/time in the format YYYY-MM-DD HH:MM to control which the oldest entry (inclusive) should be.


Controls how many entries should be returned.

url, title, description:

Control the URL, the title or the description which will appear in the outgoing blog structure (see the distribution for the Blog DTD used). If one of them is missing, then '', WebLog, No description are the default values, respectively.


    <b:blog youngest = "2002-09-25 00:00"
            oldest   = "2002-09-22 00:00"
            src      = "dbi:mysql:database=topicmaps;user=nobody;table=blogs"
            limit    = "5"
            url      = ""
            title    = "My Blog"

Database Schema

The following SQL schema is used (find a .mysql file in the distribution):

    CREATE TABLE blogs (
      id int(11) NOT NULL auto_increment,
      author varchar(128) default NULL,
      author_email varchar(128) default NULL,
      url varchar(255) default NULL,
      title varchar(128) default NULL,
      body text,
      published datetime default NULL,
      fetched timestamp(14) NOT NULL,
      remote_id varchar(128) default NULL,
      KEY id (id)


The following structure is currently used:

    <!ELEMENT xblog (head blog)>

    <!ELEMENT head  (title? url? description?)>

    <!ELEMENT blog  (day*)>

    <!ELEMENT day   (entry*)>
    <!ATTLIST day   date>

    <!ELEMENT entry (title? status? postDate? lastModified? content author_name? author_email? url?>
    <!ATTLIST entry date?


include directly blog.xml files (how to do that with SimpleTagLib?)


AxKit, Apache::AxKit::Language::XSP::SimpleTaglib, DBI


Copyright 200[2], Robert Barta <>, All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.