473,397 Members | 1,950 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Sablotron xslt question. Is there a better way to code this?

Here is my code that works fine. I am wondering if there is a better
way to do this. In my xslt transformation it seems I

HAVE to reference an XML file even though I am just processing a
stylesheet. So as you can see in my code I reference a valid

xml file named continents.xml- even though the xsl styleheet does not
NEED it! Is there different syntax for doing this so I

don't need the reference to continents.xml????
=======================
default.php:
=======================

$xh = xslt_create();
if($browsertype == "WML")
{
Header("Content-Type:text/vnd.wap.wml");
$result = xslt_process($xh, $currentpath . "continents.xml",
$currentpath . "default_wml.xsl");
}
else if($browsertype == "HTML")
{
$result = xslt_process($xh, $currentpath . "continents.xml",
$currentpath . "default_html.xsl", NULL, array(),

$params);
}

if ($result)
{
print $result;
}
else
{
print "xslt error occured";
}

xslt_free($xh);
========================
search_html.xsl file:
========================

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:include href="inc_html.xsl"/>
<xsl:output method="html"/>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<xsl:call-template name="header"/>
</head>
<body>
<xsl:call-template name="topbody"/>
<xsl:call-template name="contenttable"/>
<xsl:call-template name="footer"/>
</body>
</html>
</xsl:template>
<xsl:template name="content">
<table width="90%" cellpadding="0" cellspacing="0" border="0"
class="content">
<tr>
<td>
BLAHHHHHHHHHHHHHHHHH

</td>
</tr>

</table>
</xsl:template>
</xsl:stylesheet>
Jul 17 '05 #1
1 1620
anybody have any ideas?
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Ghislain Benrais | last post by:
Hello, My "problem" : install php's XSLT API. 1)I installed Sablotron (with the rpm) : ok 2) I read every where that the next step was to compile php with option --with-xslt-sablot. Since I have...
0
by: Martin Burkert | last post by:
hello everyone, i'm generating HTML output with a PHP-Script using the xslt-functions from the php_xslt-extension and an XML / XSLT - File. Some system-infos: PHP 4.3.4 Apache/1.3.20...
0
by: Steve Jenkins | last post by:
Hi all, I'm trying to install Sablotron on Red Hat Linux release 7.2 (Enigma). I've got Sablotron to compile. I now get the following error when running ./configure on PHP: checking for...
0
by: Jim Patterson | last post by:
I am trying to compile php with sablotron and I get this error message ===================================================================== FAILED TEST SUMMARY...
1
by: krigare | last post by:
Everything compiles. Can run sabcmd with no problems. But when running a simple php script, it cannot find the sablotron functions. So it does not appear to be linking the Sablotron stuff....
0
by: Sebastian Langer | last post by:
Hi! I am looking for a Sablotron C++ API - tutorial that explains sablotron and how to use SDOM functions. The GingerAll Sablotron Reference does not help me too much. Thank you, Sebastian
4
by: Ringo Langly | last post by:
Hi all, I'm a seasoned web programmer, but I've never touched XSLT. It's always been one of those acronyms I've never needed to educate myself on. Now... we're working with a web content...
9
by: Martin Plantec | last post by:
Hello, I have managed (with your help!) to make a working XSLT stylesheet; it works fine locally (Windows Apache + PHP with Sablotron 1.0), but it fails on the remote host (FreeBSD Apache + PHP...
4
by: gouranga | last post by:
Sablotron keeps giving an error (non-XSL instruction) on the line with this code: <xsl:result-document href="slideshow/index.html" format="html"> Is this implemented in Sablotron? It's quite...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.