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 from designing VHF aerials through to computer processor hardware and software; I am now a professional music engraver, bassoonist and publisher, something I did as a hobby during my working life (although a recent accident has curtailed my playing somewhat). I started Paloose to keep myself amused and to support Hop Vine Music and various other sites.

What other software projects do you author?

AntWeave. I have always been interested in literate programming ever since Donald Knuth created the first weave/tangle WEB system for producing TeX and Metafont. AntWeave is an implementation of the NoWeb literate-programming tool originally designed by Norman Ramsey. I have used NoWeb on many projects in the past to great success and recently wanted to revive my use of the system. Rather than use a standalone program (as the original one NoWeb does) it is based on a Java and XML/XSL approach and runs as a Task within the Ant build system. By using this approach it is completely universal on any system that supports Ant (and by implication Java and Java-XML). It removes the necessity to build system specific version of the original noweave and notangle processors; which can be a tricky process when starting from scratch without the required binaries.

The main AntWeave site is here where you can download the latest version.

It can be also downloaded from a BitBucket repository. Feel free to contribute — please contact me if you want to.

And no ... Paloose wasn't written using NoWeb format source files; there were (historical) reasons — I wrote Paloose first and I am not going to rewrite nearly 50,000 lines of code using literate programming.

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 USA, indeed, with some people, it is a derogatory term. However, it occurred to me that a simple change of letter would give "Paloose", which can be 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 had a fine American Quarter Horse named "Fred" (born 2005, his dad is Double Tough Harlan from Pawnee, Oklahoma). Unfortunately I had an irritating accident in 2019 that has kept me in a wheelchair so I do not ride any more.

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. I use this Paloose on my local servers and have no plans (yet) to upgrade to Cocoon. Paloose should 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, and my thanks to the folks at oXygen who have supported my various open source projects by supplying me with this licence. Whenever I have XML/XSL to develop their editor 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.

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. As part of this I am adding extra transformers to support the functionality of PCMS — these extra transformers are generally not supported by Cocoon.

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 the original 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. I also wrote a suitable converter to transfer my electronic notebooks (within the Paloose CMS system) to output a suitable LaTeX version.

What systems will it run on?

With the latest versions of Paloose (1.19.x) PHP 7 or above is required. I have run it within the MAMP-PRO server on a M2 MacMini with MacOS 13.5 (Ventura) with no problem, as well as a MacMini (2009) running High Sierra. Providing the system uses the appropriate version of PHP there should be no problem, either with Linux or Windows.

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 hsad 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 that influenced, 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 and rejecting 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 JXForms. 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.

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 fairly easy with the only major change being the sitemap components. But beware, the Password, Gallery and PageHit transformers will not directly work unless you write your own in Java.

There are also some relatively trivial changes since version 1.13.0 within the serializer definitions in the sitemaps. Please read the documentation to avoid nasty surprises.

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 mobile browsers?

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

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.

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.

Why do you not use schemas for the sitemaps?

This is a fairly contentious subject. Sitemaps are built in such an 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. I do have an experimental schema that i tinker with but I suspect is not complete for all variations of possible sitemaps.

The closest that I got to producing one used the Document Structure Description 2.0 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, but that is another story), all of which can be found on the DSD-2 home page.

However I have produced a set of RELAX NG schemas for the current version of Paloose sitemaps. It has not been extensively tested, although I have run several sitemaps past it, including one CMS system based on Paloose, and it seems ok (so far). They are bundled with the current Paloose distribution files on the download page. If you just want to see their structure then they are bundled with the Paloose distro as well. Remember that these are definitely work in progress so they provided "as is" for anyone to experiment with. They are in folders within Paloose, "paloose/resources/schemas"

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.

Technical Trivia

The code that builds Paloose is a little rough and ready in places. This was 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, Coral66, Algol68, PL/1, Pascal, Java, JavaScript, Objective-C, and more recently Swift — as well as more obscure offerings such as OmniMark, ELLA, Abel and TeX. I have used 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 PHP would let me use one; never mind — it suffices, the future will refine the code.

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