Most of our designers prefer to work in Dreamweaver. They now, this
month, want to produce templates that are valid XHTML 1.0. In
Dreamweaver, this is as simple as clicking a button.
Up till now, we've been storing the templates in a database, bring
them out when a webpage needs to be rendered, and hitting the page
with eval(). The eval() function goes through and spits out the pure
HTML and takes any PHP commands it finds and executes. All was well
and good.
Problems have arisen now that the designers want their code to be
XHTML valid. This means having, at the top of the page, a declaration
that looks like:
<?xml // more stuff here.
Of course this is giving parse errors. The PHP parser sees the "<?"
and assumes what follows is PHP, but can find a command called xml.
Not sure how to solve this one. Does anyone have some creative ideas?
Some of the PHP commands embedded in the templates have echo and print
statements, so there is no way to remove and then later replace the
XML declaration.
month, want to produce templates that are valid XHTML 1.0. In
Dreamweaver, this is as simple as clicking a button.
Up till now, we've been storing the templates in a database, bring
them out when a webpage needs to be rendered, and hitting the page
with eval(). The eval() function goes through and spits out the pure
HTML and takes any PHP commands it finds and executes. All was well
and good.
Problems have arisen now that the designers want their code to be
XHTML valid. This means having, at the top of the page, a declaration
that looks like:
<?xml // more stuff here.
Of course this is giving parse errors. The PHP parser sees the "<?"
and assumes what follows is PHP, but can find a command called xml.
Not sure how to solve this one. Does anyone have some creative ideas?
Some of the PHP commands embedded in the templates have echo and print
statements, so there is no way to remove and then later replace the
XML declaration.
Comment