Gnome LogoRed Hat Logo

The XSLT C library for Gnome

libxslt

Introduction

This document describes libxslt, the XSLT C library developped for the Gnome project.

Here are some key points about libxslt:

Documentation

There are some on-line resources about using libxslt:

  1. Check the API documentation automatically extracted from code comments (using gtk doc).
  2. Look at the mailing-list archive.
  3. Of course since libxslt is based on libxml, it's a good idea to at least read libxml description

Reporting bugs and getting help

Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the Gnome bug tracking database (make sure to use the "libxslt" module name). I look at reports there regularly and it's good to have a reminder when a bug is still open. Check the instructions on reporting bugs and be sure to specify that the bug is for the package libxslt.

There is also a mailing-list xslt@gnome.org for libxslt, with an on-line archive. To subscribe to this list, please visit the associated Web page and follow the instructions.

Alternatively, you can just send the bug to the xslt@gnome.org list, if it's really libxslt related I will approve it..

Of course, bugs reports with a suggested patch for fixing them will probably be processed faster.

If you're looking for help, a quick look at the list archive may actually provide the answer, I usually send source samples when answering libxml usage questions. The auto-generated documentation is not as polished as I would like (I need to learn more about Docbook), but it's a good starting point.

How to help

You can help the project in various ways, the best thing to do first is to subscribe to the mailing-list as explained before, check the archives and the Gnome bug database::

  1. provide patches when you find problems
  2. provide the diffs when you port libxslt to a new platform. They may not be integrated in all cases but help pinpointing portability problems and
  3. provice documentation fixes (either as patches to the code comments or as HTML diffs).
  4. provide new documentations pieces (translations, examples, etc ...)
  5. Check the TODO file and try to close one of the items
  6. take one of the points raised in the archive or the bug database and provide a fix. Get in touch with me before to avoid synchronization problems and check that the suggested fix will fit in nicely :-)

Downloads

The latest versions of libxslt can be found on xmlsoft.org or on the Gnome FTP server either as a source archive or RPM packages. (NOTE that you need the libxml2, libxml2-devel, libxslt and libxslt-devel packages installed to compile applications using libxslt.)

Contribs:

I do accept external contributions, especially if compiling on another platform, get in touch with me to upload the package. I will keep them in the contrib directory

Libxslt is also available from CVS:

News

CVS only : check the Changelog file for a really accurate description

0.8.0: Apr 22 2001

0.7.0: Apr 10 2001

0.6.0: Mar 22 2001

0.5.0: Mar 10 2001

0.4.0: Mar 1 2001

0.3.0: Feb 24 2001

0.2.0: Feb 15 2001

0.1.0: Feb 8 2001

0.0.1: Jan 25 2001

The xsltproc command

This program is the simplest way to use libxslt from the command line, it takes as first argument the path or URL to an XSLT stylesheet. the next arguments are filenames or URIs of the inputs to be processed. The output of the processing is redirected on the standard output.

The programming API

Okay this section is clearly incomplete. But integrating libxslt into your application should be realitively easy. First check the few steps described below, then for more detailed informations, look at the generated pages for the API and the source of xsltproc.c .

Basically doing an XSLT transformation can be done in a few steps:

  1. configure the parser for XSLT:

    xmlSubstituteEntitiesDefault(1);

    xmlLoadExtDtdDefaultValue = 1;

  2. parse the stylesheet with xsltParseStylesheetFile()
  3. parse the document with xmlParseFile()
  4. apply the stylesheet using xsltApplyStylesheet()
  5. save the result using xsltSaveResultToFile() if needed set xmlIndentTreeOutput to 1

Steps 2,3, and 5 will probably need to be changed depending on you processing needs and environment for example if reading/saving from/to memory, or if you want to apply XInclude processing to the stylesheet or input documents.

Contributions

Daniel Veillard

$Id: xslt.html,v 1.15 2001/04/22 20:31:12 veillard Exp $