|
Subject: Re: [xsl] Transforming augmented XHTML to XHTML using XSLT From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 21 Mar 2008 17:44:26 -0400 |
> <xsl:template match="/"> > <html> > <xsl:apply-templates select="." mode="html"/> > </html> > </xsl:template>
You are trying to apply on the document node in the html mode. It is looking to be matched by:
<xsl:template match="/" mode="html"/>
t:\ftemp>type aaron.xml <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Here is a head</title> </head> <body> <p>Here is a body.</p> </body> </html>
t:\ftemp>type aaron.xsl
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:h="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="h"
> <xsl:template match="/">
<html>
<xsl:apply-templates select="." mode="html"/>
</html>
</xsl:template> <xsl:template match="h:head" mode="html">
head
<xsl:copy-of select="*"/>
</xsl:template> <xsl:template match="h:body" mode="html">
body
<xsl:copy-of select="*"/>
</xsl:template>t:\ftemp>xslt aaron.xml aaron.xsl con <?xml version="1.0" encoding="UTF-8"?> <html>
head
<title xmlns="http://www.w3.org/1999/xhtml">Here is a head</title> body
<p xmlns="http://www.w3.org/1999/xhtml">Here is a body.</p></html> t:\ftemp>
-- Upcoming: UBL Apr.22,24; genericode code lists Apr.23; Rome,Italy World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Transforming augmented XH, Robert Koberg | Thread | Re: [xsl] Transforming augmented XH, Aaron Gray |
| Re: [xsl] Transforming augmented XH, Robert Koberg | Date | Re: [xsl] Transforming augmented XH, Jesper Tverskov |
| Month |