<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc="http://www.purl.org/dc/elements/1.1/" xmlns:fm="http://www.itp-x.co.uk/xslt">

<!--
****************************************************************
* 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             *
*                                                              *
* rdf metadata generation export transform                     *
* Version   Date         By                                    *
* 0.2b      2006-08-21   Ian Proudfoot, iTP-X                  *
*                                                              *
****************************************************************
-->
	<!--This template reinstates the rdf metadata information-->
	<xsl:template match="idstatus">
		<xsl:element name="rdf:Description">
			<xsl:element name="dc:Title">
				<xsl:value-of select="dmaddres/dmtitle/techname"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/dmtitle/infoname"/>
			</xsl:element>
			<xsl:element name="dc:Creator">
				<xsl:value-of select="status/orig"/>
			</xsl:element>
			<xsl:element name="dc:Subject">
				<xsl:value-of select="dmaddres/dmtitle/techname"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/dmtitle/infoname"/>
			</xsl:element>
			<xsl:element name="dc:Publisher">
				<xsl:value-of select="status/rpc"/>
			</xsl:element>
			<xsl:element name="dc:Contributor">
				<xsl:value-of select="status/orig"/>
			</xsl:element>
			<xsl:element name="dc:Date">
				<xsl:value-of select="dmaddres/issdate/@year"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/issdate/@month"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/issdate/@day"/>
			</xsl:element>
			<xsl:element name="dc:Type">
				<xsl:text>text</xsl:text>
			</xsl:element>
			<xsl:element name="dc:Format">
				<xsl:text>text/xml</xsl:text>
			</xsl:element>
			<xsl:element name="dc:Identifier">
				<xsl:value-of select="dmaddres/dmc//modelic"/>
				<xsl:text>-</xsl:text>
				<xsl:choose>
					<xsl:when test="dmaddres/dmc/avee">
						<xsl:value-of select="dmaddres/dmc/avee/sdc"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/avee/chapnum"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/avee/section"/>
						<xsl:value-of select="dmaddres/dmc/avee/subsect"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/avee/subject"/>
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="dmaddres/dmc/age/supeqvc"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/age/cidc"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/age/ecscs"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/dmc/age/eidc"/>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/dmc//discode"/>
				<xsl:value-of select="dmaddres/dmc//discodev"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/dmc//incode"/>
				<xsl:value-of select="dmaddres/dmc//incodev"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/dmc//itemloc"/>
				<xsl:text>_</xsl:text>
				<xsl:value-of select="dmaddres/issno/@issno"/>
				<xsl:text>-</xsl:text>
				<xsl:value-of select="dmaddres/issno/@inwork"/>
			</xsl:element>
			<xsl:choose>
				<xsl:when test="not(dmaddres/language)"/>
				<xsl:when test="not(dmaddres/language/@country)">
					<xsl:element name="dc:Language">
						<xsl:value-of select="dmaddres/language/@language"/>
					</xsl:element>
				</xsl:when>
				<xsl:otherwise>
					<xsl:element name="dc:Language">
						<xsl:value-of select="dmaddres/language/@language"/>
						<xsl:text>-</xsl:text>
						<xsl:value-of select="dmaddres/language/@country"/>
					</xsl:element>
				</xsl:otherwise>
			</xsl:choose>
			<xsl:element name="dc:Rights">
				<xsl:for-each select="//security">
					<xsl:variable name="class" select="document($brexref)//objval[text() = current()/@class]/@val1"/>
					<xsl:variable name="commcls" select="document($brexref)//objval[text() = current()/@commcls]/@val1"/>
					<xsl:variable name="caveat" select="document($brexref)//objval[text() = current()/@caveat]/@val1"/>
					<xsl:choose>
						<xsl:when test="not(//security/@commcls) and not(//security/@caveat)">
							<xsl:value-of select="$class"/>
						</xsl:when>
						<xsl:when test="not(//security/@commcls)">
							<xsl:value-of select="$class"/>
							<xsl:text>_</xsl:text>
							<xsl:value-of select="$caveat"/>
						</xsl:when>
						<xsl:when test="not(//security/@caveat)">
							<xsl:value-of select="$class"/>
							<xsl:text>_</xsl:text>
							<xsl:value-of select="$commcls"/>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$class"/>
							<xsl:text>_</xsl:text>
							<xsl:value-of select="$commcls"/>
							<xsl:text>_</xsl:text>
							<xsl:value-of select="$caveat"/>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>
			</xsl:element>
		</xsl:element>
		<xsl:element name="idstatus">
			<xsl:apply-templates/>
		</xsl:element>
	</xsl:template>
</xsl:stylesheet><!-- Stylus Studio meta-information - (c) 2004-2006. Progress Software Corporation. All rights reserved.
<metaInformation>
<scenarios/><MapperMetaTag><MapperInfo srcSchemaPathIsRelative="yes" srcSchemaInterpretAsXML="no" destSchemaPath="" destSchemaRoot="" destSchemaPathIsRelative="yes" destSchemaInterpretAsXML="no"/><MapperBlockPosition></MapperBlockPosition><TemplateContext></TemplateContext><MapperFilter side="source"></MapperFilter></MapperMetaTag>
</metaInformation>
-->