using XML file as a view (in case of using XSLT as template engine)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

using XML file as a view (in case of using XSLT as template engine)

Michael Yevdokimov
Hello everyone
 
Is it possible to use XML file as a view?
I guess it should be possible but the problem, as you already might think, is with 'question marks' in the first line of XML file: <?xml .... ?>
 
How would you avoid this problem?
 
Why do I need to use XML as a view? Well, I plan to use XSLT instead of Smarty and ZF Views as a template engine. But XSLT transformation is gonna be done via Apache's module mod_xslt2 (to be honest I've neved worked with it before). So, as a result I have to get my controller to render XML file. Like I said, I'd like to use it as a view to iterate through the sets of data and populate the content in it.
Thank you in advance.
 

--
Michael Yevdokimov
E-mail: [hidden email]
Tel. +31 (0) 61 4599307
 
Reply | Threaded
Open this post in threaded view
|

Re: using XML file as a view (in case of using XSLT as template engine)

Mislav Marohnić
Hello Michael,

It's quite possible to render anything with views. You shouldn't have problems with <?xml if you turn off short open tags directive in php.ini (or set the property dynamically just for the views). Just make sure your XML gets output with correct content-type response headers afterwards (not text/html).

On 5/24/06, Michael Yevdokimov <[hidden email]> wrote:
Hello everyone
 
Is it possible to use XML file as a view?
I guess it should be possible but the problem, as you already might think, is with 'question marks' in the first line of XML file: <?xml .... ?>