<?xml version="1.0" encoding="UTF-8"?>
<!-- This document is released into the public domain -->
<!-- Using XSLT 2.0, perhaps it would be possible to allow localized XML Declaration and DTD, in the original document as well as get browsers to recognize localized versions of xml-stylesheets so that even the xml-stylesheet attaching this XSL transformation can be localized -->
<!DOCTYPE xsl:stylesheet [
<!-- Not an XHTML element, attribute, or attribute value: a new element for localized items to be converted into a processing instruction -->
<!-- Fix: the xmlns Chinese is duplicated -->
<!-- Stuck to element/attribute/attribute-value names, except for h (divided into h and number), for cases using colons or slashes (converted to underscore), and 'fontelement' (to avoid conflict with localized CSS XML 'font' property element), 'little' instead of 'small' -->
<!-- Although I've made room for localizing numbers, I didn't implement it in the stylesheet, as I haven't checked really which elements can handle just numbers and which in XHTML really should have "px", etc. after it; I also didn't localize date/time: http://www.w3.org/TR/html4/types.html#h-6.11 -->

<!-- Processing instruction  -->
<!ENTITY procinst "编码指令">

<!ENTITY blank "aaa">
<!ENTITY self "aaa">
<!ENTITY parent "aaa">
<!ENTITY top "aaa">


<!ENTITY a "点">
<!ENTITY abbr "缩写">
<!ENTITY above "上">
<!ENTITY accept "接受">
<!ENTITY accept-charset "接受字符集">
<!ENTITY accesskey "快捷键">
<!ENTITY acronym "首字母缩略词">
<!ENTITY action "动作">
<!ENTITY address "地址">
<!ENTITY align "排列">
<!ENTITY alink "点击鼠标时颜色">
<!ENTITY all "所有">
<!ENTITY alt "其他选择">
<!ENTITY alternate "其他方式">
<!ENTITY appendix "附录">
<!ENTITY applet "小苹果">
<!ENTITY aqua "水色">
<!ENTITY area "区域">
<!ENTITY archive "档案">
<!ENTITY aural "声音">
<!ENTITY auto "自动">
<!ENTITY axis "地轴">
<!ENTITY b "加粗">
<!ENTITY background "背景">
<!ENTITY base "基本">
<!ENTITY basefont "默认格式">
<!ENTITY baseline "基础线">
<!ENTITY bdo "换方向">
<!ENTITY below "下">
<!ENTITY bgcolor "背景颜色">
<!ENTITY big "大">
<!ENTITY black "黑">
<!ENTITY blockquote "分段引入">
<!ENTITY blue "蓝">
<!ENTITY body "身体">
<!ENTITY bookmark "书签">
<!ENTITY border "边界">
<!ENTITY bottom "底">
<!ENTITY box "盒子">
<!ENTITY br "换行">
<!ENTITY braille "盲文">
<!ENTITY button "输入区">
<!ENTITY caption "表格名称">
<!ENTITY cellpadding "填充单元格">
<!ENTITY cellspacing "单元格间距">
<!ENTITY center "居中">
<!ENTITY charset "字符集">
<!ENTITY chapter "章">
<!ENTITY char "字">
<!ENTITY charset "字符集">
<!ENTITY charoff "字符偏移量">
<!ENTITY checkbox "检验栏">
<!ENTITY checked "已检验">
<!ENTITY circle "圆">
<!ENTITY cite "援引">
<!ENTITY class "类">
<!ENTITY classid "编码位置">
<!ENTITY clear "清除">
<!ENTITY code "程序">
<!ENTITY codebase "编码基本位置">
<!ENTITY codetype "编码类型">
<!ENTITY col "列">
<!ENTITY colgroup "列组">
<!ENTITY color "颜色">
<!ENTITY cols "多列">
<!ENTITY colspan "列间跨度">
<!ENTITY compact "紧凑的">
<!ENTITY content "内容">
<!ENTITY contents "目录">
<!ENTITY coords "座标">
<!ENTITY copyright "版权">
<!ENTITY data "数据">
<!ENTITY datetime "时间日期">
<!ENTITY dd "定义描述">
<!ENTITY declare "声明">
<!ENTITY default "默认">
<!ENTITY defer "等待">
<!ENTITY del "删除">
<!ENTITY dfn "定义">
<!ENTITY dir "方向">
<!ENTITY dl "定义目录">
<!ENTITY dt "定义词">
<!ENTITY dir "方向">
<!ENTITY disabled "失效">
<!ENTITY div "部分">
<!ENTITY em "强调">
<!ENTITY enctype "编码类型">
<!ENTITY face "脸">
<!ENTITY fieldset "特征群组">
<!ENTITY file "文件">
<!ENTITY fontelement "格式元素">
<!ENTITY for "为了">
<!ENTITY form "表">
<!ENTITY frame "框">
<!ENTITY frameborder "边框">
<!ENTITY frameset "框组">
<!ENTITY fuchsia "紫红色">
<!ENTITY get "得到">
<!ENTITY glossary "术语表">
<!ENTITY gray "灰">
<!ENTITY green "绿">
<!ENTITY groups "群">
<!ENTITY h "标题">
<!ENTITY handheld "手机">
<!ENTITY head "头">
<!ENTITY headers "多个列名">
<!ENTITY height "高度">
<!ENTITY help "帮助">
<!ENTITY hidden "隐藏">
<!ENTITY hr "新页">
<!ENTITY href "超文本">
<!ENTITY hreflang "超文本语言">
<!ENTITY hsides "水平边">
<!ENTITY hspace "水平距离">
<!ENTITY html "页">
<!ENTITY http-equiv "http相当于">
<!ENTITY i "斜体">
<!ENTITY id "身份">
<!ENTITY iframe "段落内框">
<!ENTITY image "图">
<!ENTITY img "图片">
<!ENTITY index "索引">
<!ENTITY input "输入">
<!ENTITY inputmode "输入方式">
<!ENTITY ins "插入">
<!ENTITY isindex "复原">
<!ENTITY ismap "是地图">
<!ENTITY justify "两端对齐">
<!ENTITY kbd "键盘">
<!ENTITY label "标签">
<!ENTITY language "语言">
<!ENTITY left "左">
<!ENTITY legend "群组标签">
<!ENTITY lhs "左边">
<!ENTITY li "项目">
<!ENTITY lime "青柠色">
<!ENTITY link "链接">
<!ENTITY longdesc "精确描述">
<!ENTITY ltr "从左到右">
<!ENTITY map "地图">
<!ENTITY marginheight "上下边距">
<!ENTITY marginwidth "左右边距">
<!ENTITY maroon "褐紫色">
<!ENTITY maxlength "最长">
<!ENTITY media "多媒体">
<!ENTITY menu "菜单">
<!ENTITY meta "说明">
<!ENTITY method "方式">
<!ENTITY middle "中间">
<!ENTITY multiple "多项">
<!ENTITY name "名字">
<!ENTITY navy "藏青色">
<!ENTITY next "下一个">
<!ENTITY no "不">
<!ENTITY noframes "无框">
<!ENTITY nohref "无超文本">
<!ENTITY none "没有">
<!ENTITY noresize "无法设定">
<!ENTITY noscript "无编码">
<!ENTITY noshade "无阴影">
<!ENTITY nowrap "无换行">
<!ENTITY number1 "一">
<!ENTITY number2 "二">
<!ENTITY number3 "三">
<!ENTITY number4 "四">
<!ENTITY number5 "五">
<!ENTITY number6 "六">
<!ENTITY object "物体">
<!ENTITY ol "顺序列表">
<!ENTITY olive "橄榄色">
<!ENTITY onblur "模糊时">
<!ENTITY onchange "改变时">
<!ENTITY onclick "单击时">
<!ENTITY ondblclick "双击时">
<!ENTITY onfocus "清晰时">
<!ENTITY onkeydown "持续单击某键时">
<!ENTITY onkeypress "单击某键时">
<!ENTITY onkeyup "结束单击某键时">
<!ENTITY onload "下载时">
<!ENTITY onmousedown "持续敲击鼠标时">
<!ENTITY onmousemove "鼠标移动时">
<!ENTITY onmouseout "鼠标远离时">
<!ENTITY onmouseover "鼠标悬停时">
<!ENTITY onmouseup "结束敲击鼠标时">
<!ENTITY onreset "重新设置时">
<!ENTITY onselect "选择时">
<!ENTITY onsubmit "提交时">
<!ENTITY onunload "离开下载页面时">
<!ENTITY optgroup "选择部分">
<!ENTITY option "选项">
<!ENTITY orange "橙色">
<!ENTITY p "段落">
<!ENTITY param "参量">
<!ENTITY password "密码">
<!ENTITY poly "多边形">
<!ENTITY post "发送">
<!ENTITY preserve "保留">
<!ENTITY pre "已格式化">
<!ENTITY prev "上一个">
<!ENTITY print "打印">
<!ENTITY profile "援引">
<!ENTITY projection "投影">
<!ENTITY prompt "询问">
<!ENTITY purple "紫">
<!ENTITY q "引用">
<!ENTITY radio "收音机">
<!ENTITY readonly "只读">
<!ENTITY rect "四边形">
<!ENTITY red "红">
<!ENTITY ref "参考">
<!ENTITY rel "关系">
<!ENTITY reset "重设">
<!ENTITY rev "颠倒">
<!ENTITY rhs "右边">
<!ENTITY right "右">
<!ENTITY row "行">
<!ENTITY rowgroup "行组">
<!ENTITY rows "多行">
<!ENTITY rowspan "行间跨度">
<!ENTITY rtl "从右到左">
<!ENTITY rules "规则">
<!ENTITY s "划掉">
<!ENTITY samp "样品">
<!ENTITY scheme "方案">
<!ENTITY scope "范围">
<!ENTITY screen "屏幕">
<!ENTITY script "编码">
<!ENTITY scrolling "滚动">
<!ENTITY section "片断">
<!ENTITY select "选择">
<!ENTITY selected "已选择">
<!ENTITY shape "形状">
<!ENTITY silver "银色">
<!ENTITY size "大小">
<!ENTITY little "aaa">
<!ENTITY span "跨度">
<!ENTITY src "资源">
<!ENTITY standby "等候">
<!ENTITY start "开始">
<!ENTITY strike "中划线">
<!ENTITY strong "突出">
<!ENTITY style "格式">
<!ENTITY stylesheet "格式页面">
<!ENTITY sub "下标">
<!ENTITY submit "接受">
<!ENTITY subsection "次片断">
<!ENTITY summary "概要">
<!ENTITY sup "上标">
<!ENTITY tabindex "下一格次序">
<!ENTITY table "表格">
<!ENTITY target "目标">
<!ENTITY tbody "表格体">
<!ENTITY td "单元格">
<!ENTITY teal "蓝绿色">
<!ENTITY text "文本">
<!ENTITY textarea "输入区">
<!ENTITY text_css "文本css">
<!ENTITY text_xsl "文本xsl">
<!ENTITY tfoot "表格尾">
<!ENTITY th "列名">
<!ENTITY thead "表格头">
<!ENTITY title "标题">
<!ENTITY top "顶端">
<!ENTITY tr "表格行">
<!ENTITY tt "电传字">
<!ENTITY tty "电传打字机">
<!ENTITY tv "电视">
<!ENTITY type "类别">
<!ENTITY u "下划线">
<!ENTITY ul "无序列表">
<!ENTITY usemap "用图">
<!ENTITY valign "垂直排列">
<!ENTITY value "值">
<!ENTITY valuetype "值类型">
<!ENTITY var "多样">
<!ENTITY version "援引">
<!ENTITY vlink "访问后颜色">
<!ENTITY void "消除">
<!ENTITY vsides "垂直边">
<!ENTITY vspace "垂直距离">
<!ENTITY white "白">
<!ENTITY width "宽">
<!ENTITY xmlns "援引">
<!ENTITY xml_lang "xml语言">
<!ENTITY xml_space "xml空格">
<!ENTITY xml-stylesheet "xml格式页面">
<!ENTITY yellow "黄">
<!ENTITY yes "是">


]>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml">
<xsl:include href="css.xsl"/>
<xsl:output method="xml" version="1.0" encoding="GB2312" omit-xml-declaration="no" standalone="no" doctype-public="-//W3C//DTD XHTML 1.1//EN" doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" indent="yes" media-type="application/xhtml+xml"/>
<!-- don't want this: for Explorer at least: cdata-section-elements="script style" -->





<!-- Whether to allow deprecated items; if conditions may not be completely applied -->
<xsl:variable name="deprecated" select="true()"/>
<!-- This with body, head, title are part of the Structure Module; this module is assumed here -->
<!-- Commenting this out since intrinsic events should be sufficient to trigger this: <xsl:variable name="mod_event" select="true()"/> -->
<xsl:variable name="mod_intrinsic_events" select="true()"/>
<xsl:variable name="mod_style_attrib" select="true()"/>
<xsl:variable name="mod_bdo" select="true()"/>
<xsl:variable name="mod_text" select="true()"/>
<xsl:variable name="mod_hypertext" select="true()"/>
<xsl:variable name="mod_list" select="true()"/>
<xsl:variable name="mod_applet" select="true()"/>
<xsl:variable name="mod_presentation" select="true()"/>
<xsl:variable name="mod_edit" select="true()"/>
<xsl:variable name="mod_basic_forms" select="true()"/>
<xsl:variable name="mod_forms" select="true()"/>
<xsl:variable name="mod_basic_tables" select="true()"/>
<xsl:variable name="mod_tables" select="true()"/>
<xsl:variable name="mod_image" select="true()"/>
<xsl:variable name="mod_cs_image_map" select="true()"/>
<xsl:variable name="mod_ss_image_map" select="true()"/>
<xsl:variable name="mod_object" select="true()"/>
<xsl:variable name="mod_frames" select="true()"/>
<xsl:variable name="mod_target" select="true()"/>
<xsl:variable name="mod_iframe" select="true()"/>
<xsl:variable name="mod_meta" select="true()"/>
<xsl:variable name="mod_scripting" select="true()"/>
<xsl:variable name="mod_stylesheet" select="true()"/>
<xsl:variable name="mod_link" select="true()"/>
<xsl:variable name="mod_base" select="true()"/>
<xsl:variable name="mod_name_id" select="true()"/>
<xsl:variable name="mod_legacy" select="true()"/>
<xsl:variable name="mod_inputmode" select="true()"/>

<xsl:template match="/">
<xsl:apply-templates/>
</xsl:template>

<xsl:template match="&html;">
<html>
<!-- Although the following doesn't follow the XML pattern (by allowing users to add in an element before the head in the Chinese document), it allows for easier manipulation here -->
<!-- <xsl:apply-templates select="&procinst;"/> -->
<xsl:call-template name="I18N"/>
<xsl:call-template name="id"/>
<xsl:if test="$deprecated = true()">
	<xsl:call-template name="version"/>
</xsl:if>
<xsl:call-template name="xmlns"/>
<xsl:apply-templates select="&head;"/>
<xsl:apply-templates select="&body;"/>
</html>
</xsl:template>

<xsl:template match="comment()">
<xsl:copy/>
</xsl:template>

<!--
<xsl:template match="&procinst;">
	<xsl:processing-instruction name="xml-stylesheet">
		<xsl:if test="@&href;">
			<xsl:text>href="</xsl:text><xsl:value-of select="@&href;"/>
			<xsl:text>"</xsl:text>
		</xsl:if>
		<xsl:if test="@&title;">
			<xsl:text>title="</xsl:text><xsl:value-of select="@&title;"/>
			<xsl:text>"</xsl:text>
		</xsl:if>
		<xsl:if test="@&media;">
			<xsl:text>media="</xsl:text><xsl:value-of select="@&media;"/>
			<xsl:text>"</xsl:text>
		</xsl:if>
		<xsl:if test="@&charset;">
			<xsl:text>charset="</xsl:text><xsl:value-of select="@&charset;"/>
			<xsl:text>"</xsl:text>
		</xsl:if>
		<xsl:if test="@&alternate;">
			<xsl:text>alternate="</xsl:text><xsl:value-of select="@&alternate;"/>
			<xsl:text>"</xsl:text>
		</xsl:if>
		<xsl:choose>
			<xsl:when test="@&type; = '&text_css;'">
				<xsl:text>type="text/css"</xsl:text>
			</xsl:when>
			<xsl:when test="@&type; = '&text_xsl;'">
				<xsl:text>type="text/xsl"</xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="@&type;"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:processing-instruction>
</xsl:template>

-->

<!-- Allow English stylesheet to exist since the XSL one will already be required 
<xsl:template match="processing-instruction('&xml-stylesheet;')">
<xsl:if test="contains(., '&xml-stylesheet;')">
<xsl:processing-instruction name="xml-stylesheet"><xsl:value-of select="."/></xsl:processing-instruction>
</xsl:if>
</xsl:template>
-->


<!-- Allow localized stylesheet (XML-style) to be transformed if exist; note however that unlike the non-XML version above, this cannot check each possible pseudo-attribute; it requires everything besides the name to be in English code. It would be possible to search through the strings, but I imagine it would be pretty ugly and imperfect without regular expressions. -->
<!--

<xsl:template match="processing-instruction()">
<xsl:copy/>
</xsl:template>
-->


<!-- Allow English for additional XSL's since people have to use one XSL already in English -->
<xsl:template match="processing-instruction('xml-stylesheet')">
<xsl:if test="contains(., 'text/css')">
<xsl:processing-instruction name="xml-stylesheet"><xsl:value-of select="."/></xsl:processing-instruction>
</xsl:if>
</xsl:template>


<xsl:template name="Common">
	<xsl:call-template name="Core"/>
	<xsl:call-template name="I18N"/>
	<!-- The following is only supposed to be added if the Intrinsic Events Module is included -->
	<xsl:if test="$mod_intrinsic_events = true()">
		<xsl:call-template name="Events"/>
	</xsl:if>
	<!-- The following is only supposed to be added if the Style Attribute Module is included -->
	<xsl:if test="$mod_style_attrib = true()">
		<xsl:call-template name="Style"/>
	</xsl:if>
</xsl:template>

<xsl:template name="Core">
	<xsl:if test="@&xml_space;">
		<xsl:attribute name="xml:space">
			<xsl:choose>
				<xsl:when test="@&xml_space; = '&default;'">
					<xsl:text>default</xsl:text>
				</xsl:when>
				<xsl:when test="@&xml_space; = '&preserve;'">
					<xsl:text>preserve</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&class;">
		<xsl:attribute name="class">
			<xsl:value-of select="@&class;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&id;">
		<xsl:attribute name="id">
			<xsl:value-of select="@&id;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&title;">
		<xsl:attribute name="title">
			<xsl:value-of select="@&title;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="I18N">
	<xsl:if test="@&xml_lang;">
		<xsl:attribute name="xml:lang">
			<xsl:value-of select="@&xml_lang;"/>
		</xsl:attribute>
	</xsl:if>
	<!-- The following is only supposed to be added if the Bi-directional Text Module is included -->
	<xsl:if test="$mod_bdo = true()">
		<xsl:call-template name="dir"/>
	</xsl:if>
</xsl:template>

<!-- Will there be a problem with title sometimes accepting "text" and sometimes "CDATA"? -->
<xsl:template name="title">
	<xsl:if test="@&title;">
		<xsl:attribute name="title">
			<xsl:value-of select="@&title;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="class">
	<xsl:if test="@&class;">
		<xsl:attribute name="class">
			<xsl:value-of select="@&class;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="accept-charset">
	<xsl:if test="@&accept-charset;">
		<xsl:attribute name="accept-charset">
			<xsl:value-of select="@&accept-charset;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="accept">
	<xsl:if test="@&accept;">
		<xsl:attribute name="accept">
			<xsl:value-of select="@&accept;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="Events">
	<xsl:if test="@&onclick;">
		<xsl:attribute name="onclick">
			<xsl:value-of select="@&onclick;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&ondblclick;">
		<xsl:attribute name="ondblclick">
			<xsl:value-of select="@&ondblclick;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onmousedown;">
		<xsl:attribute name="onmousedown">
			<xsl:value-of select="@&onmousedown;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onmouseup;">
		<xsl:attribute name="onmouseup">
			<xsl:value-of select="@&onmouseup;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onmouseover;">
		<xsl:attribute name="onmouseover">
			<xsl:value-of select="@&onmouseover;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onmousemove;">
		<xsl:attribute name="onmousemove">
			<xsl:value-of select="@&onmousemove;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onmouseout;">
		<xsl:attribute name="onmouseout">
			<xsl:value-of select="@&onmouseout;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onkeypress;">
		<xsl:attribute name="onkeypress">
			<xsl:value-of select="@&onkeypress;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onkeydown;">
		<xsl:attribute name="onkeydown">
			<xsl:value-of select="@&onkeydown;"/>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&onkeyup;">
		<xsl:attribute name="onkeyup">
			<xsl:value-of select="@&onkeyup;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="Style">
	<xsl:if test="@&style;">
		<xsl:attribute name="style">
			<xsl:value-of select="@&style;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- The following are not in their own module, but in case they are used in more than one place within the template as at least some do (e.g.,  "id"), I put them as their own separate template -->

<xsl:template name="cite">
	<xsl:if test="@&cite;">
		<xsl:attribute name="cite">
			<xsl:value-of select="@&cite;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="id">
	<xsl:if test="@&id;">
		<xsl:attribute name="id">
			<xsl:value-of select="@&id;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="version">
	<xsl:if test="@&version;">
		<xsl:attribute name="version">
			<xsl:value-of select="@&version;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="profile">
	<xsl:if test="@&profile;">
		<xsl:attribute name="profile">
			<xsl:value-of select="@&profile;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="accesskey">
	<xsl:if test="@&accesskey;">
		<xsl:attribute name="accesskey">
			<xsl:value-of select="@&accesskey;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="charset">
	<xsl:if test="@&charset;">
		<xsl:attribute name="charset">
			<xsl:value-of select="@&charset;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="href">
	<xsl:if test="@&href;">
		<xsl:attribute name="href">
			<xsl:value-of select="@&href;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="hreflang">
	<xsl:if test="@&hreflang;">
		<xsl:attribute name="hreflang">
			<xsl:value-of select="@&hreflang;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="rel">
	<xsl:call-template name="relrev">
		<xsl:with-param name="relrev" select="'rel'"/>
		<xsl:with-param name="relrevval" select="@&rel;"/>
	</xsl:call-template>
</xsl:template>

<xsl:template name="rev">
	<xsl:call-template name="relrev">
		<xsl:with-param name="relrev" select="'rev'"/>
		<xsl:with-param name="relrevval" select="@&rev;"/>
	</xsl:call-template>
</xsl:template>
	

<xsl:template name="relrev">
	<xsl:param name="relrev"/>
	<xsl:param name="relrevval"/>
	<xsl:if test="$relrevval">
		<xsl:attribute name="{string($relrev)}">
			<xsl:choose>
				<xsl:when test="$relrevval = '&alternate;'">
					<xsl:text>alternate</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&stylesheet;'">
					<xsl:text>stylesheet</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&start;'">
					<xsl:text>start</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&next;'">
					<xsl:text>next</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&prev;'">
					<xsl:text>prev</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&contents;'">
					<xsl:text>contents</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&index;'">
					<xsl:text>index</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&glossary;'">
					<xsl:text>glossary</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&copyright;'">
					<xsl:text>copyright</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&chapter;'">
					<xsl:text>chapter</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&section;'">
					<xsl:text>section</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&subsection;'">
					<xsl:text>subsection</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&appendix;'">
					<xsl:text>appendix</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&help;'">
					<xsl:text>help</xsl:text>
				</xsl:when>
				<xsl:when test="$relrevval = '&bookmark;'">
					<xsl:text>bookmark</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$relrevval"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>


<xsl:template name="tabindex">
	<xsl:if test="@&tabindex;">
		<xsl:attribute name="tabindex">
			<xsl:value-of select="@&tabindex;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="type">
	<xsl:param name="button" select="false()"/>
	<xsl:if test="@&type; and not($button)">
		<xsl:attribute name="type">
			<xsl:choose>
				<xsl:when test="@&type; = '&text;'">
					<xsl:text>text</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&password;'">
					<xsl:text>password</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&checkbox;'">
					<xsl:text>checkbox</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&radio;'">
					<xsl:text>radio</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&submit;'">
					<xsl:text>submit</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&reset;'">
					<xsl:text>reset</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&hidden;'">
					<xsl:text>hidden</xsl:text>
				</xsl:when>
				<xsl:when test="($mod_forms = true()) and (@&type; = '&button;')">
					<xsl:text>button</xsl:text>
				</xsl:when>
				<xsl:when test="($mod_forms = true()) and (@&type; = '&file;')">
					<xsl:text>file</xsl:text>
				</xsl:when>
				<xsl:when test="($mod_forms = true()) and (@&type; = '&image;')">
					<xsl:text>image</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '文本css'">
					<xsl:text>text/css</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<!--  Will also cover legacy ol, ul, li, and dl as well as  a, param, input, button (forms), object, script, style (stylesheet), link; legacy are CDATA, others are ContentType  -->
					<xsl:value-of select="@&type;"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
	<xsl:if test="@&type; and $button">
		<xsl:attribute name="type">
			<xsl:choose>
				<xsl:when test="@&type; = '&button;'">
					<xsl:text>button</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&submit;'">
					<xsl:text>submit</xsl:text>
				</xsl:when>
				<xsl:when test="@&type; = '&reset;'">
					<xsl:text>reset</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- For the Applet Module (param element also used in Object Module which is allowed in XHTML Basic 1.1) -->
<!-- Applet element not needed in XHTML Basic 1.1 -->
<xsl:template name="alt">
	<xsl:if test="@&alt;">
		<xsl:attribute name="alt">
			<xsl:value-of select="@&alt;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="archive">
	<xsl:if test="@&archive;">
		<xsl:attribute name="archive">
			<xsl:value-of select="@&archive;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="code">
	<xsl:if test="@&code;">
		<xsl:attribute name="code">
			<xsl:value-of select="@&code;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="codebase">
	<xsl:if test="@&codebase;">
		<xsl:attribute name="codebase">
			<xsl:value-of select="@&codebase;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="height">
	<xsl:if test="@&height;">
		<xsl:attribute name="height">
			<xsl:value-of select="@&height;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="object">
	<xsl:if test="@&object;">
		<xsl:attribute name="object">
			<xsl:value-of select="@&object;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="width">
	<xsl:if test="@&width;">
		<xsl:attribute name="width">
			<xsl:value-of select="@&width;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- The following are used for param (in the Applet or Object Module) -->
<xsl:template name="name">
	<xsl:if test="@&name;">
		<xsl:attribute name="name">
			<xsl:value-of select="@&name;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="value">
	<xsl:if test="@&value;">
		<xsl:attribute name="value">
			<xsl:value-of select="@&value;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="valuetype">
	<xsl:if test="@&valuetype;">
		<xsl:attribute name="valuetype">
			<xsl:choose>
				<xsl:when test="@&valuetype; = '&data;'">
					<xsl:text>data</xsl:text>
				</xsl:when>
				<xsl:when test="@&valuetype; = '&ref;'">
					<xsl:text>ref</xsl:text>
				</xsl:when>
				<xsl:when test="@&valuetype; = '&object;'">
					<xsl:text>object</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- The following is used in the Edit Module (not a part of XHTML Basic 1.1) -->
<xsl:template name="datetime">
	<xsl:if test="@&datetime;">
		<xsl:attribute name="datetime">
			<xsl:value-of select="@&datetime;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- The following is used in the Bi-directional Text Module -->
<xsl:template name="dir">
	<xsl:if test="@&dir;">
		<xsl:attribute name="dir">
			<xsl:choose>
				<xsl:when test="@&dir; = '&rtl;'">
					<xsl:text>rtl</xsl:text>
				</xsl:when>
				<xsl:when test="@&dir; = '&ltr;'">
					<xsl:text>ltr</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- Intrinsic Events added into XHTML Basic in version 1.1 -->
<xsl:template name="onblur">
	<xsl:if test="@&onblur;">
		<xsl:attribute name="onblur">
			<xsl:value-of select="@&onblur;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onload">
	<xsl:if test="@&onload;">
		<xsl:attribute name="onload">
			<xsl:value-of select="@&onload;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onreset">
	<xsl:if test="@&onreset;">
		<xsl:attribute name="onreset">
			<xsl:value-of select="@&onreset;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onfocus">
	<xsl:if test="@&onfocus;">
		<xsl:attribute name="onfocus">
			<xsl:value-of select="@&onfocus;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onunload">
	<xsl:if test="@&onunload;">
		<xsl:attribute name="onunload">
			<xsl:value-of select="@&onunload;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onsubmit">
	<xsl:if test="@&onsubmit;">
		<xsl:attribute name="onsubmit">
			<xsl:value-of select="@&onsubmit;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onchange">
	<xsl:if test="@&onchange;">
		<xsl:attribute name="onchange">
			<xsl:value-of select="@&onchange;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="onselect">
	<xsl:if test="@&onselect;">
		<xsl:attribute name="onselect">
			<xsl:value-of select="@&onselect;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<!-- The following is used in the XHTML inputmode Attribute Module -->
<xsl:template name="inputmode">
	<xsl:if test="@&inputmode;">
		<xsl:attribute name="inputmode">
			<xsl:value-of select="@&inputmode;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="xmlns">
	<!-- This could be made conditional on there being something in the xmlns attribute, but if someone is including this stylesheet anyways, presumably they mean it 
	<xsl:if test="@&xmlns;"> -->
		<!-- The following was commented out due to the fact that with the stylesheet element possesing an xmlns attribute, the XSL was adding one xmlns attribute already -->
		<!--
		<xsl:attribute name="xmlns">
			<xsl:text>http://www.w3.org/1999/xhtml</xsl:text>
		</xsl:attribute>
		-->
	<!--	</xsl:if> -->
</xsl:template>
<xsl:template name="action">
	<xsl:if test="@&action;">
		<xsl:attribute name="action">
			<xsl:value-of select="@&action;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="method">
	<xsl:if test="@&method;">
		<xsl:attribute name="method">
			<xsl:choose>
				<xsl:when test="@&method; = '&get;'">
					<xsl:text>get</xsl:text>
				</xsl:when>
				<xsl:when test="@&method; = '&post;'">
					<xsl:text>post</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="enctype">
	<xsl:if test="@&enctype;">
		<xsl:attribute name="enctype">
			<xsl:value-of select="@&enctype;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="checked">
	<xsl:if test="@&checked;">
		<xsl:attribute name="checked">
			<xsl:choose>
				<xsl:when test="@&checked; = '&checked;'">
					<xsl:text>checked</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="maxlength">
	<xsl:if test="@&maxlength;">
		<xsl:attribute name="maxlength">
			<xsl:value-of select="@&maxlength;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="size">
	<xsl:if test="@&size;">
		<xsl:attribute name="size">
			<xsl:value-of select="@&size;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="src">
	<xsl:if test="@&src;">
		<xsl:attribute name="src">
			<xsl:value-of select="@&src;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="disabled">
	<xsl:if test="@&disabled;">
		<xsl:attribute name="disabled">
			<xsl:choose>
				<xsl:when test="@&disabled; = '&disabled;'">
					<xsl:text>disabled</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="multiple">
	<xsl:if test="@&multiple;">
		<xsl:attribute name="multiple">
			<xsl:choose>
				<xsl:when test="@&multiple; = '&multiple;'">
					<xsl:text>multiple</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="label">
	<xsl:if test="@&label;">
		<xsl:attribute name="label">
			<xsl:value-of select="@&label;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="selected">
	<xsl:if test="@&selected;">
		<xsl:attribute name="selected">
			<xsl:choose>
				<xsl:when test="@&selected; = '&selected;'">
					<xsl:text>selected</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="cols">
	<xsl:if test="@&cols;">
		<xsl:attribute name="cols">
			<xsl:value-of select="@&cols;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="readonly">
	<xsl:if test="@&readonly;">
		<xsl:attribute name="readonly">
			<xsl:choose>
				<xsl:when test="@&readonly; = '&readonly;'">
					<xsl:text>readonly</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="rows">
	<xsl:if test="@&rows;">
		<xsl:attribute name="rows">
			<xsl:value-of select="@&rows;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="for">
	<xsl:if test="@&for;">
		<xsl:attribute name="for">
			<xsl:value-of select="@&for;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="summary">
	<xsl:if test="@&summary;">
		<xsl:attribute name="summary">
			<xsl:value-of select="@&summary;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="abbr">
	<xsl:if test="@&abbr;">
		<xsl:attribute name="abbr">
			<xsl:value-of select="@&abbr;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="align">
	<xsl:param name="center" select="true()"/>
	<xsl:param name="justify" select="false()"/>
	<xsl:param name="char" select="false()"/>
	<xsl:param name="topbottom" select="false()"/>
	<xsl:param name="middle" select="false()"/>
	<xsl:if test="@&align;">
		<xsl:attribute name="align">
			<xsl:choose>
				<xsl:when test="@&align; = '&left;'">
					<xsl:text>left</xsl:text>
				</xsl:when>
				<xsl:when test="@&align; = '&right;'">
					<xsl:text>right</xsl:text>
				</xsl:when>
				<xsl:when test="$center and (@&align; = '&center;')">
					<xsl:text>center</xsl:text>
				</xsl:when>
				<xsl:when test="$justify and (@&align; = '&justify;')">
					<xsl:text>justify</xsl:text>
				</xsl:when>
				<xsl:when test="$char and (@&align; = '&char;')">
					<xsl:text>char</xsl:text>
				</xsl:when>
				<xsl:when test="$topbottom and (@&align; = '&top;')">
					<xsl:text>top</xsl:text>
				</xsl:when>
				<xsl:when test="$middle and (@&align; = '&middle;')">
					<xsl:text>middle</xsl:text>
				</xsl:when>
				<xsl:when test="$topbottom and (@&align; = '&bottom;')">
					<xsl:text>bottom</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="axis">
	<xsl:if test="@&axis;">
		<xsl:attribute name="axis">
			<xsl:value-of select="@&axis;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="colspan">
	<xsl:if test="@&colspan;">
		<xsl:attribute name="colspan">
			<xsl:value-of select="@&colspan;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="headers">
	<xsl:if test="@&headers;">
		<xsl:attribute name="headers">
			<xsl:value-of select="@&headers;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="rowspan">
	<xsl:if test="@&rowspan;">
		<xsl:attribute name="rowspan">
			<xsl:value-of select="@&rowspan;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="scope">
	<xsl:if test="@&scope;">
		<xsl:attribute name="scope">
			<xsl:choose>
				<xsl:when test="@&scope; = '&row;'">
					<xsl:text>row</xsl:text>
				</xsl:when>
				<xsl:when test="@&scope; = '&col;'">
					<xsl:text>col</xsl:text>
				</xsl:when>
				<xsl:when test="$mod_tables = true()">
					<xsl:choose>
						<xsl:when test="@&scope; = '&rowgroup;'">
							<xsl:text>rowgroup</xsl:text>
						</xsl:when>
						<xsl:when test="@&scope; = '&colgroup;'">
							<xsl:text>colgroup</xsl:text>
						</xsl:when>
					</xsl:choose>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="valign">
	<xsl:if test="@&valign;">
		<xsl:attribute name="valign">
			<xsl:choose>
				<xsl:when test="@&valign; = '&top;'">
					<xsl:text>top</xsl:text>
				</xsl:when>
				<xsl:when test="@&valign; = '&middle;'">
					<xsl:text>middle</xsl:text>
				</xsl:when>
				<xsl:when test="@&valign; = '&bottom;'">
					<xsl:text>bottom</xsl:text>
				</xsl:when>
				<xsl:when test="$mod_tables = true()">
					<xsl:choose>
						<xsl:when test="@&valign; = '&baseline;'">
							<xsl:text>baseline</xsl:text>
						</xsl:when>
					</xsl:choose>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="border">
	<xsl:if test="@&border;">
		<xsl:attribute name="border">
			<xsl:value-of select="@&border;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="cellpadding">
	<xsl:if test="@&cellpadding;">
		<xsl:attribute name="cellpadding">
			<xsl:value-of select="@&cellpadding;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="cellspacing">
	<xsl:if test="@&cellspacing;">
		<xsl:attribute name="cellspacing">
			<xsl:value-of select="@&cellspacing;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="frame">
	<xsl:if test="@&frame;">
		<xsl:attribute name="frame">
			<xsl:choose>
				<xsl:when test="@&frame; = '&void;'">
					<xsl:text>void</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&above;'">
					<xsl:text>above</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&below;'">
					<xsl:text>below</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&hsides;'">
					<xsl:text>hsides</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&lhs;'">
					<xsl:text>lhs</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&rhs;'">
					<xsl:text>rhs</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&vsides;'">
					<xsl:text>vsides</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&box;'">
					<xsl:text>box</xsl:text>
				</xsl:when>
				<xsl:when test="@&frame; = '&border;'">
					<xsl:text>border</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="@&frame;"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="rules">
	<xsl:if test="@&rules;">
		<xsl:attribute name="rules">
			<xsl:choose>
				<xsl:when test="@&rules; = '&none;'">
					<xsl:text>none</xsl:text>
				</xsl:when>
				<xsl:when test="@&rules; = '&groups;'">
					<xsl:text>groups</xsl:text>
				</xsl:when>
				<xsl:when test="@&rules; = '&rows;'">
					<xsl:text>rows</xsl:text>
				</xsl:when>
				<xsl:when test="@&rules; = '&cols;'">
					<xsl:text>cols</xsl:text>
				</xsl:when>
				<xsl:when test="@&rules; = '&all;'">
					<xsl:text>all</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="char">
	<xsl:if test="@&char;">
		<xsl:attribute name="char">
			<xsl:value-of select="@&char;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="charoff">
	<xsl:if test="@&charoff;">
		<xsl:attribute name="charoff">
			<xsl:value-of select="@&charoff;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="span">
	<xsl:if test="@&span;">
		<xsl:attribute name="span">
			<xsl:value-of select="@&span;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="longdesc">
	<xsl:if test="@&longdesc;">
		<xsl:attribute name="longdesc">
			<xsl:value-of select="@&longdesc;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="coords">
	<xsl:if test="@&coords;">
		<xsl:attribute name="coords">
			<xsl:value-of select="@&coords;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="shape">
	<xsl:if test="@&shape;">
		<xsl:attribute name="shape">
			<xsl:choose>
				<xsl:when test="@&shape; = '&rect;'">
					<xsl:text>rect</xsl:text>
				</xsl:when>
				<xsl:when test="@&shape; = '&circle;'">
					<xsl:text>circle</xsl:text>
				</xsl:when>
				<xsl:when test="@&shape; = '&poly;'">
					<xsl:text>poly</xsl:text>
				</xsl:when>
				<xsl:when test="@&shape; = '&default;'">
					<xsl:text>default</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="nohref">
	<xsl:if test="@&nohref;">
		<xsl:attribute name="nohref">
			<xsl:choose>
				<xsl:when test="@&nohref; = '&nohref;'">
					<xsl:text>nohref</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="usemap">
	<xsl:if test="@&usemap;">
		<xsl:attribute name="usemap">
			<xsl:value-of select="@&usemap;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="ismap">
	<xsl:if test="@&ismap;">
		<xsl:attribute name="ismap">
			<xsl:choose>
				<xsl:when test="@&ismap; = '&ismap;'">
					<xsl:text>ismap</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="classid">
	<xsl:if test="@&classid;">
		<xsl:attribute name="classid">
			<xsl:value-of select="@&classid;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="codetype">
	<xsl:if test="@&codetype;">
		<xsl:attribute name="codetype">
			<xsl:value-of select="@&codetype;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="data">
	<xsl:if test="@&data;">
		<xsl:attribute name="data">
			<xsl:value-of select="@&data;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="declare">
	<xsl:if test="@&declare;">
		<xsl:attribute name="declare">
			<xsl:choose>
				<xsl:when test="@&declare; = '&declare;'">
					<xsl:text>declare</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="standby">
	<xsl:if test="@&standby;">
		<xsl:attribute name="standby">
			<xsl:value-of select="@&standby;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="frameborder">
	<xsl:if test="@&frameborder;">
		<xsl:attribute name="frameborder">
			<xsl:value-of select="@&frameborder;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="marginheight">
	<xsl:if test="@&marginheight;">
		<xsl:attribute name="marginheight">
			<xsl:value-of select="@&marginheight;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="marginwidth">
	<xsl:if test="@&marginwidth;">
		<xsl:attribute name="marginwidth">
			<xsl:value-of select="@&marginwidth;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="noresize">
	<xsl:if test="@&noresize;">
		<xsl:attribute name="noresize">
			<xsl:choose>
				<xsl:when test="@&noresize; = '&noresize;'">
					<xsl:text>noresize</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="scrolling">
	<xsl:if test="@&scrolling;">
		<xsl:attribute name="scrolling">
			<xsl:choose>
				<xsl:when test="@&scrolling; = '&yes;'">
					<xsl:text>yes</xsl:text>
				</xsl:when>
				<xsl:when test="@&scrolling; = '&no;'">
					<xsl:text>no</xsl:text>
				</xsl:when>
				<xsl:when test="@&scrolling; = '&auto;'">
					<xsl:text>auto</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="target">
	<xsl:if test="@&target;">
		<xsl:attribute name="target">
			<xsl:choose>
				<xsl:when test="@&target; = '&blank;'">
					<xsl:text>_blank</xsl:text>
				</xsl:when>
				<xsl:when test="@&target; = '&self;'">
					<xsl:text>_self</xsl:text>
				</xsl:when>
				<xsl:when test="@&target; = '&parent;'">
					<xsl:text>_parent</xsl:text>
				</xsl:when>
				<xsl:when test="@&target; = '&top;'">
					<xsl:text>_top</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="@&target;"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="content">
	<xsl:if test="@&content;">
		<xsl:attribute name="content">
			<xsl:value-of select="@&content;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="http-equiv">
	<xsl:if test="@&http-equiv;">
		<xsl:attribute name="http-equiv">
			<xsl:value-of select="@&http-equiv;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="scheme">
	<xsl:if test="@&scheme;">
		<xsl:attribute name="scheme">
			<xsl:value-of select="@&scheme;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="defer">
	<xsl:if test="@&defer;">
		<xsl:attribute name="defer">
			<xsl:choose>
				<xsl:when test="@&defer; = '&defer;'">
					<xsl:text>defer</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="media">
	<xsl:param name="mediaval" select="@&media;"/>
	<xsl:if test="$mediaval">
		<xsl:attribute name="media">
			<xsl:choose>
				<xsl:when test="$mediaval = '&screen;'">
					<xsl:text>screen</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&tty;'">
					<xsl:text>tty</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&tv;'">
					<xsl:text>tv</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&projection;'">
					<xsl:text>projection</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&handheld;'">
					<xsl:text>handheld</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&print;'">
					<xsl:text>print</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&braille;'">
					<xsl:text>braille</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&aural;'">
					<xsl:text>aural</xsl:text>
				</xsl:when>
				<xsl:when test="$mediaval = '&all;'">
					<xsl:text>all</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$mediaval"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>	
</xsl:template>
<xsl:template name="color">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'color'"/>
		<xsl:with-param name="colorval" select="@&color;"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="face">
	<xsl:if test="@&face;">
		<xsl:attribute name="face">
			<xsl:value-of select="@&face;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="compact">
	<xsl:if test="@&compact;">
		<xsl:attribute name="compact">
			<xsl:choose>
				<xsl:when test="@&compact; = '&compact;'">
					<xsl:text>compact</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="prompt">
	<xsl:if test="@&prompt;">
		<xsl:attribute name="prompt">
			<xsl:value-of select="@&prompt;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="background">
	<xsl:if test="@&background;">
		<xsl:attribute name="background">
			<xsl:value-of select="@&background;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="bgcolor">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'bgcolor'"/>
		<xsl:with-param name="colorval" select="@&bgcolor;"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="link">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'link'"/>
		<xsl:with-param name="colorval" select="@&link;"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="alink">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'alink'"/>
		<xsl:with-param name="colorval" select="@&alink;"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="text">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'text'"/>
		<xsl:with-param name="colorval" select="@&text;"/>
	</xsl:call-template>
</xsl:template>
<xsl:template name="vlink">
	<xsl:call-template name="colorvals">
		<xsl:with-param name="coloratt" select="'vlink'"/>
		<xsl:with-param name="colorval" select="@&vlink;"/>
	</xsl:call-template>
</xsl:template>

<xsl:template name="colorvals">
	<xsl:param name="coloratt"/>
	<xsl:param name="colorval"/>
	<xsl:if test="$colorval">
		<xsl:attribute name="{string($coloratt)}">
			<xsl:choose>
				<xsl:when test="$colorval = '&black;'">
					<xsl:text>black</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&green;'">
					<xsl:text>green</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&silver;'">
					<xsl:text>silver</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&lime;'">
					<xsl:text>lime</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&gray;'">
					<xsl:text>gray</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&olive;'">
					<xsl:text>olive</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&white;'">
					<xsl:text>white</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&yellow;'">
					<xsl:text>yellow</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&maroon;'">
					<xsl:text>maroon</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&navy;'">
					<xsl:text>navy</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&red;'">
					<xsl:text>red</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&blue;'">
					<xsl:text>blue</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&purple;'">
					<xsl:text>purple</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&teal;'">
					<xsl:text>teal</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&fuchsia;'">
					<xsl:text>fuchsia</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&aqua;'">
					<xsl:text>aqua</xsl:text>
				</xsl:when>
				<xsl:when test="$colorval = '&orange;'">
					<xsl:text>orange</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$colorval"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>

<xsl:template name="clear">
	<xsl:if test="@&clear;">
		<xsl:attribute name="clear">
			<xsl:choose>
				<xsl:when test="@&clear; = '&left;'">
					<xsl:text>left</xsl:text>
				</xsl:when>
				<xsl:when test="@&clear; = '&all;'">
					<xsl:text>all</xsl:text>
				</xsl:when>
				<xsl:when test="@&clear; = '&right;'">
					<xsl:text>right</xsl:text>
				</xsl:when>
				<xsl:when test="@&clear; = '&none;'">
					<xsl:text>none</xsl:text>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="@&clear;"/>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>		
	</xsl:if>
</xsl:template>
<xsl:template name="noshade">
	<xsl:if test="@&noshade;">
		<xsl:attribute name="noshade">
			<xsl:choose>
				<xsl:when test="@&noshade; = '&noshade;'">
					<xsl:text>noshade</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="hspace">
	<xsl:if test="@&hspace;">
		<xsl:attribute name="hspace">
			<xsl:value-of select="@&hspace;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="vspace">
	<xsl:if test="@&vspace;">
		<xsl:attribute name="vspace">
			<xsl:value-of select="@&vspace;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="start">
	<xsl:if test="@&start;">
		<xsl:attribute name="start">
			<xsl:value-of select="@&start;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="language">
	<xsl:if test="@&language;">
		<xsl:attribute name="language">
			<xsl:value-of select="@&language;"/>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<xsl:template name="nowrap">
	<xsl:if test="@&nowrap;">
		<xsl:attribute name="nowrap">
			<xsl:choose>
				<xsl:when test="@&nowrap; = '&nowrap;'">
					<xsl:text>nowrap</xsl:text>
				</xsl:when>
			</xsl:choose>
		</xsl:attribute>
	</xsl:if>
</xsl:template>
<!-- These along with 'html' above are part of the Structure Module -->
<xsl:template match="&head;"><head><xsl:call-template name="I18N"/><xsl:call-template name="id"/><xsl:call-template name="profile"/><xsl:apply-templates/></head></xsl:template>
<xsl:template match="&title;"><title><xsl:call-template name="I18N"/><xsl:call-template name="id"/><xsl:apply-templates/></title></xsl:template>
<xsl:template match="&body;"><body><xsl:call-template name="Common"/>
	<xsl:if test="$mod_legacy = true()">
		<xsl:call-template name="alink"/><xsl:call-template name="background"/><xsl:call-template name="bgcolor"/><xsl:call-template name="link"/><xsl:call-template name="text"/><xsl:call-template name="vlink"/>
	</xsl:if>
	<xsl:if test="$mod_intrinsic_events = true()">
		<xsl:call-template name="onload"/>
		<xsl:call-template name="onunload"/>
	</xsl:if>
<xsl:apply-templates/></body></xsl:template>

<!-- Text Module  -->
<!-- <xsl:if test="$mod_text = true()"> -->
	<xsl:template match="&abbr;"><abbr><xsl:call-template name="Common"/><xsl:apply-templates/></abbr></xsl:template>
	<xsl:template match="&acronym;"><acronym><xsl:call-template name="Common"/><xsl:apply-templates/></acronym></xsl:template>
	<xsl:template match="&address;"><address><xsl:call-template name="Common"/><xsl:apply-templates/></address></xsl:template>
	<xsl:template match="&blockquote;"><blockquote><xsl:call-template name="Common"/><xsl:call-template name="cite"/><xsl:apply-templates/></blockquote></xsl:template>
	<xsl:template match="&br;"><br><xsl:call-template name="Core"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="clear"/>
		</xsl:if>
		<xsl:apply-templates/></br></xsl:template>
	<xsl:template match="&cite;"><cite><xsl:call-template name="Common"/><xsl:apply-templates/></cite></xsl:template>
	<xsl:template match="&code;"><code><xsl:call-template name="Common"/><xsl:apply-templates/></code></xsl:template>
	<xsl:template match="&dfn;"><dfn><xsl:call-template name="Common"/><xsl:apply-templates/></dfn></xsl:template>
	<xsl:template match="&div;"><div><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
	<xsl:apply-templates/></div></xsl:template>
	<xsl:template match="&em;"><em><xsl:call-template name="Common"/><xsl:apply-templates/></em></xsl:template>
	<xsl:template match="&h;&number1;"><h1><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h1></xsl:template>
	<xsl:template match="&h;&number2;"><h2><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h2></xsl:template>
	<xsl:template match="&h;&number3;"><h3><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h3></xsl:template>
	<xsl:template match="&h;&number4;"><h4><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h4></xsl:template>
	<xsl:template match="&h;&number5;"><h5><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h5></xsl:template>
	<xsl:template match="&h;&number6;"><h6><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></h6></xsl:template>
	<xsl:template match="&kbd;"><kbd><xsl:call-template name="Common"/><xsl:apply-templates/></kbd></xsl:template>
	<xsl:template match="&p;"><p><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></p></xsl:template>
	<xsl:template match="&pre;"><pre><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="width"/>
		</xsl:if>
		<xsl:apply-templates/></pre></xsl:template>
	<xsl:template match="&q;"><q><xsl:call-template name="Common"/><xsl:call-template name="cite"/><xsl:apply-templates/></q></xsl:template>
	<xsl:template match="&samp;"><samp><xsl:call-template name="Common"/><xsl:apply-templates/></samp></xsl:template>
	<xsl:template match="&span;"><span><xsl:call-template name="Common"/><xsl:apply-templates/></span></xsl:template>
	<xsl:template match="&strong;"><strong><xsl:call-template name="Common"/><xsl:apply-templates/></strong></xsl:template>
	<xsl:template match="&var;"><var><xsl:call-template name="Common"/><xsl:apply-templates/></var></xsl:template>
<!--</xsl:if>-->

<!-- Hypertext Module -->
<!--<xsl:if test="$mod_hypertext = true()">-->
	<xsl:template match="&a;"><a><xsl:call-template name="Common"/><xsl:call-template name="Common"/><xsl:call-template name="accesskey"/><xsl:call-template name="charset"/><xsl:call-template name="href"/><xsl:call-template name="hreflang"/><xsl:call-template name="rel"/><xsl:call-template name="rev"/><xsl:call-template name="tabindex"/><xsl:call-template name="type"/>
	<xsl:if test="$mod_cs_image_map = true()">
		<xsl:call-template name="coords"/><xsl:call-template name="shape"/>
	</xsl:if>
	<xsl:if test="$mod_target = true()">
		<xsl:call-template name="target"/>
	</xsl:if>
	<xsl:if test="$mod_name_id = true()">
		<xsl:call-template name="name"/>
	</xsl:if>
	<xsl:if test="$mod_intrinsic_events = true()">
		<xsl:call-template name="onblur"/>
		<xsl:call-template name="onfocus"/>
	</xsl:if>
	<xsl:apply-templates/></a></xsl:template>
<!--</xsl:if>-->

<!-- List Module -->
<!--<xsl:if test="$mod_list = true()">-->
	<xsl:template match="&dl;"><dl><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="compact"/>
			<xsl:call-template name="type"/>
		</xsl:if>
		<xsl:apply-templates/></dl></xsl:template>
	<xsl:template match="&dt;"><dt><xsl:call-template name="Common"/><xsl:apply-templates/></dt></xsl:template>
	<xsl:template match="&dd;"><dd><xsl:call-template name="Common"/><xsl:apply-templates/></dd></xsl:template>
	<xsl:template match="&ol;"><ol><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="compact"/>
			<xsl:call-template name="start"/>
			<xsl:call-template name="type"/>
		</xsl:if>
		<xsl:apply-templates/></ol></xsl:template>
	<xsl:template match="&ul;"><ul><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="compact"/>
			<xsl:call-template name="type"/>
		</xsl:if>
		<xsl:apply-templates/></ul></xsl:template>
	<xsl:template match="&li;"><li><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="type"/>
			<xsl:call-template name="value"/>
		</xsl:if>
	<xsl:apply-templates/></li></xsl:template>
<!--</xsl:if>-->

<!-- Applet Module (not in XHTML Basic 1.1) -->
<!--<xsl:if test="$mod_applet = true()">-->
	<xsl:template match="&applet;"><applet><xsl:call-template name="Core"/><xsl:call-template name="alt"/><xsl:call-template name="archive"/><xsl:call-template name="code"/><xsl:call-template name="codebase"/><xsl:call-template name="height"/><xsl:call-template name="object"/><xsl:call-template name="width"/>
		<xsl:if test="$mod_name_id = true()">
			<xsl:call-template name="name"/>
		</xsl:if>
		<xsl:apply-templates/></applet></xsl:template>
<!--</xsl:if>-->

<!-- Presentation Module (not in XHTML Basic 1.1) -->
<!--<xsl:if test="$mod_presentation = true()">-->
	<xsl:template match="&b;"><b><xsl:call-template name="Common"/><xsl:apply-templates/></b></xsl:template>
	<xsl:template match="&big;"><big><xsl:call-template name="Common"/><xsl:apply-templates/></big></xsl:template>
	<xsl:template match="&hr;"><hr><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
			<xsl:call-template name="noshade"/>
			<xsl:call-template name="size"/>
			<xsl:call-template name="width"/>
		</xsl:if>
		<xsl:apply-templates/></hr></xsl:template>
	<xsl:template match="&i;"><i><xsl:call-template name="Common"/><xsl:apply-templates/></i></xsl:template>
	<xsl:template match="&little;"><small><xsl:call-template name="Common"/><xsl:apply-templates/></small></xsl:template>
	<xsl:template match="&sub;"><sub><xsl:call-template name="Common"/><xsl:apply-templates/></sub></xsl:template>
	<xsl:template match="&sup;"><sup><xsl:call-template name="Common"/><xsl:apply-templates/></sup></xsl:template>
	<xsl:template match="&tt;"><tt><xsl:call-template name="Common"/><xsl:apply-templates/></tt></xsl:template>
<!--</xsl:if>-->

<!-- Edit Module (not in XHTML Basic 1.1) -->
<!--<xsl:if test="$mod_edit = true()">-->
	<xsl:template match="&del;"><del><xsl:call-template name="Common"/><xsl:call-template name="cite"/><xsl:call-template name="datetime"/><xsl:apply-templates/></del></xsl:template>
	<xsl:template match="&ins;"><ins><xsl:call-template name="Common"/><xsl:call-template name="cite"/><xsl:call-template name="datetime"/><xsl:apply-templates/></ins></xsl:template>
<!--</xsl:if>-->

<!-- Bi-directional Text Module -->
<!--<xsl:if test="$mod_bdo = true()">-->
	<xsl:template match="&bdo;"><bdo><xsl:call-template name="Core"/><xsl:call-template name="dir"/><xsl:apply-templates/></bdo></xsl:template>
<!--</xsl:if>-->


<!-- Basic Forms Module -->
<!--<xsl:if test="($mod_basic_forms = true()) or ($mod_forms = true())">-->
	<xsl:template match="&form;"><form>
		<xsl:call-template name="Common"/>
		<xsl:if test="$mod_forms = true()">
			<xsl:call-template name="accept"/><xsl:call-template name="accept-charset"/></xsl:if>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onreset"/>
			<xsl:call-template name="onsubmit"/>
		</xsl:if>
		<xsl:if test="$mod_name_id = true()">
			<xsl:call-template name="name"/>
		</xsl:if>
		<xsl:call-template name="action"/><xsl:call-template name="method"/><xsl:call-template name="enctype"/><xsl:apply-templates/></form></xsl:template>
	<xsl:template match="&input;"><input><xsl:call-template name="Common"/>
		<xsl:if test="$mod_forms = true()">
			<xsl:call-template name="accept"/><xsl:call-template name="alt"/><xsl:call-template name="disabled"/><xsl:call-template name="readonly"/></xsl:if>
		<xsl:if test="$mod_cs_image_map = true()">
			<xsl:call-template name="coords"/><xsl:call-template name="shape"/></xsl:if>
		<xsl:if test="$mod_ss_image_map = true()">
			<xsl:call-template name="ismap"/>
		</xsl:if>
		<xsl:if test="$mod_target = true()">
			<xsl:call-template name="target"/>
		</xsl:if>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="center" select="false()"/><xsl:with-param name="topbottom" select="true()"/><xsl:with-param name="middle" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:if test="$mod_inputmode = true()">
			<xsl:call-template name="inputmode"/>
		</xsl:if>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onchange"/>
			<xsl:call-template name="onfocus"/>
			<xsl:call-template name="onselect"/>
		</xsl:if>
		<xsl:call-template name="accesskey"/><xsl:call-template name="checked"/><xsl:call-template name="maxlength"/><xsl:call-template name="name"/><xsl:call-template name="size"/><xsl:call-template name="src"/><xsl:call-template name="tabindex"/><xsl:call-template name="type"/><xsl:call-template name="value"/><xsl:apply-templates/></input></xsl:template>
	<xsl:template match="&label;"><label><xsl:call-template name="Common"/><xsl:call-template name="accesskey"/><xsl:call-template name="for"/>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onfocus"/>
		</xsl:if>
		<xsl:apply-templates/></label></xsl:template>
	<xsl:template match="&select;"><select><xsl:call-template name="Common"/>
		<xsl:if test="$mod_forms = true()">
			<xsl:call-template name="disabled"/></xsl:if>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onchange"/>
			<xsl:call-template name="onfocus"/>
			<xsl:call-template name="onselect"/>
		</xsl:if>
	<xsl:call-template name="multiple"/><xsl:call-template name="name"/><xsl:call-template name="size"/><xsl:call-template name="tabindex"/><xsl:apply-templates/></select></xsl:template>
	<xsl:template match="&option;"><option><xsl:call-template name="Common"/>
		<xsl:if test="$mod_forms = true()">
			<xsl:call-template name="label"/><xsl:call-template name="disabled"/></xsl:if>
		<xsl:call-template name="selected"/><xsl:call-template name="value"/><xsl:apply-templates/></option></xsl:template>
	<xsl:template match="&textarea;"><textarea><xsl:call-template name="Common"/>
		<xsl:if test="$mod_forms = true()">
			<xsl:call-template name="disabled"/><xsl:call-template name="readonly"/></xsl:if>
		<xsl:call-template name="accesskey"/><xsl:call-template name="cols"/><xsl:call-template name="name"/><xsl:call-template name="rows"/><xsl:call-template name="tabindex"/>
		<xsl:if test="$mod_inputmode = true()">
			<xsl:call-template name="inputmode"/>
		</xsl:if>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onchange"/>
			<xsl:call-template name="onfocus"/>
			<xsl:call-template name="onselect"/>
		</xsl:if>
		<xsl:apply-templates/></textarea></xsl:template>
<!--</xsl:if>-->

<!-- Forms Module -->
<!--<xsl:if test="$mod_forms = true()">-->
	<xsl:template match="&button;"><button><xsl:call-template name="Common"/><xsl:call-template name="accesskey"/><xsl:call-template name="disabled"/><xsl:call-template name="name"/><xsl:call-template name="tabindex"/><xsl:call-template name="type"><xsl:with-param name="button" select="true()"/></xsl:call-template><xsl:call-template name="value"/>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onfocus"/>
		</xsl:if>
		<xsl:apply-templates/></button></xsl:template>
	<xsl:template match="&fieldset;"><fieldset><xsl:call-template name="Common"/><xsl:apply-templates/></fieldset></xsl:template>
	<xsl:template match="&legend;"><legend><xsl:call-template name="Common"/><xsl:call-template name="accesskey"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/></xsl:call-template>
		</xsl:if>
		<xsl:apply-templates/></legend></xsl:template>
	<xsl:template match="&optgroup;"><optgroup><xsl:call-template name="Common"/><xsl:call-template name="disabled"/><xsl:call-template name="label"/><xsl:apply-templates/></optgroup></xsl:template>
<!--</xsl:if>-->

<!-- Basic Tables Module -->
<!--<xsl:if test="($mod_basic_tables = true()) or ($mod_tables = true())">-->
	<xsl:template match="&caption;"><caption><xsl:call-template name="Common"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"><xsl:with-param name="center" select="false()"/><xsl:with-param name="topbottom" select="true()"/></xsl:call-template>
		</xsl:if>
	<xsl:apply-templates/></caption></xsl:template>
	<xsl:template match="&table;"><table>
		<xsl:call-template name="Common"/>
		<xsl:if test="$mod_tables = true()">
			<xsl:call-template name="border"/><xsl:call-template name="cellpadding"/><xsl:call-template name="cellspacing"/><xsl:call-template name="frame"/><xsl:call-template name="rules"/></xsl:if>
		<xsl:call-template name="width"/><xsl:call-template name="summary"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="align"/>
			<xsl:call-template name="bgcolor"/>
		</xsl:if>
		<xsl:apply-templates/></table></xsl:template>
	<xsl:template match="&td;"><td><xsl:call-template name="Common"/>
		<xsl:call-template name="abbr"/>
		<xsl:choose>
			<xsl:when test="$mod_tables">
				<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="align"/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="axis"/>
		<xsl:if test="$mod_tables = true()">
			<xsl:call-template name="char"/><xsl:call-template name="charoff"/></xsl:if>
		<xsl:call-template name="colspan"/><xsl:call-template name="headers"/><xsl:call-template name="rowspan"/><xsl:call-template name="scope"/><xsl:call-template name="valign"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="bgcolor"/>
			<xsl:call-template name="height"/>
			<xsl:call-template name="nowrap"/>
			<xsl:call-template name="width"/>
		</xsl:if>
		<xsl:apply-templates/></td></xsl:template>
	<xsl:template match="&th;"><th><xsl:call-template name="Common"/>
		<xsl:if test="$mod_tables = true()">
			<xsl:call-template name="char"/><xsl:call-template name="charoff"/></xsl:if>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="bgcolor"/>
			<xsl:call-template name="height"/>
			<xsl:call-template name="nowrap"/>
			<xsl:call-template name="width"/>
		</xsl:if>
		<xsl:call-template name="abbr"/>
		
		<xsl:choose>
			<xsl:when test="$mod_tables">
				<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="align"/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="axis"/><xsl:call-template name="colspan"/><xsl:call-template name="headers"/><xsl:call-template name="rowspan"/><xsl:call-template name="scope"/><xsl:call-template name="valign"/><xsl:apply-templates/></th></xsl:template>
	<xsl:template match="&tr;"><tr><xsl:call-template name="Common"/>
		<xsl:if test="$mod_tables = true()">
			<xsl:call-template name="char"/><xsl:call-template name="charoff"/></xsl:if>
		<xsl:choose>
			<xsl:when test="$mod_tables">
				<xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="align"/>
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="valign"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="bgcolor"/>
		</xsl:if>
		<xsl:apply-templates/></tr></xsl:template>
<!--</xsl:if>-->

<!-- Tables Module -->
<!--<xsl:if test="$mod_tables = true()">-->
	<xsl:template match="&col;"><col><xsl:call-template name="Common"/><xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template><xsl:call-template name="char"/><xsl:call-template name="charoff"/><xsl:call-template name="span"/><xsl:call-template name="valign"/><xsl:call-template name="width"/><xsl:apply-templates/></col></xsl:template>
	<xsl:template match="&colgroup;"><colgroup><xsl:call-template name="Common"/><xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template><xsl:call-template name="char"/><xsl:call-template name="charoff"/><xsl:call-template name="span"/><xsl:call-template name="valign"/><xsl:call-template name="width"/><xsl:apply-templates/></colgroup></xsl:template>
	<xsl:template match="&tbody;"><tbody><xsl:call-template name="Common"/><xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template><xsl:call-template name="char"/><xsl:call-template name="charoff"/><xsl:call-template name="valign"/><xsl:apply-templates/></tbody></xsl:template>
	<xsl:template match="&thead;"><thead><xsl:call-template name="Common"/><xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template><xsl:call-template name="char"/><xsl:call-template name="charoff"/><xsl:call-template name="valign"/><xsl:apply-templates/></thead></xsl:template>
	<xsl:template match="&tfoot;"><tfoot><xsl:call-template name="Common"/><xsl:call-template name="align"><xsl:with-param name="justify" select="true()"/><xsl:with-param name="char" select="true()"/></xsl:call-template><xsl:call-template name="char"/><xsl:call-template name="charoff"/><xsl:call-template name="valign"/><xsl:apply-templates/></tfoot></xsl:template>
<!--</xsl:if>-->

<!-- Image Module -->
<!--<xsl:if test="$mod_image = true()">-->
	<xsl:template match="&img;"><img><xsl:call-template name="Common"/><xsl:call-template name="alt"/><xsl:call-template name="height"/><xsl:call-template name="longdesc"/><xsl:call-template name="src"/><xsl:call-template name="width"/>
	<xsl:if test="$mod_cs_image_map = true()">
		<xsl:call-template name="usemap"/>
	</xsl:if>
	<xsl:if test="$mod_ss_image_map = true()">
		<xsl:call-template name="ismap"/>
	</xsl:if>
	<xsl:if test="$mod_name_id = true()">
		<xsl:call-template name="name"/>
	</xsl:if>
	<xsl:if test="$mod_legacy = true()">
		<xsl:call-template name="align"><xsl:with-param name="center" select="false()"/><xsl:with-param name="topbottom" select="true()"/><xsl:with-param name="middle" select="true()"/></xsl:call-template>
		<xsl:call-template name="border"/>
		<xsl:call-template name="hspace"/>
		<xsl:call-template name="vspace"/>
	</xsl:if>
	<xsl:apply-templates/></img></xsl:template>
<!--</xsl:if>-->

<!-- Client-side Image Map Module -->

<!--<xsl:if test="$mod_cs_image_map = true()">-->
	<xsl:template match="&area;"><area><xsl:call-template name="Common"/><xsl:call-template name="accesskey"/><xsl:call-template name="alt"/><xsl:call-template name="coords"/><xsl:call-template name="href"/><xsl:call-template name="nohref"/><xsl:call-template name="shape"/><xsl:call-template name="tabindex"/>
		<xsl:if test="$mod_target = true()">
			<xsl:call-template name="target"/>
		</xsl:if>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onblur"/>
			<xsl:call-template name="onfocus"/>
		</xsl:if>
		<xsl:apply-templates/></area></xsl:template>
	<xsl:template match="&map;"><map><xsl:call-template name="I18N"/><xsl:call-template name="Events"/><xsl:call-template name="class"/><xsl:call-template name="id"/><xsl:call-template name="title"/>
		<xsl:if test="$mod_name_id = true()">
			<xsl:call-template name="name"/>
		</xsl:if>
		<xsl:apply-templates/></map></xsl:template>
<!--</xsl:if>-->

<!-- Object Module -->

<!--<xsl:if test="$mod_object = true()">-->
	<xsl:template match="&object;"><object><xsl:call-template name="Common"/>
		<xsl:call-template name="archive"/><xsl:call-template name="classid"/><xsl:call-template name="codebase"/><xsl:call-template name="codetype"/><xsl:call-template name="data"/><xsl:call-template name="declare"/><xsl:call-template name="height"/><xsl:call-template name="name"/><xsl:call-template name="standby"/><xsl:call-template name="tabindex"/><xsl:call-template name="type"/><xsl:call-template name="width"/>
		<xsl:if test="$mod_cs_image_map = true()">
			<xsl:call-template name="usemap"/>
		</xsl:if>
		<xsl:apply-templates/></object></xsl:template>
<!--</xsl:if>-->

<!-- Don't redeclare if object is already declared; will there be an error otherwise? -->
<!--<xsl:if test="($mod_object = true()) or ($mod_applet = true())">-->
		<xsl:template match="&param;"><param><xsl:call-template name="id"/><xsl:call-template name="name"/><xsl:call-template name="type"/><xsl:call-template name="value"/><xsl:call-template name="valuetype"/><xsl:apply-templates/></param></xsl:template>
<!--</xsl:if>-->


<!-- Frames Module -->
<!--<xsl:if test="$mod_frames = true()">-->
	<xsl:template match="&frameset;"><frameset><xsl:call-template name="Core"/><xsl:call-template name="cols"/><xsl:call-template name="rows"/>
		<xsl:if test="$mod_intrinsic_events = true()">
			<xsl:call-template name="onload"/>
			<xsl:call-template name="onunload"/>
		</xsl:if>
		<xsl:apply-templates/></frameset></xsl:template>
	<xsl:template match="&frame;"><frame><xsl:call-template name="Core"/><xsl:call-template name="frameborder"/><xsl:call-template name="longdesc"/><xsl:call-template name="marginheight"/><xsl:call-template name="marginwidth"/><xsl:call-template name="noresize"/><xsl:call-template name="scrolling"/><xsl:call-template name="src"/>
		<xsl:if test="$mod_name_id = true()">
			<xsl:call-template name="name"/>
		</xsl:if>
		<xsl:apply-templates/></frame></xsl:template>
	<xsl:template match="&noframes;"><noframes><xsl:call-template name="Common"/><xsl:apply-templates/></noframes></xsl:template>
<!--</xsl:if>-->

<!-- Iframe Module -->
<!--<xsl:if test="$mod_iframe = true()">-->
	<xsl:template match="&iframe;"><iframe><xsl:call-template name="Core"/>
		<xsl:call-template name="frameborder"/><xsl:call-template name="height"/><xsl:call-template name="longdesc"/><xsl:call-template name="marginheight"/><xsl:call-template name="marginwidth"/><xsl:call-template name="scrolling"/><xsl:call-template name="src"/><xsl:call-template name="width"/>
		<xsl:if test="$mod_name_id = true()">
			<xsl:call-template name="name"/>
		</xsl:if>
		<xsl:apply-templates/></iframe></xsl:template>
<!--</xsl:if>-->

<!-- Metainformation Module -->
<!--<xsl:if test="$mod_meta = true()">-->
	<xsl:template match="&meta;"><meta><xsl:call-template name="I18N"/><xsl:call-template name="content"/><xsl:call-template name="http-equiv"/><xsl:call-template name="id"/><xsl:call-template name="name"/><xsl:call-template name="scheme"/><xsl:apply-templates/></meta></xsl:template>
<!--</xsl:if>-->

<!-- Scripting Module -->
<!--<xsl:if test="$mod_scripting = true()">-->
	<xsl:template match="&script;"><script><xsl:call-template name="charset"/><xsl:call-template name="defer"/><xsl:call-template name="src"/><xsl:call-template name="type"/>
		<xsl:if test="$mod_legacy = true()">
			<xsl:call-template name="language"/>
		</xsl:if>
		<xsl:apply-templates/></script></xsl:template>
	<xsl:template match="&noscript;"><noscript><xsl:call-template name="Common"/><xsl:apply-templates/></noscript></xsl:template>
<!--</xsl:if>-->

<!-- Style Sheet Module -->
<!--<xsl:if test="$mod_stylesheet = true()">-->
	<xsl:template match="&style;"><style><xsl:call-template name="I18N"/><xsl:call-template name="id"/><xsl:call-template name="media"/><xsl:call-template name="title"/><xsl:call-template name="type"/><xsl:apply-templates/></style></xsl:template>
<!--</xsl:if>-->


<!-- Link Module -->
<!--<xsl:if test="$mod_link = true()">-->
	<xsl:template match="&link;"><link><xsl:call-template name="Common"/>
		<xsl:call-template name="charset"/><xsl:call-template name="href"/><xsl:call-template name="hreflang"/><xsl:call-template name="media"/><xsl:call-template name="rel"/><xsl:call-template name="rev"/><xsl:call-template name="type"/>
		<xsl:if test="$mod_target = true()">
			<xsl:call-template name="target"/>
		</xsl:if>
		<xsl:apply-templates/></link></xsl:template>
<!--</xsl:if>-->

<!-- Base Module -->
<!--<xsl:if test="$mod_base = true()">-->
	<xsl:template match="&base;"><base>
		<xsl:call-template name="href"/><xsl:call-template name="id"/>
		<xsl:if test="$mod_target = true()">
			<xsl:call-template name="target"/>
		</xsl:if>
	<xsl:apply-templates/></base></xsl:template>
<!--</xsl:if>-->

<!-- Legacy Module -->
<!--<xsl:if test="$mod_legacy = true()">-->
	<xsl:template match="&basefont;"><basefont><xsl:call-template name="color"/><xsl:call-template name="face"/><xsl:call-template name="id"/><xsl:call-template name="size"/><xsl:apply-templates/></basefont></xsl:template>
	<xsl:template match="&center;"><center><xsl:call-template name="Common"/><xsl:apply-templates/></center></xsl:template>
	<xsl:template match="&dir;"><dir><xsl:call-template name="Common"/><xsl:call-template name="compact"/><xsl:apply-templates/></dir></xsl:template>
	<xsl:template match="&fontelement;"><font><xsl:call-template name="Core"/><xsl:call-template name="I18N"/><xsl:call-template name="color"/><xsl:call-template name="face"/><xsl:call-template name="size"/><xsl:apply-templates/></font></xsl:template>
	<xsl:template match="&isindex;"><isindex><xsl:call-template name="Core"/><xsl:call-template name="I18N"/><xsl:call-template name="prompt"/><xsl:apply-templates/></isindex></xsl:template>
	<xsl:template match="&menu;"><menu><xsl:call-template name="Common"/><xsl:call-template name="compact"/><xsl:apply-templates/></menu></xsl:template>
	<xsl:template match="&s;"><s><xsl:call-template name="Common"/><xsl:apply-templates/></s></xsl:template>
	<xsl:template match="&strike;"><strike><xsl:call-template name="Common"/><xsl:apply-templates/></strike></xsl:template>
	<xsl:template match="&u;"><u><xsl:call-template name="Common"/><xsl:apply-templates/></u></xsl:template>
<!-- </xsl:if> -->

</xsl:stylesheet>