<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fm="http://www.itp-x.co.uk/xslt">
	<xsl:template match="table/title"/>

<!--
****************************************************************
* ADOBE SYSTEMS INCORPORATED                                   *
* Copyright 2006 © 2006 Adobe Systems Incorporated             *
* All Rights Reserved                                          *
*                                                              *
* NOTICE:  Adobe permits you to use, modify, and distribute    *
* this file in accordance with the terms of the Adobe license  *
* agreement accompanying it.  If you have received this file   *
* from a source other than Adobe, then your use, modification, *
* or distribution of it requires the prior written permission  *
* of Adobe.                                                    *
* _____________________________________________________________*
* Adobe FrameMaker 7.2 Application Pack for S1000D             *
*                                                              *
* CALS table import transform                                  *
* Version   Date         By                                    *
* 0.2b      2006-08-21   Ian Proudfoot, iTP-X                  *
*                                                              *
****************************************************************
-->
<xsl:template match="table">
		<xsl:element name="table">
			<xsl:copy-of select="@mark|@colsep|@tabstyle|@change|@rfc|@frame|@level|@rowsep|@pgwide|@orient|@tocentry"/>
			<xsl:for-each select="@class">
				<xsl:attribute name="class">
					<xsl:call-template name="brexmerge"/>
				</xsl:attribute>
			</xsl:for-each>
			<xsl:for-each select="@caveat">
				<xsl:attribute name="caveat">
					<xsl:call-template name="brexmerge"/>
				</xsl:attribute>
			</xsl:for-each>
			<xsl:for-each select="@commcls">
				<xsl:attribute name="commcls">
					<xsl:call-template name="brexmerge"/>
				</xsl:attribute>
			</xsl:for-each>

			<xsl:for-each select="tgroup[1]">
				<xsl:element name="table.group">
					<xsl:copy-of select="@*"/>
					<xsl:attribute name="id">
						<xsl:choose>
							<xsl:when test="parent::table/@id">
								<xsl:value-of select="parent::table/@id"/>
							</xsl:when>
							<xsl:otherwise>
								<xsl:value-of select="generate-id(parent::table)"/>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:attribute>
					<xsl:copy-of select="tcolspec"/>
					<xsl:copy-of select="spanspec"/>
					<xsl:for-each select="preceding-sibling::title">
						<xsl:element name="table.title">
							<xsl:for-each select="@class">
								<xsl:attribute name="class">
									<xsl:call-template name="brexmerge"/>
								</xsl:attribute>
							</xsl:for-each>
							<xsl:for-each select="@caveat">
								<xsl:attribute name="caveat">
									<xsl:call-template name="brexmerge"/>
								</xsl:attribute>
							</xsl:for-each>
							<xsl:for-each select="@commcls">
								<xsl:attribute name="commcls">
									<xsl:call-template name="brexmerge"/>
								</xsl:attribute>
							</xsl:for-each>
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
					<xsl:for-each select="thead">
						<xsl:element name="table.head">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
					<xsl:for-each select="tfoot">
						<xsl:element name="table.foot">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
					<xsl:for-each select="tbody">
						<xsl:element name="table.body">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
				</xsl:element>
			</xsl:for-each>

			<xsl:for-each select="tgroup[position()!=1]">
				<xsl:element name="table.group">
					<xsl:copy-of select="@*"/>
					<xsl:copy-of select="colspec"/>
					<xsl:copy-of select="spanspec"/>
					<xsl:for-each select="thead">
						<xsl:element name="table.head">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
					<xsl:for-each select="tfoot">
						<xsl:element name="table.foot">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
					<xsl:for-each select="tbody">
						<xsl:element name="table.body">
							<xsl:apply-templates/>
						</xsl:element>
					</xsl:for-each>
				</xsl:element>
			</xsl:for-each>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="copy" userelativepaths="yes" externalpreview="no" url="..\..\..\Documents and Settings\Ian\My Documents\FrameDev\Examples\BIKE_testset_060216A\DMC&#x2D;S1000DBIKE&#x2D;AAA&#x2D;DA1&#x2D;00&#x2D;00&#x2D;0000&#x2D;041A&#x2D;A_000&#x2D;02.XML" htmlbaseurl="" outputurl="" processortype="internal" useresolver="yes" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext="" validateoutput="no" validator="internal" customvalidator=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->