WAP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreWAP Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 15th, 2005, 11:40 AM
phannon phannon is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2005
Posts: 1 phannon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 14 m 58 sec
Reputation Power: 0
Question PHP, XSL and WAP ... Stuck ... Please Help!!!

Hi,

I am developing a WAP portal using php. I had an .asp wrapper file that loaded in the xml and xsl and it worked fine.

However I needed to convert the website and have rewritten the file in php and just cannot get it to work. Whenever I view the source of the php implementation I can see the xsl instead of the resultant xhtml.

The php file is as follows:

<?php
$xmlfile = "pixelmotion/xml.xml";
$xslfile = "pixelmotion/site_176/index.xsl";
$engine = xslt_create();
$output = xslt_process($engine, $xmlfile, $xslfile, NULL, NULL, NULL);
echo $output;
xslt_free($engine);
?>


And the start of the xml:

<?xml version = "1.0" encoding="UTF-8"?>
<document>
<profile>

<main>
<value>R128,000</value>


And the start of the xsl file:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home</title>

<style type="text/css">@import "styles.css";</style>
</head>
<body>

<table>
<tr>
<td><img src="./images/title_176.gif" width="168" height="30" /></td>
</tr>

<xsl:for-each select="document/profile">
<xsl:for-each select="main">
<tr>
<td class="headings">
<div align="center"><xsl:value-of select="value" /></div>
</td>
</tr>
<tr>

Can anyone see anthing obviously wrong?

Any help would be appreciated as I am absolutely stuck on this one.

Regards,
Paul.

Reply With Quote
  #2  
Old February 15th, 2005, 04:06 PM
jabba_29's Avatar
jabba_29 jabba_29 is offline
Back in HEL
Dev Shed God 8th Plane (8500 - 8999 posts)
 
Join Date: Feb 2002
Location: Finland
Posts: 8,670 jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)jabba_29 User rank is General 10th Grade (Above 100000 Reputation Level)  Folding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner FolderFolding Points: 57777 Folding Title: Beginner Folder
Time spent in forums: 3 Months 3 Weeks 4 Days 6 h 10 m 50 sec
Reputation Power: 1618
Send a message via ICQ to jabba_29 Send a message via AIM to jabba_29 Send a message via MSN to jabba_29 Send a message via Yahoo to jabba_29 Send a message via Google Talk to jabba_29 Send a message via Skype to jabba_29
Facebook
Have you set the headers anywhere?
PHP Code:
<?php
// your stuff
header('Content-Type: application/xhtml+xml');
// OR
header('Content-Type: text/xml');
// wap stuff commented out
# header('Content-Type: text/vnd.wap.wml', true);
# header("Cache-Control: no-cache, must-revalidate");
# header("Pragma: no-cache");
print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
// then escape to normal xml
?>
Hope that helps.
__________________
Cheers,

Jamie


# skiFFie | Home of the 'accessibility module' for Drupal
# Jamie Burns [me] Accessibility Module [drupal]
# guidelines | search | wap resources | not getting help | fold to cure

# Any form of employment is strictly prohibited ......


__________________

Let the might of your compassion arise to bring a quick end
to the flowing stream of the blood and tears .....
Please hear my anguished words of truth.

__________________

Last edited by jabba_29 : February 16th, 2005 at 01:42 AM.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreWAP Programming > PHP, XSL and WAP ... Stuck ... Please Help!!!


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway