Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > zend example

Reply
Thread Tools

zend example

 
 
duzy
Guest
Posts: n/a
 
      03-05-2005
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?


 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      03-05-2005


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/
 
Reply With Quote
 
 
 
 
duzy
Guest
Posts: n/a
 
      03-05-2005
>
> > 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



 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      03-05-2005


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"
xmlnssl="http://www.w3.org/1999/XSL/Transform"
xmlnshp="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/
 
Reply With Quote
 
duzy
Guest
Posts: n/a
 
      03-05-2005
> > 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FREE SEMINAR on PHP Web Development in Lahore, It covers PHP, MySQL,AJAX & Zend Certification EVS MCSE 0 08-08-2010 12:41 PM
FREE SEMINAR on PHP Web Development in Rawalpindi & Lahore, It coversPHP, MySQL, AJAX & Zend Certification EVS MCSE 0 07-03-2010 01:32 PM
FREE SEMINAR on PHP Web Development in Lahore and Rawalpindi, Itcovers PHP, MySQL, AJAX & Zend Certification EVS MCSE 0 05-31-2010 01:13 PM
Admission open in NEW BATCH of Web Application Development Program,It covers PHP, MySQL, AJAX & Zend Certification EVS MCSE 0 04-18-2010 01:53 PM
'example.com' == 'example.com.' => false... is this intended? Sam Roberts Ruby 15 02-07-2005 04:36 PM



Advertisments