1. Generic
    1. Where do I get it? How do I install it?
    2. What do I use it for?
    3. Why do I want to use it?
  2. Specific
    1. Do I really have to have a database to use this?
    2. Doesn't this break the notion of 'presentation/logic seperation'?
    3. What are the alternatives?
    4. Is this available for ActiveState Perl?
    5. Was DBIx::XHTML_Table used to create this site?
  3. Definintions
    1. Perl
    2. CPAN
    3. XHTML
    4. Database
    5. SQL
    6. DBI
    7. XML
    8. XSL

Where do I get it? How do I install it?

DBIx::XHTML_Table is available at CPAN or any of the many CPAN mirrors. Find out more at the Download page.

The instructions are bundled with the code and can be viewed on your own computer with perldoc. I do mirror them on a regular basis here at this site: Docs.

What do I use it for?

If you have ever found yourself writing Perl code to wrap a database select query in HTML table tags, then this is the module for you. All you need to do is specify the query and how you want to format your table tags, DBIx::XHTML_Table will handle the rest.

Why do I want to use it?

Because you are working on a prototype and you want to get it done quick. DBIx::XHTML_Table is great for 'quick and dirty' applications and prototypes.

Do I really have to have a database to use this?

No, but it is recommended. Besides, that's what DBIx means: DBI eXtension. See the cookbook for examples of how to use DBIx::XHTML_Table without a database.

Doesn't this break the notion of 'presentation/logic seperation'?

Yes it does, but, the purpose of DBIx::XHTML_Table is for 'quick and dirty' applications and prototypes. Seperation of presentation from logic takes time and planning, DBIx::XHTML_Table is for those times when you don't have much time and have little planning. When you do have the luxury of being able to do it the 'right way' see below for alternatives.

What are the alternatives?

Templating modules: my favorite alternative is HTML::Template, available at the CPAN as well. Also available is the more powerful and more complex Template-Toolkit.

Another alternative is XML in conjunction with XSL. the CPAN module XML::Generator::DBI can be used to transform your database query into XML and the XML::Filter::XSLT module will transform that into HTML.

Is this available for ActiveState Perl?

No. Sorry, I have not packaged this as a PPM yet.

Was DBIx::XHTML_Table used to create this site?

The table on front page, the Tutorial, and the Cookbook all use DBIx::XHTML_Table to produce their example tables.


(taken from whatis.com)

Perl (Practical Extraction and Reporting Language) is a script programming language that is similar in syntax to the C language and that includes a number of popular UNIX facilities such as sed, awk, and tr. Perl is an interpreted language that can optionally be compiled just before execution into either C code or cross-platform bytecode . When compiled, a Perl program is almost (but not quite) as fast as a fully precompiled C language program. Perl is regarded as a good choice for developing common gateway interface (CGI ) programs because it has good text manipulation facilities (although it also handles binary files). It was invented by Larry Wall.

In general, Perl is easier to learn and faster to code in than the more structured C and C++ languages. Perl programs can, however, be quite sophisticated. Perl tends to have devoted adherents.


(taken from CPAN)

CPAN is the Comprehensive Perl Archive Network, a large collection of Perl software and documentation. You can begin exploring from either http://www.cpan.org, http://www.perl.com/CPAN, or any of the mirrors listed at http://www.cpan.org/SITES.html and http://mirror.cpan.org.

Note that CPAN is also the name of a Perl module, CPAN.pm, which is used to download and install Perl software from the CPAN archive.


(taken from whatis.com)

As the World Wide Web Consortium (W3C) describes it, XHTML (Extensible Hypertext Markup Language) is "a reformulation of HTML 4.0 as an application of the Extensible Markup Language (XML )." For readers unacquainted with either term, HTML is the set of codes (that's the "markup language") that a writer puts into a document to make it displayable on the World Wide Web. HTML 4 is the current version of it. XML is a structured set of rules for how one might define any kind of data to be shared on the Web. It's called an "extensible" markup language because anyone can invent a particular set of markup for a particular purpose and as long as everyone uses it (the writer and an application program at the receiver's end), it can be adapted and used for many purposes - including, as it happens, describing the appearance of a Web page. That being the case, it seemed desirable to reframe HTML in terms of XML. The result is XHTML, a particular application of XML for "expressing" Web pages.

XHTML is, in fact, the follow-on version of HTML 4. You could think of it as HTML 5, except that it is called XHTML 1.0. In XHTML, all HTML 4 markup elements and attributes (the language of HTML) will continue to be supported. Unlike HTML, however, XHTML can be extended by anyone that uses it. New elements and attributes can be defined and added to those that already exist, making possible new ways to embed content and programming in a Web page. In appearance, an XHTML file looks like a somewhat more elaborate HTML file.


(taken from whatis.com)

A database is a collection of data that is organized so that its contents can easily be accessed, managed, and updated. The most prevalent type of database is the relational database, a tabular database in which data is defined so that it can be reorganized and accessed in a number of different ways. DBIx::XHTML_Table was designed to interact with relational databases.


(taken from whatis.com)

SQL (Structured Query Language) is a standard interactive and programming language for getting information from and updating a database. Although SQL is both an ANSI and an ISO standard, many database products support SQL with proprietary extensions to the standard language. Queries take the form of a command language that lets you select, insert, update, find out the location of data, and so forth, but you should only use select queries with DBIx::XHTML_Table, even though you are allowed to use any SQL that your database vendor supports.


(taken from CPAN)

The DBI is a database access module for the Perl programming language. It defines a set of methods, variables, and conventions that provide a consistent database interface, independent of the actual database being used.

It is important to remember that the DBI is just an interface. The DBI is a layer of "glue" between an application and one or more database driver modules. It is the driver modules which do most of the real work. The DBI provides a standard interface and framework for the drivers to operate within.


(taken from whatis.com)

XML (Extensible Markup Language) is a flexible way to create common information formats and share both the format and the data on the World Wide Web, intranets, and elsewhere. For example, computer makers might agree on a standard or common way to describe the information about a computer product (processor speed, memory size, and so forth) and then describe the product information format with XML. Such a standard way of describing data would enable a user to send an intelligent agent (a program) to each computer maker's Web site, gather data, and then make a valid comparison. XML can be used by any individual or group of individuals or companies that wants to share information in a consistent way.

XML, a formal recommendation from the World Wide Web Consortium (W3C), is similar to the language of today's Web pages, the Hypertext Markup Language (HTML). Both XML and HTML contain markup symbols to describe the contents of a page or file. HTML, however, describes the content of a Web page (mainly text and graphic images) only in terms of how it is to be displayed and interacted with. For example, the letter "p" placed within markup tags starts a new paragraph. XML describes the content in terms of what data is being described. For example, the word "phonenum" placed within markup tags could indicate that the data that followed was a phone number. This means that an XML file can be processed purely as data by a program or it can be stored with similar data on another computer or, like an HTML file, that it can be displayed. For example, depending on how the application in the receiving computer wanted to handle the phone number, it could be stored, displayed, or dialed.


(taken from whatis.com)

XSL (Extensible Stylesheet Language), formerly called Extensible Style Language, is a language for creating a style sheet that describes how data sent over the Web using the Extensible Markup Language (XML ) is to be presented to the user. For example, in an XML page that describes the characteristics of one or more automobiles for an insurance company, a set of open and close tags might contain the name of an auto manufacturer. Using XSL, you could tell the Web browser that the auto manufacturer name should be displayed, where to display it on a page, and that it should be displayed in a bold font. XSL is based on and extends the Document Style Semantics and Specification Language (DSSSL) and the Cascading Style Sheet, level 1 (CSS1) standards.

Think of an XML page as similar to an HTML page (like the one you are reading now), but containing data in identified fields rather than text and graphics. XSL gives a developer the tools to describe exactly which data fields in an XML file to display and exactly where and how to display them. Like any style sheet language, XSL can be used to create a style definition for one XML document or reused for many other XML documents.