metatools/sysdeftools/sysdefdowngrade.xsl
author lorewang
Mon, 22 Nov 2010 10:56:31 +0800
changeset 700 c22eff170fac
parent 624 f70b728ea30c
permissions -rw-r--r--
update from trunk
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
624
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     1
<?xml version="1.0"?>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     3
<!--Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     4
	All rights reserved.
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     5
	This component and the accompanying materials are made available
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     6
	under the terms of the License "Eclipse Public License v1.0"
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     7
	which accompanies this distribution, and is available
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     8
	at the URL "http://www.eclipse.org/legal/epl-v10.html".
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
     9
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    10
	Initial Contributors:
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    11
	Nokia Corporation - initial contribution.
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    12
	Contributors:
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    13
	Description:
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    14
	Downgrade a 3.x system definition into the 2.0.1 syntax
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    15
-->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    16
	<xsl:output method="xml" indent="yes"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    17
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    18
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    19
<!--Description:Downgrades a 3.x system definition into the 2.0.1 syntax
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    20
 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    21
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    22
<!--Input:<sysdef> - (required) The system definition XML file to process, in the 3.0 format, and can be a pkgdef or stand-alone sysdef.-->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    23
<!--Output:<sysdef> - (optional) The system definition XML file to save the output as. If not present it will write to stdout.-->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    24
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    25
	<xsl:param name="Path">os/deviceplatformrelease/foundation_system/system_model</xsl:param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    26
	<!-- <oldpath> - The directory containing the root system definition XML file in the 2.0 sysdef style. This must not end in /
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    27
		This is used to compute the absolute paths the 2.0 syntax needs. -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    28
	<xsl:param name="Root"/> <!--<list> - (optional) A space separated list of root variables in the form "VAR1=value1 VAR=value2" --> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    29
	<xsl:param name="Strict" select="0"/> <!--1 - (optional) If present, namespaced extensions are stripped out --> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    30
	<xsl:variable name="root" select="concat(' ',$Root,' ')"/> <!-- sort of hack to allow absolute paths in downgraded output -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    31
	<xsl:variable name="srcroot" select="substring-before(substring-after($root,' SRCROOT='),' ')"/> <!-- the default path prefix -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    32
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    33
<xsl:template match="/*">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    34
	<xsl:message terminate="yes">ERROR: Cannot process this document</xsl:message>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    35
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    36
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    37
<!-- can only handle 3.0.x to 2.0.1 transforms
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    38
	Assumes only packages are using href
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    39
 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    40
<xsl:template match="/SystemDefinition[starts-with(@schema,'3.0.')]"> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    41
	<!-- process root system definition or package definition-->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    42
	<xsl:call-template name="DTD"/> <!-- insert 2.0.01 DTD -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    43
  <SystemDefinition name="{*/@name}" schema="2.0.1">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    44
  	<xsl:apply-templates select="*|comment()"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    45
  </SystemDefinition>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    46
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    47
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    48
<xsl:template match="/SystemDefinition[starts-with(@schema,'3.0.') and systemModel]"> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    49
	<xsl:call-template name="DTD"/> <!-- insert 2.0.01 DTD -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    50
  <SystemDefinition name="{systemModel/@name}" schema="2.0.1">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    51
  	<xsl:apply-templates select="*|comment()"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    52
  </SystemDefinition>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    53
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    54
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    55
<xsl:template match="/SystemDefinition/package[@href]" priority="2">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    56
	<xsl:message terminate="yes">ERROR: Package definition (<xsl:value-of select="@id"/>) cannot link another package</xsl:message>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    57
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    58
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    59
<xsl:template match="/SystemDefinition/package" priority="1">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    60
	<!-- process package definition file--> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    61
  <systemModel>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    62
  	<layer name="anonymous"> <!-- fake layer -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    63
		<block>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    64
			<xsl:apply-templates mode="copy" select="@id|@name|@span|@level|@levels"/><!--  valid attribuites for 2.0 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    65
		  	<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    66
		  		<xsl:with-param name="path" select="concat($Path,'/')"/> <!-- need to keep tack of where the current document is -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    67
		  	</xsl:apply-templates>			
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    68
		</block>  
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    69
   	</layer>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    70
  </systemModel>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    71
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    72
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    73
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    74
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    75
<xsl:template match="/"><xsl:apply-templates select="*"/></xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    76
<xsl:template match="@*|comment()"><xsl:copy-of select="."/></xsl:template> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    77
	<!-- comments are copied verbatim. Attribtues are copied by default -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    78
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    79
<xsl:template match="systemModel">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    80
	<systemModel>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    81
  	<xsl:apply-templates select="*|comment()"> <!-- no attributes -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    82
  		<xsl:with-param name="path" select="$Path"/> <!-- need to keep tack of where the current document is -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    83
  	</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    84
	</systemModel>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    85
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    86
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    87
<xsl:template mode="copy" match="@*">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    88
	<xsl:copy-of select="."/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    89
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    90
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    91
<xsl:template mode="copy" match="@id"> <!-- id in 3.0 is name in 2.0 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    92
	<xsl:attribute name="name"><xsl:value-of select="."/></xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    93
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    94
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    95
<xsl:template mode="copy" match="@name">  <!-- name in 3.0 is long-name in 2.0.1 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    96
	<xsl:if test=".!=../@id"> <!-- don't bother if it will be the same as name -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    97
		<xsl:attribute name="long-name"><xsl:value-of select="."/></xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    98
	</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
    99
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   100
	
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   101
<xsl:template match="layer"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   102
	<layer>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   103
		<xsl:apply-templates mode="copy" select="@id|@name|@span|@levels"/> <!--  valid attribuites for 2.0 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   104
		<xsl:apply-templates select="*|comment()"> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   105
			<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   106
		</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   107
	</layer>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   108
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   109
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   110
<xsl:template match="layer/package"><!-- translates to block -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   111
	<xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   112
	<block>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   113
		<xsl:apply-templates mode="copy" select="@id|@name|@span|@level|@levels"/><!--  valid attribuites for 2.0 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   114
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   115
			<xsl:when test="@href">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   116
				<xsl:variable name="this" select="."/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   117
				<xsl:variable name="prefixmap" select="ancestor::SystemDefinition/*/meta[@rel='link-mapping']/map-prefix[starts-with(current()/@href,@link)]"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   118
				<xsl:for-each select="document(@href,.)/SystemDefinition/*">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   119
					<xsl:variable name="my-id"><xsl:apply-templates mode="normalize-id" select="@id"/></xsl:variable>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   120
					<xsl:variable name="other-id"><xsl:apply-templates mode="normalize-id" select="$this/@id"/></xsl:variable>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   121
					<xsl:if test="$my-id != $other-id">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   122
						<xsl:message terminate="yes">ERROR: Package IDs do not match: <xsl:value-of select="$my-id"/> vs <xsl:value-of select="$other-id"/></xsl:message>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   123
					</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   124
					<xsl:if test="@name and @name!=@id and not($this/@name and $this/@name=$this/@id)">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   125
						<!-- set long-name only if name is different from the id and not set in child doc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   126
						<xsl:attribute name="long-name"><xsl:value-of select="@name"/></xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   127
					</xsl:if>						
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   128
					<xsl:for-each select="@span|@levels|@level">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   129
						<!-- copy only if not set in child doc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   130
						<xsl:if test="not(this/@*[name()=name(current())])">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   131
							<xsl:copy-of select="."/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   132
						</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   133
					</xsl:for-each>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   134
					<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   135
	  					<xsl:with-param name="path">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   136
							<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   137
								<xsl:when test="$prefixmap">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   138
	  								<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   139
	  									<xsl:with-param name="path">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   140
										<xsl:apply-templates select="$prefixmap/@to"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   141
										<xsl:value-of select="substring-after($this/@href,$prefixmap/@link)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   142
									 </xsl:with-param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   143
	  								</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   144
								</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   145
								<xsl:when test="starts-with($this/@href,'/')">  <!-- absolute path -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   146
	  								<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   147
	  									<xsl:with-param name="path" select="$this/@href"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   148
	  								</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   149
								</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   150
								<xsl:when test="contains($this/@href,'://')">  <!-- generic URI -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   151
	  								<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   152
	  									<xsl:with-param name="path" select="substring-after($this/@href,'://')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   153
	  								</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   154
								</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   155
								<xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   156
	  								<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   157
	  									<xsl:with-param name="path" select="concat($path,'/',$this/@href)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   158
	  								</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   159
								</xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   160
							</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   161
	  					</xsl:with-param> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   162
	  				</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   163
				</xsl:for-each>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   164
			</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   165
			<xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   166
				<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   167
  					<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   168
  				</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   169
			</xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   170
		</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   171
	</block>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   172
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   173
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   174
<xsl:template match="package/package">	<!-- translates to subblock --><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   175
	<subblock>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   176
		<xsl:apply-templates mode="copy" select="@id|@name"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   177
		<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   178
			<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   179
		</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   180
	</subblock>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   181
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   182
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   183
<xsl:template match="package/package/pacakge"> <!-- cannot nest this deep --><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   184
	<xsl:message>WARNING: Excessive nesting of packages: Ignoring <xsl:value-of select="@id"/></xsl:message>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   185
	<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   186
		<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   187
	</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   188
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   189
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   190
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   191
<xsl:template match="collection"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   192
	<collection>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   193
		<xsl:apply-templates mode="copy" select="@id|@name|@level"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   194
		<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   195
			<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   196
		</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   197
	</collection>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   198
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   199
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   200
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   201
<xsl:template match="component"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   202
	<component>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   203
		<xsl:apply-templates mode="copy" select="@id|@name|@deprecated|@introduced|@filter|@purpose"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   204
		<xsl:if test="contains(concat(' ',@class,' '),' plugin ')">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   205
			<xsl:attribute name="plugin">Y</xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   206
		</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   207
		<xsl:call-template name="class">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   208
			<xsl:with-param name="remove">plugin</xsl:with-param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   209
			<xsl:with-param name="add">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   210
				<xsl:if test="not(*) and comment()">placeholder</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   211
				<xsl:if test="@target='desktop'"> PC</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   212
			</xsl:with-param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   213
		</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   214
	  	<xsl:apply-templates select="*|comment()">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   215
			<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   216
		</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   217
	</component>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   218
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   219
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   220
<xsl:template match="unit[@base and not(@mrp or @bldFile)]"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   221
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   222
<xsl:template match="unit"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   223
	<unit>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   224
		<xsl:apply-templates select="@mrp|@bldFile|@late">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   225
			<xsl:with-param name="path" select="$path"/> 
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   226
		</xsl:apply-templates>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   227
		<xsl:copy-of select="@filter|@root[not(contains($root,concat(' ',.,'=')))]|@version|@prebuilt|@priority"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   228
		<xsl:for-each select="@*[contains(name(),':') and not($Strict)]">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   229
			<xsl:attribute name="{local-name()}">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   230
				<xsl:value-of select="."/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   231
			</xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   232
		</xsl:for-each>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   233
	</unit>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   234
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   235
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   236
<xsl:template match="unit/@late"> <!-- 2.0 uses Y/N, 3.0 uses yes/no -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   237
	<xsl:attribute name="{name()}">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   238
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   239
			<xsl:when test=".='yes'">Y</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   240
			<xsl:when test=".='no'">N</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   241
		</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   242
	</xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   243
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   244
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   245
<xsl:template match="@mrp|@bldFile"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   246
	<xsl:attribute name="{name()}">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   247
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   248
			<xsl:when test="../@root">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   249
				<xsl:variable name="pre" select="substring-before(substring-after($root,concat(' ',../@root,'=')),' ')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   250
				<xsl:value-of select="$pre"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   251
				<xsl:if test="$pre!='' and $pre!='/'">/</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   252
			</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   253
			<xsl:when test="$srcroot='/'"> <!-- treat all paths as absolute -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   254
				<xsl:value-of select="$srcroot"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   255
			</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   256
			<xsl:when test="$srcroot!=''">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   257
				<xsl:value-of select="concat($srcroot,'/')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   258
			</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   259
		</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   260
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   261
		<xsl:when test="starts-with(.,'/')"> <!-- keep absolute paths verbatim (barring the leading / ) -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   262
			<xsl:value-of select="substring-after(.,'/')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   263
		</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   264
		<xsl:otherwise>	
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   265
			<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   266
  				<xsl:with-param name="path">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   267
  					<xsl:call-template name="before">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   268
						<xsl:with-param name="text" select="$path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   269
					</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   270
					<xsl:value-of select="."/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   271
  				</xsl:with-param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   272
  			</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   273
		</xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   274
	</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   275
	</xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   276
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   277
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   278
<xsl:template match="meta"/> <!-- strip all meta tags -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   279
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   280
<xsl:template match="meta[info/@contract]"> <!-- except contract -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   281
	<xsl:copy-of select="info/@contract"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   282
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   283
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   284
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   285
<xsl:template match="meta[@rel='link-mapping']/map-prefix/@to">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   286
	<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   287
		<xsl:when test="starts-with(.,'/')"><xsl:value-of select="substring(.,2)"/></xsl:when> <!-- absolute paths in 3.0 are relative in 2.0 -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   288
		<xsl:otherwise><xsl:value-of select="."/></xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   289
	</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   290
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   291
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   292
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   293
<xsl:template match="@id" mode="normalize-id">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   294
	<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   295
		<xsl:when test="contains(@id,':')"><xsl:value-of select="substring-after(@id,':')"/></xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   296
		<xsl:otherwise><xsl:value-of select="@id"/></xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   297
	</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   298
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   299
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   300
<xsl:template name="class"><xsl:param name="remove"/><xsl:param name="add"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   301
<!--  returns the value of the class attribute with the space-separated list of names in $remove taken out and those in $add added on (does not check for duplicates) -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   302
	<xsl:param name="class" select="normalize-space(@class)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   303
	<xsl:variable name="r">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   304
		<xsl:text> </xsl:text>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   305
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   306
			<xsl:when test="contains($remove,' ')"><xsl:value-of select="substring-before($remove,' ')"/></xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   307
			<xsl:otherwise><xsl:value-of select="$remove"/></xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   308
		</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   309
		<xsl:text> </xsl:text>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   310
	</xsl:variable>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   311
	<xsl:variable name="c">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   312
		<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   313
			<xsl:when test="contains(concat(' ',$class,' '),$r)">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   314
				<xsl:value-of select="substring-before(concat(' ',$class,' '),$r)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   315
				<xsl:text> </xsl:text>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   316
				<xsl:value-of select="substring-after(concat(' ',$class,' '),$r)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   317
			</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   318
			<xsl:otherwise><xsl:value-of select="$class"/></xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   319
		</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   320
		<xsl:if test="normalize-space($add)!=''"><xsl:value-of select="concat(' ',normalize-space($add))"/></xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   321
	</xsl:variable>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   322
	<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   323
		<xsl:when test="contains($remove,' ')">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   324
			<xsl:call-template name="class">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   325
				<xsl:with-param name="remove" select="substring-after($remove,' ')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   326
				<xsl:with-param name="class" select="$c"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   327
			</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   328
		</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   329
		<xsl:when test="normalize-space($c)!=''">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   330
			<xsl:attribute name="class">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   331
				<xsl:value-of select="normalize-space($c)"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   332
			</xsl:attribute>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   333
		</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   334
	</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   335
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   336
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   337
<xsl:template name="normpath"><xsl:param name="path"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   338
<!-- normalize out any ".." in the path in $path  -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   339
<xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   340
	<xsl:when test="contains($path,'/../')">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   341
	<xsl:call-template name="normpath">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   342
		<xsl:with-param name="path">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   343
		<xsl:call-template name="before">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   344
			<xsl:with-param name="text" select="substring-before($path,'/../')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   345
		</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   346
		<xsl:value-of select="substring-after($path,'/../')"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   347
		</xsl:with-param>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   348
		</xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   349
	</xsl:when>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   350
	<xsl:otherwise><xsl:value-of select="$path"/></xsl:otherwise>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   351
</xsl:choose>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   352
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   353
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   354
<!-- return all text before the last / -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   355
<xsl:template name="before"><xsl:param name="text"/>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   356
<xsl:if test="contains($text,'/')">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   357
	<xsl:value-of select="substring-before($text,'/')"/>/<xsl:call-template name="before"><xsl:with-param name="text" select="substring-after($text,'/')"/></xsl:call-template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   358
	</xsl:if>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   359
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   360
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   361
<xsl:template name="DTD">
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   362
<xsl:text disable-output-escaping="yes"><![CDATA[<!DOCTYPE SystemDefinition [
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   363
<!ELEMENT SystemDefinition ( systemModel )>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   364
<!ATTLIST SystemDefinition
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   365
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   366
  schema CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   367
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   368
<!-- all paths are relative to the environment variable specified by the root attribute, or SOURCEROOT if not.  -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   369
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   370
<!-- System Model Section of DTD -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   371
<!ELEMENT systemModel (layer+)>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   372
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   373
<!ELEMENT layer (block* | collection*)*>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   374
<!-- Kernel Services, Base Services, OS Services, Etc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   375
<!ATTLIST layer
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   376
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   377
  long-name CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   378
  levels NMTOKENS #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   379
  span CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   380
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   381
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   382
<!ELEMENT block (subblock* | collection*)*>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   383
 <!-- Generic OS services, Comms Services, etc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   384
<!ATTLIST block
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   385
  levels NMTOKENS #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   386
  span CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   387
  level NMTOKEN #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   388
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   389
  long-name CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   390
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   391
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   392
<!ELEMENT subblock (collection)*>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   393
<!-- Cellular Baseband Services, Networking Services, etc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   394
<!ATTLIST subblock
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   395
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   396
  long-name CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   397
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   398
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   399
<!ELEMENT collection (component)*>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   400
<!-- Screen Driver, Content Handling, etc -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   401
<!ATTLIST collection
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   402
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   403
  long-name CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   404
  level NMTOKEN #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   405
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   406
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   407
<!ELEMENT component (unit)*>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   408
<!-- contains units or is a  package or prebuilt -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   409
<!ATTLIST component
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   410
  name CDATA #REQUIRED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   411
  long-name CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   412
  deprecated CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   413
  introduced CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   414
  contract CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   415
  plugin (Y|N) "N"
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   416
  filter CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   417
  class NMTOKENS #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   418
  supports CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   419
  purpose ( optional | mandatory | development ) "optional"
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   420
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   421
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   422
<!ELEMENT unit EMPTY >
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   423
<!-- must be buildable (bld.inf) -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   424
<!-- bldFile  may someday be removed in favour of mrp -->
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   425
<!ATTLIST unit
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   426
  mrp CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   427
  filter CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   428
  bldFile CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   429
  root CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   430
  version NMTOKEN #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   431
  prebuilt NMTOKEN #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   432
  late (Y|N) #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   433
  priority CDATA #IMPLIED
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   434
>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   435
]>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   436
]]></xsl:text>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   437
</xsl:template>
f70b728ea30c Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff changeset
   438
</xsl:stylesheet>