Subject: [xsl] Re;[xsl] Preseving xhtml tags during a transform From: "Tracey Zellmann" <tracey.zellmann@xxxxxxxxxxx> Date: Fri, 22 Sep 2006 13:57:20 -0400 |
<?xml version="1.0" encoding="utf-8"?> <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml"> <xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" method="html" indent="yes" encoding="ISO-8859-1" /> <xsl:template match="page"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en" > <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/> <link type="text/css" href="../style/storyPages.css" rel="stylesheet"/> <title> <xsl:value-of select="title"/> </title> </head> <body> <xsl:call-template name="pageTitle"/> <xsl:apply-templates mode="xh" select="content/*" /> <xsl:apply-templates select="popup"/> </body> </html> </xsl:template> <xsl:template match="*" mode="xh"> <xsl:element name="{local-name()}" namespace="http://www.w3.org/1999/xhtml"> <xsl:copy-of select="@*"/> <xsl:apply-templates mode="xh" /> </xsl:element> </xsl:template> <xsl:template name="pageTitle"> <p id="page-title"> <xsl:value-of select="@seq"/>. <xsl:value-of select="title"/> </p> </xsl:template> <xsl:template match="popup"> <xsl:variable name="a" select="link/text()"/> <xsl:variable name="h" select="link/@height"/> <xsl:variable name="w" select="link/@width"/> <xsl:variable name="tip" select="tip"/> <li> <a href="../popups/{$a}"><xsl:value-of select="text"/></a> </li> </xsl:template> </xsl:stylesheet>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] zap some node, Abel Braaksma | Thread | Re: [xsl] Re;[xsl] Preseving xhtml , David Carlisle |
Re: [xsl] Add namespaces to a soap , Abel Braaksma | Date | Re: [xsl] Re;[xsl] Preseving xhtml , David Carlisle |
Month |