[libvirt] Generating our docs/search.php with xsltproc

Martin Kletzander mkletzan at redhat.com
Wed Aug 1 16:19:46 UTC 2012


Hi everyone.

TL;DR is there a way to keep PHP code untouched in XSL transformed XML?

For a while now, I'm trying to make our 'search.php' file generated like
all the '*.html' files (with all the fancy stuff like up-to-date menu,
headers and so on).

The problem I've been facing looks like an easy and doable thing /at
first/, but every normal approach I tried didn't work. I'm most probably
doing something wrong. I haven't used XSLT that much and this is very
badly google-able topic as lots of people are using XSL transformation
*inside* PHP and mangling the search results in their benefit.
I tried:
 - using CDATA
 - transforming the code with various elements
 - turning off output escaping
 - putting the code into another element
 - various combinations of previous things
 - and few others

Now it looks like the only option is to put the code part into another
file and inject it after the transformation, which is ugly, because it
means lots of modification (and unnecessary lines of code) for one file
(even though it would be applicable for all /possible/ future scripts).

I know this is not the best place to ask this question, but since we
have the web page generator using XSLT *and* it is for libvirt's
benefit, someone on the list might help me.

Thanks for any hints,
Martin




More information about the libvir-list mailing list