OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: DOCBOOK-APPS: Rendering DocBook with PHP


  I just released XML_Transformer [1] 0.8, which is a PEAR [2] package
  for the PHP [3] programming language. The XML_Transformer package
  allows for the transformation of XML documents by binding PHP
  functionality to XML tags.

  This new release introduces a preliminary DocBook Namespace Handler
  that currently provides transformations for <artheader>, <article>,
  <author>, <book>, <chapter>, <emphasis> <example>, <figure>,
  <filename>, <firstname>, <function>, <graphic>, <itemizedlist>,
  <listitem>, <orderedlist>, <para>, <programlisting>, <section>,
  <surname>, <title>, <ulink> and <xref>.


    require_once 'XML/Transformer/Driver/OutputBuffer.php';
    $t = new XML_Transformer_Driver_OutputBuffer(
        'autoload' => 'DocBook'
          An Article
      <section id="foo">
          Section One
      <section id="bar">
          Section Two
          <xref linkend="foo" />


          Sebastian Bergmann: An Article
        <h1 class="title">
          Sebastian Bergmann: An Article
        <div class="section">
          <a id="foo"></a>
          <h2 class="title">
            1. Section One
        <div class="section">
          <a id="bar"></a>
          <h2 class="title">
            2. Section Two
            <a href="#foo">
              1. Section One

  Note that in the above example the XML_Transformer takes the script's
  output as its input XML document, using PHP's output buffering
  mechanism. Of course, the input XML document could alse be read from
  a file or another source.

  The XML_Transformer's DocBook Namespace Handler is not intended to
  compete with any existing processing technology for DocBook XML
  documents, like Normal Walsh's DSSSL and XSL stylesheets.

  I simply set out to work on the DocBook Namespace Handler in order
  to explore the possibilities of XML_Transformer. I'm currently
  working on a PHP and XML_Transformer based publishing framework for
  DocBook documents that offers the previously discussed user
  annotations feature. If there's enough interest in such a tool I
  will publish it as Open Source.

  [1] http://pear.php.net/package-info.php?pacid=37
  [2] http://pear.php.net/
  [3] http://www.php.net/

  Sebastian Bergmann
  http://sebastian-bergmann.de/                 http://phpOpenTracker.de/

  Did I help you? Consider a gift: http://wishlist.sebastian-bergmann.de/

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC