Action against software patentsGNOME2 LogoW3C logoRed Hat Logo
Made with Libxslt Logo

The XSLT C library for GNOME

The programming API

Main Menu
Related links
API Indexes

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

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

  1. configure the parser for XSLT:


    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.

Daniel Veillard