Frequently Asked Questions

About the author

The Paloose project is currently run by me, Hugh Field-Richards. I recently retired after a (too) long career designing (amongst other things) computer hardware and software; I am now a professional music engraver, something I did as a hobby during my working life. I started Paloose to keep myself amused and to support my other interest, Hop Vine Music.

What's with the name?

The original name I chose was "Papoose"; in the UK this is defined as "... a type of bag used to carry a child on the back". Unfortunately it does not seem have this meaning in the US, indeed, with some people, it is a derogatory term. However, it occurred to me that a simple change of letter would give "Paloose", which is another term for the Appaloosa horse.

This is something dear to my heart as, until recently, I was privileged to have one of my own ('Zitty') who I rode until she reached the grand old age of 29 and then became a "house pet" until she died aged 33. I now have a fine quarter horse named "Fred" (Harlan Breeze, born 2005) who is coming along nicely as a promising Western horse.

'Zitty'
Harlan Breeze
               'Fred'

What future for Paloose?

Paloose is released under the GPL-3. If anyone wishes to get involved then please EMAIL me. I intend to use it for all my small sites and will continue to do so until Cocoon is supported by the smaller ISPs that I use. It is also interesting (and slightly depressing) that the latest Cocoon does not seem to be as easy to use as Cocoon Version 2.1.x. I use this latter version on my local servers and have no plans (yet) to upgrade to Cocoon Version 2.2 or later. While I am prepared to admit that this is my problem, I know others who have had the same experience. As a result perhaps Paloose will fulfil the requirements of those who want a quick Cocoon-like engine for their small Web sites.

What editor/IDE do you use to develop Paloose?

From the start of Paloose I have always used the oXygen XML editor and IDE. I used it as part of my work before I retired and started Paloose. I had been involved with SGML and XML for many years and oXygen had always been the editor I turned to. When I wanted a suitable system to develop Paloose the choice became a "no-brainer" and I obtained a suitable licence. Whenever I have XML/XSL to develop it is the one I turn to. Having it syntax aware of PHP, CSS and other languages is a real bonus.

Oxygen XML Editor

What Licence is Paloose issued under?

Paloose is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Paloose when you downloaded it. If not, see http://www.gnu.org/licenses/

What facilities do you intend to add to Paloose?

This is quite a difficult question as I have limited time and am not trying to do a complete Cocoon implementation in PHP5 — a pointless exercise anyway. Now that I have added a simple (limited) data caching scheme to the pipeline all of what I intended to add is complete. I am gradually refining the code and improving the documentation and comments. I am happy to look at anything that users suggest — just EMAIL me at hsfr@hsfr.org.uk and may add a further wrapper for Content Management Systems such as Joomla!.

Just for fun I am making a CMS system based on Paloose. It is about 50% finished and I only work on it when I am not doing else so it may take some time.

Can I use the Paloose logo on my site?

Yes please. I suggest the following "Powered by Paloose" logo or the smaller version. Scale it as you feel fit.

Do you intend to add PDF support via FOP?

The short answer to this is: no. It would mean writing a complete XSL-fo system in PHP5 which is something I really do not have the time (or inclination) to do. If you really want to produce PDF output then I suggest that you write a suitable XML to LaTeX transformer and then run that to get PDF.

I wrote a transformer (XML to LaTeX) to produce a paper PDF copy of this Paloose documentation Web site which runs within an Ant build file. It is not particularly difficult to generate XML to LaTeX transformers, although obviously it requires a knowledge of LaTeX. I would be happy to help anyone who has a problem.

What systems will it run on?

Basically any system that will run PHP5. Currently the list is Mac OS-X, Linux, and other similar Unix systems. I also know of a system based on Apache 2.0/PHP5 on Windows Server 2003.

Why don't you use SAX, like Cocoon, instead of DOM?

I thought about this quite hard initially. I concluded that using a DOM approach was far simpler. It has the penalty of being slower but Paloose is only intended for small volume/traffic sites and ultimate performance is not such an issue. I have seen no reason to revise this decision in the light of typical site usage. Changing to a SAX approach would mean a major code change and I really do not have the time at present as my Music Publishing venture (Hop Vine Music) and my horses have more call on my time.

How can I improve the performance of Paloose?

Assuming that you are already using the caching system and want more speed, it is possible, but at the expense of a little effort (and possible obscurity), to tailor the Paloose code and your own sitemaps and XSL. The implications and method are described on a separate page of the documentation in more detail.

What about caching in Paloose?

I have done considerable work on various ways of caching within Paloose and versions after 1.3.0 use pipeline data caching on certain generators and transformers. I confess that I am in a quandry over this as the gains from using a cache seem to be minimal and not really worth the effort except in some key cases — see my caching discussion for more on this. It is not the end of the story, but more performance increases will probably come from elsewhere.

Why did you not use CForms and JavaScript for flows?

It is useful to provide some background to some of the decisions that I made for flows and forms. This is where Paloose diverges from Cocoon most. The latter is based on Java and Javascript which was not available to me (conceptually, not practically, as Paloose is based solely on PHP5). Thus I had to base what I did on a pure PHP approach while including the concepts of Cocoon flows and forms. I made several false starts which arose from several design problems:

All of these problems seemed intractable at first with decisions made about one influencing, detrimentally, a decision made elsewhere. Mirroring the Cocoon forms template, CForms was initially desirable for commonality with Cocoon. But it soon became apparent that this was going to make the whole approach far too complicated for what I wanted. Much code was wasted in exploring this but I believe it was the right decision. In the end I based the Paloose forms (PForms) on the JXForms that older version of Cocoon used. (I had produced some sites with this in the past so I was reasonably familiar with it). PForms is not radically different from JXForms but it does not slavishly follow the latter. I believe that PForms is suitable for the restrictions I had set on Paloose and, as I have said elsewhere, if you have a site that requires all the facilities of CForms then you should probably be using Cocoon anyway.

Once I had settled on PForms there was the problem of how to implement the flow script, which in Cocoon uses Javascript. The Cocoon approach is to take a "snapshot" of the Javascript engine (a simplistic way of describing it) in order to maintain continuity between client requests. I was unable to find a sensible way of doing this with PHP5 (which does not mean to say that one does not exist). So I had to find a means of providing the user with a simple method of continuations based solely on a PHP5 approach. I believe I have achieved this while keeping to the spirit of Cocoon.

All these solutions, however successful, have made me diverge from the strict Cocoon approach so please read the documentation very carefully.

Who designs your own sites that use Paloose?

These have been done by my son Ian Field-Richards who is the GUI art director for DeviantArt and I am very grateful to him for the help he has given me in their design. However I have to take the blame for the Paloose site: any good points are due to him, the bad ones are all mine.

How do I generate multiple selection lists in PForms from SQL entries?

The addition of a simple transformer is all that is necessary; it is explained in more detail on this How-to.

How do I port Paloose Sites to Cocoon?

This is very easy with the only major change being the sitemap components. See this How-to for more information. But beware, the Password, Gallery and PageHit transformers will not work unless you write your own in Java.

How do I port Cocoon Sites to Paloose?

This is really just the reverse of the above. The only issue might be one of performance so it is worth bearing in mind that Paloose is obviously slower than Cocoon.

How do I write Components for Paloose?

I have written an example component here (tgz) that is a "template" for writing generator, transformer and serializer components; also included is an example exceptions class used by the template. Current releases of Paloose include it in the folder resources/templates/. Also have a look at the various existing components that make up Paloose.

Do you have any support for iPhone?

Yes. The browser selector can detect the iPhone to allow separate pipelines to be run.

Help! I have tried everything but I am still getting page not found.

The usual problem here that you have not set up the .htaccess file up correctly. Remember that Apache will serve all your requests, including ones that are destined for Paloose unless you tell it otherwise. For example if you want requests for, say, http://<hostname>/<site-path>/file.asm, to be processed by Paloose then you would have to add the following line into your .htaccess file:

RewriteRule (.+)\.asm paloose.php?url=$1.asm [L,qsappend]

Remember though that the one type of file extension that this method does not handle is PHP, so putting

RewriteRule (.+)\.php paloose.php?url=$1.php [L,qsappend]

in the .htaccess file will cause an infinite loop.

Help! Why am I getting "Class 'XsltProcessor' not found" errors

99% of the time this shows that you are running PHP5 without the XML/XSL support that there should be. Try recompiling PHP5 with the following configuration parameters included

--with-xml --with-libxml-dir=<dir path> --with-xsl

Help! Why am I getting "Parse error: syntax error, unexpected '=', expecting '(' in /../../paloose/lib/Paloose.php on line xx" errors

This means you are still running PHP4. You need to run PHP5. Speak to your ISP to provide PHP5. The other reason may be that your .htaccess file has not been set properly to use PHP5.

Help! Why am I getting "Input file not found" as the only browser output?

See FAQ entry about the .htaccess file, this is the usual problem. Also make sure that you do not overwrite a system .htaccess that is required. That is why it is best to have your site in a separate folder.

Are there schemas for the XML used in this site?

Yes the basic schema is written in RELAX NG. They are not an essential to running Paloose or understanding, they are merely given out of interest; although I would urge the use of schemas to reduce errors in your XML files. The primary page schema is page.rng. They are pretty versions of the raw RELAX NG which are easier to read. If anyone would like a copy of the transforms necessary to produce the pretty-printed version please EMAIL me and I will consider putting them up as a download.

Why do you not use schemas for the sitemaps?

This is a fairly contentious subject. Sitemaps are built in such expandable form that producing a schema in something like RELAX NG or XML-Schema is very difficult — they simply do not have a rich enough structure to do what I think is necessary without having to use Schematron additions. The closest that I got to producing one used DSD-2. I wrote an extensible set of schemas which worked fine, but are now sadly out of date. I also produced schemas for Dublin Core, Jakarta Ant and RDF (although RDF is a major problem because it is impossible to write a universal validating XML schema for it — it ain't the right sort of grammar and the current 2004 specification for RDF is flawed), all of which can be found on the DSD-2 home page. DSD-2 is the best schema language we never had, sad ....

Technical Trivia

The code that builds Paloose is a little rough and ready in places. This is my first PHP program (other than the odd embedded line within HTML) and it shows. I am more used to program in strongly typed languages having had a lifetime using Algol, Coral, Algol68, Pascal, Java at al; as well as more obscure offerings such as OmniMark, ELLA, Abel, TeX. I have programmed in Perl for many years and so PHP was not a wholly new experience. I am sure that I have used 10 lines in places where PHP5 would let me use one; never mind — it suffices, the future will refine the code.

Copyright 2006 – 2011 Hugh Field-Richards. All Rights Reserved.