problem with XML

#1
Hello

I have problem with XML, its not working.
I'm using LiteSpeed/2.0RC3 Standard
I have 2 files:
baza.xml said:
<?xml version="1.0" encoding="ISO-8859-2"?>
<?xml-stylesheet type="text/xsl" href="3.xsl"?>
<baza>
<osoba plec="M" hobby="samochody" sport="kosz" chory="glowa">
<imie>Łukasz</imie>
<imie>Jerzy</imie>
<imie>Izydor</imie>
<nazwisko>Budnik</nazwisko>
<data_ur>1983-03-07</data_ur>
<miejsce_ur>Wejherowo</miejsce_ur>
</osoba>
<osoba plec="K" hobby="komputery" sport="lyzwy">
<imie>Kasia</imie>
<imie>Kaśka</imie>
<imie>Kasiunia</imie>
<nazwisko>Skowrońska</nazwisko>
<data_ur>1983-03-07</data_ur>
<miejsce_ur>Poznań</miejsce_ur>
</osoba>
</baza>


3.xsl said:
<?xml version="1.0" encoding="ISO-8859-2"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:eek:utput method="html"/>
<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="baza">
<html>
<body>
<table align="center" border="1">
<tr>
<th>Płeć</th>
<th>Imię</th>
<th>Nazwisko</th>
<th>Data urodzenia</th>
<th>Miejsce urodzenia</th>
<th>Ulubiony sport</th>
<th>Hobby</th>
</tr>
<xsl:apply-templates/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="osoba">
<tr>
<td>
<xsl:value-of select="@plec"/>
</td>
<td>
<xsl:for-each select="imie">
<xsl:value-of select="."/>


</xsl:for-each>
</td>
<td>
<xsl:value-of select="nazwisko"/>
</td>
<td>
<xsl:value-of select="data_ur"/>
</td>
<td>
<xsl:value-of select="miejsce_ur"/>
</td>
<td>
<xsl:value-of select="@sport"/>
</td>
<td>
<xsl:value-of select="@hobby"/>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
My little table not working.
I've tried apache 2.0 and its working good.

Where is the problem? It's my configuration ?

I think Litespeed accept XML becouse config files are writed in XML.

Thanks for help
Pawelek
 

mistwang

LiteSpeed Staff
#2
Pawelek,

Are you using Apache 2.0 mod_xslt? or using PHP's xslt functions?
LiteSpeed itself does not do xslt transformation yet, so you need to do it in PHP.
The xslt functions is not enabled in the prebuilt PHP binary, you need to built your own PHP binary, with --enable-xslt --with-xslt-sablotconfiguration options. Please follow our Howto to build PHP with fast cgi sapi.

Best Regards,
George
 
Top