Click to See Complete Forum and Search --> : How to perform null XSLT translations


redijedi
04-08-2004, 12:24 PM
I am developing a large web application. I have developed my application architecture on MySQL, PHP, XSL and XHTML. I want to completely separate code from interface. I want my XSL solely responsible for displaying interface elements.

The problem is that if I do not have any XML to transform using the XSL I can't just output the XSL into XHTML.

I don’t know if I’m explaining this right.

I know I can feed a dummy XML string into the processor, but that is not very elegant.

If there is no need for any dynamic translation, I want to return a default XSL translated into XHTML. Is there a way to do this?

crh3675
04-10-2004, 08:28 PM
You need to create a default.xml file for blank or empty data to pass fo your xsl file. I do a simliar sort of thing for a site that I am working on. There's no way around it as I know. It isn't necessarily an elegance issue, it's a functional issue and I don't see any problem with doing it that way.