[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Trying to avoid quirks mode

Subject: Trying to avoid quirks mode
From: Arthur Maloney <ArthurM@xxxxxxxxxx>
Date: Wed, 10 Dec 2008 06:38:56 +0000
 Trying to avoid quirks mode
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@xxxxxxxxxx

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.