Project

Profile

Help

Create a doc with <?php .?> before DOCTYPE declaration

Added by Anonymous over 15 years ago

Legacy ID: #6746546 Legacy Poster: Claes (claeshelgeson)

Hi, I've been using Saxon for creating a website's html and php files from our XML source files. In our next project I need to be able to output some php code at the very top of each document, before the doctype declaration and <html> tag. The big Q is... how do I do that? This is what I use today: <xsl:transform version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" indent="yes" omit-xml-declaration="yes" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" encoding="UTF-8"/> : : <xsl:template mode="newpage" match="*"> <xsl:param name="filename"> : </xsl:param> <xsl:document href="{normalize-space($filename)}"> <html> <xsl:apply-templates select="." mode="skel.header"> : : but I cannot figure out how to include some php code at the very top. My generated php files come out as: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> : : but I would like: <?php include 'authorizeUser.php' ?> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> : : Is that possible...? Thanks! /Claes


Replies (1)

RE: Create a doc with &lt;?php .?&gt; before DOCTYPE declaration - Added by Anonymous over 15 years ago

Legacy ID: #6746629 Legacy Poster: Claes (claeshelgeson)

Whoops, sorry for accidently double-posting. /Claes

    (1-1/1)

    Please register to reply