By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,053 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,053 IT Pros & Developers. It's quick & easy.

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

P: n/a
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????

$xh = xslt_create();
if($browsertype == "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(),


if ($result)
print $result;
print "xslt error occured";

search_html.xsl file:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
<xsl:include href="inc_html.xsl"/>
<xsl:output method="html"/>
<xsl:template match="/">
<html xmlns="">
<xsl:call-template name="header"/>
<xsl:call-template name="topbody"/>
<xsl:call-template name="contenttable"/>
<xsl:call-template name="footer"/>
<xsl:template name="content">
<table width="90%" cellpadding="0" cellspacing="0" border="0"


Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
anybody have any ideas?
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.