473,508 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

zend example

Hi!

I have used ctrl+c, ctrl+v method with this example:

http://www.zend.com/php5/articles/ph....php#Heading18

and it is the result (in IE6):

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and
then click the Refresh button, or try again later.
------------------------------------------------------------------------
--------

Invalid at the top level of the document. Error processing resource
'http://duzy.dsv.agh.edu.pl/xmltry/fun.php'. Line 1, Position 22

<?xml version="1.0"?>

Whats wrong?
Jul 20 '05 #1
4 1420


duzy wrote:

I have used ctrl+c, ctrl+v method with this example:

http://www.zend.com/php5/articles/ph....php#Heading18

and it is the result (in IE6):

The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and
then click the Refresh button, or try again later.
------------------------------------------------------------------------
--------

Invalid at the top level of the document. Error processing resource
'http://duzy.dsv.agh.edu.pl/xmltry/fun.php'. Line 1, Position 22

<?xml version="1.0"?>

Whats wrong?


Hard to tell, I have tried <http://duzy.dsv.agh.edu.pl/xmltry/fun.php>
but it timed out.
What is the URL of the XML, what is the URL of the XSLT stylesheet?

And what are you trying, server-side transformation with PHP or
client-side transformation? The cited article is about PHP but the error
messages seems to indicate that client-side transformation in IE occurs.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2
>
Whats wrong?


Hard to tell, I have tried <http://duzy.dsv.agh.edu.pl/xmltry/fun.php>
but it timed out.
What is the URL of the XML, what is the URL of the XSLT stylesheet?

And what are you trying, server-side transformation with PHP or
client-side transformation? The cited article is about PHP but the error
messages seems to indicate that client-side transformation in IE occurs.


I am trying server-side transformation with PHP.
http://duzy.dsv.agh.edu.pl/xmltry/fun.php is wisible only in my local web.
XML and XSLT and php file are in the same catalog.

Duzy

Jul 20 '05 #3


duzy wrote:

I am trying server-side transformation with PHP.
http://duzy.dsv.agh.edu.pl/xmltry/fun.php is wisible only in my local web.
XML and XSLT and php file are in the same catalog.


I have had a look again and indeed the example given in
<http://www.zend.com/php5/articles/php5-xmlphp.php#Heading18> is a bit
flawed, it is supposed to output XML but doesn't create any element.

Change the XSLT stylesheet to

<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl">
<xsl:template match="today">
<xsl:copy>
<xsl:value-of select="php:function('dateLang')" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>

and then all is fine in regard to the XML output that IE sees.

However if you really want the output of the PHP to be seen as XML then add
header('Content-Type: application/xml');
before the line
print $newdom->saveXML();

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #4
> > I have used ctrl+c, ctrl+v method with this example:

I have used ctrl+c, ctrl+v method including the comments, and thats why a
had mistake :(
But it's ok now.
Jul 20 '05 #5

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

Similar topics

4
2174
by: news | last post by:
I have lines of code that look like this: while ($row2sx = mysql_fetch_array($result2sx)) { Now that's the way I've always learned to create an array from a mySQL querey. I just started...
8
779
by: Andy Jacobs | last post by:
Evening folks This has probably been asked before so apologies for that. I'm using Dreamweaver for PHP and have been for nearly a year. I've done some stuff that I'm very happy with but I'm...
1
4864
by: Toni | last post by:
I've tried to reinstall the zend environment and debugger on my new computer. I almost succeeded but when I try to debug or profile a webpage by clicking on the buttons on the toolbars I get the...
5
3011
by: news | last post by:
I'm trying out the Zend Development Environment 4, and for the most part I like it, except for two things. It seems to think certain lines that are perfectly valid are bugs. Like this: while...
0
1114
by: news | last post by:
I'm trying out a free demo of Zend Studio 4, and have a couple of reservations. I was hoping I could get someone who uses the Studio to help me out. There's two things that the totally free...
1
1669
by: pjSoni | last post by:
Hi I would like to know from where to start learning zend frame work I need to develop project based on zend framework so what tools of zend framework I should use like db, template handling...
1
2138
by: Xristos Nikolopoulos | last post by:
Hello, I have made an application that needs to upload files, the application is deployed in several folders, and each folder has its php files. The problem is, I have in the folder I want to...
1
2202
by: James | last post by:
I am getting frustrated of the PHP 5 releases chocking on OCI8 -- they just seem really unstable as do recent ISAPI filters when run on Windows 2003 Server. As an example the newest PHP 5.1.4...
3
3861
by: Adeel | last post by:
I am new to php. i have installed the PDT all in one package and then i installed the zend debugger plugin for PDT. Every thing is running fine and i am able to debug the single php page using zend...
7
3511
by: Service4PC | last post by:
Hi all, I've a problem... I'm writing an extension for php, and i need to execute a file php... but only the content of the file and not the file... Now I better explain: - the extension get the...
0
7118
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
7323
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
7379
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...
1
7038
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...
1
5049
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3192
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...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
763
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
415
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.