473,785 Members | 2,414 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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($x h, $currentpath . "continents.xml ",
$currentpath . "default_wml.xs l");
}
else if($browsertype == "HTML")
{
$result = xslt_process($x h, $currentpath . "continents.xml ",
$currentpath . "default_html.x sl", 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:styleshe et 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="contentta ble"/>
<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>
BLAHHHHHHHHHHHH HHHHH

</td>
</tr>

</table>
</xsl:template>
</xsl:stylesheet>
Jul 17 '05 #1
1 1635
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
12892
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 php's rpm, I wonder if I can use it directly and tell the rpm command to use this compilation option. Is it possible ? If not, that's no problem since I can download php and compile, but still I'm wondering if rpms can be used with such options....
0
2226
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 (Win32)
0
1920
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 Sablotron libraries in the default path... found in /usr/local checking for sablot-config... found checking for Sablotron version... configure: error: Sablotron version
0
1880
by: Jim Patterson | last post by:
I am trying to compile php with sablotron and I get this error message ===================================================================== FAILED TEST SUMMARY --------------------------------------------------------------------- xslt_set_object function ===================================================================== make: *** Error 1
1
1439
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. Probably just something simple I am missing. Any suggestions? Built with: configure --with-xml --with-expat=/usr/local --enable-xslt --with-xslt-sablot=/usr/local
0
1201
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
2124
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 provider who says we need to use XSLT and Web Services to pull the content from their site. Can someone give me a nutshell definition on how this works??? We use Cold Fusion MX on our web server, but I'm having trouble finding a
9
4795
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 with Sablotron 1.0) with the following: Warning: Sablotron error on line 1: XML parser error 4: not well-formed (invalid token) in /...host...path.../page.php on line 28 FAILURE : XML parser error 4: not well-formed (invalid token) ; error
4
1314
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 urgent :) Thx in advance.
0
9646
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9483
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10346
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10157
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9956
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8982
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6742
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5386
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5514
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.