xsl-list
[Top] [All Lists]

[xsl] Trying to avoid quirks mode

2008-12-10 01:39:34
Hello xsl-list,

I'm generating XHtml pages (Within the Net Framework).
How do you include DocType (not a proper Xml tag)

e.g. my Xhtml page should start
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
  <head>
    <title>External hits</title>
 ...

I use this template (xsl v1.0) to add meta info to the <head> tag.

<?xml version="1.0" encoding="UTF-8"?>
<!--lib.TopBottom.xsl created 2004-04-28 20:04-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns="http://www.w3.org/1999/xhtml"; version="1.0">
        <xsl:output  method="xml" omit-xml-declaration="yes" indent="yes" />

<xsl:template  name="meta">
        <meta http-equiv="Content-Type" content="text/html; 
charset=application/xhtml+xml; charset=UTF-8" ></meta>
        <meta http-equiv="Content-Language" content="en-GB" ></meta>
        <meta http-equiv="Script-Content-Type" content="text/javascript"></meta>
        <meta http-equiv="Content-Style-Type" content="text/css"></meta>
        
        <meta name ="author" content="Arthur Maloney"></meta>
        <meta name ="distribution" content="Global"></meta>
        <meta name ="generator" content="M5"></meta>
        <meta name ="rating" content="General"></meta>
</xsl:template>
</xsl:stylesheet>

This is my start bit

        <xsl:template match="/">
                <html xmlns="http://www.w3.org/1999/xhtml";>
                        <head>
                                <title><xsl:value-of select="$title"/></title>
                                <xsl:call-template name="meta"/>
                                <xsl:call-template name="css-table2"/>
                        </head>
                        <body>
                                <xsl:apply-templates select="/externalHits"/>
                        </body>
                </html>
        </xsl:template>
  

-- 
Best regards,
 Arthur                          mailto:ArthurM(_at_)seipas(_dot_)com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>