List Info

Thread: Processing DocBook XSL with PHP




Processing DocBook XSL with PHP
user name
2007-06-13 21:15:38
Hi all.  I have a DocBook / DocBook XSL project that I've
been maintaining for 
a number of years.  The build toolchain is the usual
Java/Apache suspects: 
Saxon, Xerces, XIncluder, ant.  Unfortunately, it seems
every time I sneeze I 
run into some sort of brokenness with class paths or
something not being the 
right version or who knows what else, and not being a Java
person it always 
takes me forever to fix it.  This time rather than trying to
fix it I want to 
try replacing it.

Has anyone here used PHP for processing DocBook?  PHP 5
supports native XSL 
transformations[1], and apparently can process XInclude
statements[2].  It 
also sometimes has EXSLT support[3].  Googling, I've found a
few references 
to some people processing DocBook with PHP, but nothing on
how they actually 
did it.  All of the PHP/XSLT stuff I've found is trivial
intro code examples.

The main things I need are:

- XInclude support.
- Multi-file output.  Right now I'm using the <?dbhtml
?> directive to control 
that, but I am willing to change that if it makes it
easier/possible.
- Something that involves fewer than 15 components that
break every time it 
rains. 

Does anyone have any practical experience they are able to
share?  This is all 
offline processing on my own system.

-- 
Larry Garfield			AIM: LOLG42
larrygarfieldtech.com		ICQ: 6817012

"If nature has made any one thing less susceptible than
all others of 
exclusive property, it is the action of the thinking power
called an idea, 
which an individual may exclusively possess as long as he
keeps it to 
himself; but the moment it is divulged, it forces itself
into the possession 
of every one, and the receiver cannot dispossess himself of
it."  -- Thomas 
Jefferson

------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org


Re: Processing DocBook XSL with PHP
user name
2007-06-14 07:06:34
Larry Garfield wrote:

> The main things I need are:
> 
> - XInclude support.
> - Multi-file output.  Right now I'm using the
<?dbhtml ?> directive to control 
> that, but I am willing to change that if it makes it
easier/possible.

PHP uses libxslt for XSLT processing, and DocBook
stylesheets works with
xsltproc, so there shouldn't be problems.

> - Something that involves fewer than 15 components that
break every time it 
> rains. 

Well, I wouldn't say that XML support in PHP is without
problems, but
majority of problems was solved in PHP5.1. Once there will
be Unicode
support in PHP, we can consider PHP enough mature to
seriously process
XML content. 

-- 
------------------------------------------------------------
------
  Jirka Kosek      e-mail: jirkakosek.cz      http://xmlguru.cz
------------------------------------------------------------
------
       Professional XML consulting and training services
  DocBook customization, custom XSLT/XSL-FO document
processing
------------------------------------------------------------
------
 OASIS DocBook TC member, W3C Invited Expert, ISO JTC1/SC34
member
------------------------------------------------------------
------
Be in, register for XML Prague 2007 today! http://www.xmlprague.cz

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )