<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:saxon="http://saxon.sf.net">
	<xsl:output method="html"/>
	<xsl:include href="paratom.xsl"/>
	<xsl:include href="figuretom.xsl"/>
	<xsl:include href="tabtomle.xsl"/>

	<xsl:template match="*">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="/">
		<html>
			<head/>
			<body>
				<xsl:apply-templates/>
			</body>
		</html>
	</xsl:template>

	<xsl:template match="/" mode="pm">
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="idstatus/status|pmaddres|pmstatus"/>

	<xsl:template match="dmaddres/dmc/avee">
		<xsl:variable name="dmod">
			<xsl:call-template name="remove-spaces">
				<xsl:with-param name="input">
					<xsl:text>DMC-</xsl:text>
					<xsl:apply-templates/>
				</xsl:with-param>
			</xsl:call-template>
		</xsl:variable>
		<a name="{$dmod}"/>
	</xsl:template>

	<xsl:template match="para/refdm/avee/chapnum|section|subject|itemloc|discode|sdc|incode">
		<xsl:text>-</xsl:text>
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="pmentry/refdm/dmc/avee">
		<xsl:variable name="dmod">
			<xsl:call-template name="remove-spaces">
				<xsl:with-param name="input">
					<xsl:text>DMC-</xsl:text>
					<xsl:apply-templates/>
				</xsl:with-param>
			</xsl:call-template>
			<xsl:text>_</xsl:text>
			<xsl:value-of select="ancestor::refdm/issno/@issno"/>
			<xsl:text>-</xsl:text>
			<xsl:value-of select="ancestor::refdm/issno/@inwork"/>
			<xsl:text>.xml</xsl:text>
		</xsl:variable>
		<xsl:apply-templates select="document($dmod)" mode="pm"/>
	</xsl:template>

	<xsl:template match="pmentry/refdm/dmc/avee/chapnum|section|subject|itemloc|discode|sdc|incode">
		<xsl:text>-</xsl:text>
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="dmaddres/dmc/avee/chapnum|section|subject|itemloc|discode|sdc|incode">
		<xsl:text>-</xsl:text>
		<xsl:apply-templates/>
	</xsl:template>

	<xsl:template match="pmentry/title"/>
	<xsl:template match="dmtitle/techname|infoname"/>
	<xsl:template match="refdm/infoname"/>
	<xsl:template match="content/refs"/>

	<xsl:template name="remove-spaces">
		<xsl:param name="input"/>
		<xsl:variable name="norm-input" select="concat(normalize-space($input), ' ')"/>
		<xsl:variable name="first" select="substring-before($norm-input, ' ')"/>
		<xsl:variable name="rest" select="substring-after($norm-input, ' ')"/>
		<xsl:value-of select="$first"/>
		<xsl:if test="$rest">
			<xsl:call-template name="remove-spaces">
				<xsl:with-param name="input" select="$rest"/>
			</xsl:call-template>
		</xsl:if>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c)1998-2004. Sonic Software Corporation. All rights reserved.
<metaInformation>
<scenarios ><scenario default="yes" name="Scenario2" userelativepaths="yes" externalpreview="yes" url="PMC&#x2D;BICYCLEXXXAAA&#x2D;U8025&#x2D;00001_000&#x2D;01.xml" htmlbaseurl="" outputurl="" processortype="internal" profilemode="0" profiledepth="" profilelength="" urlprofilexml="" commandline="" additionalpath="" additionalclasspath="" postprocessortype="none" postprocesscommandline="" postprocessadditionalpath="" postprocessgeneratedext=""/></scenarios><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition></MapperMetaTag>
</metaInformation>
-->