P
petermichaux
Hi,
I would like to know if I'm linking a CSS file in and XSLT file the
most efficient way. Below is how I'm doing it.
Also how can I make it so that the resulting XHTML file will be encoded
in ISO-8859-1? Currently the XHTML file output by this tranformation is
in charset=UTF-8.
Thanks,
Peter
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="xml"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes"/>
<xsl:template match="/">
<html lang="en">
<head>
<title>XSLT Catalog Template</title>
<link href='css/store.css' type='text/css'
rel='stylesheet'/>
<link href='css/catalog.css' type='text/css'
rel='stylesheet'/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="//category">
<h1><xsl:value-of select="name"/></h1>
<h2><xsl:value-of select="description"/></h2>
</xsl:template>
<xsl:template match="//product">
<h2><xsl:value-of select="name"/> - <xsl:value-of
select="description"/></h2>
</xsl:template>
</xsl:stylesheet>
I would like to know if I'm linking a CSS file in and XSLT file the
most efficient way. Below is how I'm doing it.
Also how can I make it so that the resulting XHTML file will be encoded
in ISO-8859-1? Currently the XHTML file output by this tranformation is
in charset=UTF-8.
Thanks,
Peter
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xslutput method="xml"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" indent="yes"/>
<xsl:template match="/">
<html lang="en">
<head>
<title>XSLT Catalog Template</title>
<link href='css/store.css' type='text/css'
rel='stylesheet'/>
<link href='css/catalog.css' type='text/css'
rel='stylesheet'/>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="//category">
<h1><xsl:value-of select="name"/></h1>
<h2><xsl:value-of select="description"/></h2>
</xsl:template>
<xsl:template match="//product">
<h2><xsl:value-of select="name"/> - <xsl:value-of
select="description"/></h2>
</xsl:template>
</xsl:stylesheet>