author | Bob Rosenberg <bob.rosenberg@nokia.com> |
Fri, 06 Aug 2010 10:52:54 +0100 | |
changeset 635 | 945d232265c4 |
parent 624 | f70b728ea30c |
child 656 | 88e01c8f013e |
permissions | -rw-r--r-- |
624
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
1 |
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
2 |
<!--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
|
3 |
All rights reserved. |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
4 |
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
|
5 |
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
|
6 |
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
|
7 |
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
|
8 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
9 |
Initial Contributors: |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
10 |
Nokia Corporation - initial contribution. |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
11 |
Contributors: |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
12 |
Description: |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
13 |
Module containing the validation logic for system definition 3.0.0 syntax |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
14 |
--> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
15 |
<xsl:key name="named" match="*[ancestor::systemModel]" use="@name"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
16 |
<xsl:param name="Filename"/> <!--<Filename> - (optional) the full system model path to the current sysdef file. This is needed to determine non-standard path errors --> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
17 |
<xsl:variable name="info" select="document(/model//info[@type='extra']/@href,/model)//c"/> |
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 |
<xsl:variable name="all-ids"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
20 |
<xsl:apply-templates select="document(/model/sysdef/@href)| SystemDefinition" mode="ids"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
21 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
22 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
23 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
24 |
<xsl:template match="/model" priority="-1"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
25 |
<xsl:apply-templates select="." mode="check"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
26 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
27 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
28 |
<xsl:template match="/model" mode="check"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
29 |
<xsl:for-each select="sysdef"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
30 |
<xsl:apply-templates select="document (@href,. )/*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
31 |
<xsl:with-param name="filename"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
32 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
33 |
<xsl:when test="starts-with(current()/@href,current()/@rootpath)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
34 |
<xsl:value-of select="substring-after(current()/@href,current()/@rootpath)"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
35 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
36 |
<xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
37 |
<xsl:value-of select="@href"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
38 |
</xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
39 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
40 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
41 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
42 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
43 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
44 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
45 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
46 |
<xsl:apply-templates mode="x-check" select="document (//info[@type='vp']/@href)/*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
47 |
<xsl:with-param name="sysdef" select="document (sysdef/@href)/*"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
48 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
49 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
50 |
<xsl:apply-templates mode="x-check" select="document (//info[@type='build']/@href)/*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
51 |
<xsl:with-param name="sysdef" select="document (sysdef/@href)/*"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
52 |
</xsl:apply-templates> |
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[starts-with(@schema,'3.0.')]" mode="ids"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
56 |
<xsl:for-each select="//*[@id and not(@href)]"><xsl:value-of select="concat(' ',@id,' ')"/></xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
57 |
<xsl:apply-templates select="document(//layer/@href | //package/@href | //collection/@href | //component/@href,.)/*" mode="ids"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
58 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
59 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
60 |
<xsl:template match="/SystemDefinition[starts-with(@schema,'3.0.')and systemModel]" priority="2"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
61 |
<xsl:param name="filename" select="$Filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
62 |
<xsl:call-template name="Section"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
63 |
<xsl:with-param name="text">System Definition: <xsl:value-of select="*/@name"/></xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
64 |
<xsl:with-param name="sub"><xsl:value-of select="(string-length($all-ids) - string-length(translate($all-ids,' ',''))) div 2 "/> items</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
65 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
66 |
<xsl:apply-templates select="*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
67 |
<xsl:with-param name="filename" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
68 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
69 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
70 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
71 |
<xsl:template match="/SystemDefinition[starts-with(@schema,'3.0.')] | systemModel"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
72 |
<xsl:param name="filename" select="$Filename"/> |
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 |
<xsl:if test="//unit"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
75 |
<xsl:call-template name="Section"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
76 |
<xsl:with-param name="text"><xsl:value-of select="translate(substring(name(*),1,1),'clp','CLP')"/><xsl:value-of select="substring(name(*),2)"/> Definition: <xsl:value-of select="*/@name"/></xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
77 |
<xsl:with-param name="sub"><xsl:value-of select="count(//unit)"/> unit<xsl:if test="count(//unit)!=1">s</xsl:if></xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
78 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
79 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
80 |
<xsl:if test="self::systemModel and not(@name)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
81 |
<xsl:call-template name="Error"><xsl:with-param name="text">systemModel element should have a name</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
82 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
83 |
<xsl:apply-templates select="*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
84 |
<xsl:with-param name="filename" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
85 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
86 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
87 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
88 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
89 |
<xsl:template match="@*" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
90 |
<xsl:call-template name="Error"><xsl:with-param name="text">Attribute <xsl:value-of select="name()"/>="<xsl:value-of select="."/>" is not valid for <xsl:value-of select="name(..)"/></xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
91 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
92 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
93 |
<xsl:template match="@before|@id|package/@span|layer/@span|collection/@level|package/@level|package/@levels|layer/@levels" mode="valid"/> <!-- really should check syntax --> |
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 match="@name|@href|@filter|package/@version|unit/@version|unit/@prebuilt" mode="valid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
96 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
97 |
<xsl:template match="component/@introduced|component/@deprecated" mode="valid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
98 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
99 |
<xsl:template match="component/@origin-model" mode="valid"/> |
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="unit/@priority" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
102 |
<xsl:call-template name="Note"><xsl:with-param name="text">Attribute <xsl:value-of select="name()"/> is deprecated</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
103 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
104 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
105 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
106 |
<xsl:template match="@*[namespace-uri()!='']" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
107 |
<xsl:call-template name="Note"><xsl:with-param name="text">Extension attribute <xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>" in namespace <xsl:value-of select="namespace-uri()"/></xsl:with-param></xsl:call-template> |
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="@*[namespace-uri()='http://www.nokia.com/qt' and local-name()='proFile']" mode="valid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
111 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
112 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
113 |
<xsl:template match="@*[namespace-uri()='http://www.nokia.com/qt' and local-name()='qmakeArgs']" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
114 |
<xsl:call-template name="Note"><xsl:with-param name="text">Should avoid using extension attribute <xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>" in namespace <xsl:value-of select="namespace-uri()"/></xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
115 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
116 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
117 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
118 |
<xsl:template match="@replace" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
119 |
<xsl:if test="/SystemDefinition[@schema='3.0.0']"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
120 |
<xsl:call-template name="Error"><xsl:with-param name="text">Attribute <b><xsl:value-of select="name()"/></b>="<xsl:value-of select="."/>" not valid in schema <xsl:value-of select="/SystemDefinition/@schema"/>. Must use schema 3.0.1 or higher</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
121 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
122 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
123 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
124 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
125 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
126 |
<xsl:template name="validate-class"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
127 |
<ok>plugin</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
128 |
<ok>doc</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
129 |
<ok>tool</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
130 |
<ok>config</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
131 |
<ok>api</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
132 |
<w d="deprecated">test</w> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
133 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
134 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
135 |
<xsl:template name="validate-purpose"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
136 |
<ok>mandatory</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
137 |
<ok>optional</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
138 |
<ok>development</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
139 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
140 |
<xsl:template name="validate-target"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
141 |
<ok>other</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
142 |
<ok>desktop</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
143 |
<ok>device</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
144 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
145 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
146 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
147 |
<xsl:template name="validate-tech-domain"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
148 |
<ok>lo</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
149 |
<ok>hb</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
150 |
<ok>mm</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
151 |
<ok>ma</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
152 |
<ok>pr</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
153 |
<ok>vc</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
154 |
<ok>se</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
155 |
<ok>ui</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
156 |
<ok>dc</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
157 |
<ok>de</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
158 |
<ok>dm</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
159 |
<ok>rt</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
160 |
<ok>to</ok> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
161 |
<w d="Non-standard">ocp</w> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
162 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
163 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
164 |
<xsl:template match="component/@class" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
165 |
<xsl:call-template name="checklist"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
166 |
<xsl:with-param name="list" select="normalize-space(.)"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
167 |
<xsl:with-param name="values" select="document('')/*/xsl:template[@name=concat('validate-',name(current()))]/*"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
168 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
169 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
170 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
171 |
<xsl:template name="checklist"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
172 |
<xsl:param name="list" select="."/><xsl:param name="values"/><xsl:param name="sep" select="' '"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
173 |
<xsl:variable name="item"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
174 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
175 |
<xsl:when test="contains($list,$sep)"><xsl:value-of select="substring-before($list,$sep)"/></xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
176 |
<xsl:otherwise><xsl:value-of select="$list"/></xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
177 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
178 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
179 |
<xsl:variable name="v" select="$values[.=$item]"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
180 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
181 |
<xsl:when test="not($v)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
182 |
<xsl:call-template name="Error"><xsl:with-param name="text">Illegal <xsl:value-of select="name()"/> value <xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
183 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
184 |
<xsl:when test="name($v)='ok'"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
185 |
<xsl:when test="name($v)='w'"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
186 |
<xsl:call-template name="Warning"><xsl:with-param name="text"><xsl:value-of select="$v/@d"/> value in <xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
187 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
188 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
189 |
<xsl:if test="contains($list,$sep)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
190 |
<xsl:call-template name="checklist"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
191 |
<xsl:with-param name="list" select="substring-after($list,$sep)"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
192 |
<xsl:with-param name="values" select="$values"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
193 |
<xsl:with-param name="sep" select="$sep"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
194 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
195 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
196 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
197 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
198 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
199 |
<xsl:template match="package/@tech-domain|component/@purpose|component/@target" mode="valid"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
200 |
<xsl:variable name="v" select="document('')/*/xsl:template[@name=concat('validate-',name(current()))]/*[.=current()]"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
201 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
202 |
<xsl:when test="not($v)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
203 |
<xsl:call-template name="Error"><xsl:with-param name="text">Illegal <xsl:value-of select="name()"/> value <xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
204 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
205 |
<xsl:when test="name($v)='ok'"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
206 |
<xsl:when test="name($v)='w'"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
207 |
<xsl:call-template name="Warning"><xsl:with-param name="text"><xsl:value-of select="$v/@d"/> value in <xsl:value-of select="name()"/>="<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
208 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
209 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
210 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
211 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
212 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
213 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
214 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
215 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
216 |
<xsl:template match="*" priority="-2"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
217 |
<xsl:call-template name="Error"><xsl:with-param name="text">Element "<xsl:value-of select="name()"/>" is not valid in the context of "<xsl:value-of select="name(..)"/>"</xsl:with-param></xsl:call-template> |
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="component[not(parent::collection)] | collection[not(parent::package)] | package[not(parent::package or parent::layer or (parent::SystemDefinition and count(../*)=1))] | layer[not(parent::systemModel)] " priority="3"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
221 |
<xsl:call-template name="Error"><xsl:with-param name="text"><xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" has invalid parent <xsl:value-of select="name(..)"/> "<xsl:value-of select="../@id"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
222 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
223 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
224 |
<xsl:template match="layer | package | collection | component"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
225 |
<xsl:param name="filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
226 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
227 |
<xsl:apply-templates select="@*" mode="valid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
228 |
<xsl:apply-templates select="@id"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
229 |
<xsl:if test="self::component"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
230 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
231 |
<xsl:when test="count(unit[not(@filter | @version)]) = 0 "/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
232 |
<xsl:when test="count(unit[not(@version)]) > 1 and @filter='s60'"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
233 |
<xsl:call-template name="Warning"><xsl:with-param name="text">S60 Component "<xsl:value-of select="@id"/>" has <xsl:value-of select="count(unit)"/> units.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
234 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
235 |
<xsl:when test="count(unit[not(@version)]) > 1"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
236 |
<xsl:call-template name="Error"><xsl:with-param name="text">Component "<xsl:value-of select="@id"/>" has <xsl:value-of select="count(unit)"/> units.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
237 |
</xsl:when> |
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:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
240 |
<xsl:when test="unit"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
241 |
<xsl:when test="contains(comment(),'PLACEHOLDER=')"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
242 |
<xsl:when test="comment()"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
243 |
<xsl:call-template name="Note"><xsl:with-param name="text">Component "<xsl:value-of select="@name"/>" is empty.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
244 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
245 |
<xsl:when test="not(comment())"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
246 |
<xsl:call-template name="Warning"><xsl:with-param name="text">Component "<xsl:value-of select="@name"/>" is empty and has no comment</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
247 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
248 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
249 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
250 |
<xsl:if test="@href"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
251 |
<xsl:variable name="child" select="document(@href,.)/SystemDefinition"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
252 |
<xsl:if test="@id!=$child/@id"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
253 |
<xsl:call-template name="Error"><xsl:with-param name="text"><xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" must match ID in linked file "<xsl:value-of select="@href"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
254 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
255 |
<xsl:if test="$child/@href"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
256 |
<xsl:call-template name="Error"><xsl:with-param name="text">linked <xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" cannot be a link</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
257 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
258 |
<xsl:for-each select="@*[name()!='id']"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
259 |
<xsl:if test="$child/@*[name()=name(current())]"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
260 |
<xsl:call-template name="Warning"><xsl:with-param name="text">linked <xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" has duplicate attribute to linking document. Duplicate ignored.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
261 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
262 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
263 |
<xsl:if test="*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
264 |
<xsl:call-template name="Error"><xsl:with-param name="text"><xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" cannot have both link and content. Content ignored.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
265 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
266 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
267 |
<xsl:if test="@href and name()!=name(document(@href,.)/SystemDefinition/*)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
268 |
<xsl:call-template name="Error"><xsl:with-param name="text"><xsl:value-of select="name()"/> "<xsl:value-of select="@id"/>" must match item in linked file "<xsl:value-of select="@href"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
269 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
270 |
<xsl:if test="not(@href)"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
271 |
<xsl:apply-templates select="*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
272 |
<xsl:with-param name="filename" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
273 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
274 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
275 |
<xsl:if test="@href"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
276 |
<xsl:apply-templates select="document(@href,.)/*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
277 |
<xsl:with-param name="filename"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
278 |
<xsl:call-template name="normpath"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
279 |
<xsl:with-param name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
280 |
<xsl:if test="not(starts-with(current()/@href,'/'))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
281 |
<xsl:call-template name="before"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
282 |
<xsl:with-param name="text" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
283 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
284 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
285 |
<xsl:value-of select="current()/@href"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
286 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
287 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
288 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
289 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
290 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
291 |
</xsl:template> |
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 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
294 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
295 |
<xsl:template match="meta"> <xsl:param name="filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
296 |
<xsl:apply-templates select="@*"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
297 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
298 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
299 |
<xsl:template match="meta/@rel | meta/@type | meta/@href"/> <!-- anything is valid --> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
300 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
301 |
<xsl:template match="unit"> <xsl:param name="filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
302 |
<xsl:apply-templates select="@*"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
303 |
<xsl:with-param name="filename" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
304 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
305 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
306 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
307 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
308 |
<xsl:template match="unit/@* | meta/@*" priority="-1"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
309 |
<xsl:apply-templates select="." mode="valid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
310 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
311 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
312 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
313 |
<xsl:template match="@id" mode="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
314 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
315 |
<xsl:when test="contains(.,':')"><xsl:value-of select="substring-after(.,':')"/></xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
316 |
<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
|
317 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
318 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
319 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
320 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
321 |
<xsl:template match="@id"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
322 |
<xsl:if test="contains(concat(' ',substring-after($all-ids,concat(' ',.,' '))),concat(' ',.,' '))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
323 |
<xsl:call-template name="Warning"><xsl:with-param name="text">Duplicate ID: <xsl:value-of select="name(..)"/> "<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
324 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
325 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
326 |
<xsl:if test="contains(.,':') and not(ancestor::*/namespace::*[name()=substring-before(current(),':')])"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
327 |
<xsl:call-template name="Error"><xsl:with-param name="text">Undefined namespace for ID "<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
328 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
329 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
330 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
331 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
332 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
333 |
<xsl:template mode="localid" match="*"> |
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: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
|
336 |
<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
|
337 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
338 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
339 |
<xsl:template match="@bldFile|@mrp|@base"><xsl:param name="filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
340 |
<xsl:if test="substring(.,string-length(.))='/'"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
341 |
<xsl:call-template name="Warning"><xsl:with-param name="text"><code><xsl:value-of select="name()"/></code> path "<xsl:value-of select="."/>" should not end in /</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
342 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
343 |
<xsl:if test="contains(.,'\')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
344 |
<xsl:call-template name="Error"><xsl:with-param name="text"><code><xsl:value-of select="name()"/></code> path "<xsl:value-of select="."/>" must use only forward slashes</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
345 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
346 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
347 |
<!-- this is a realtive path, so just check that it's the expected number of dirs down --> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
348 |
<xsl:variable name="fullpath"><xsl:call-template name="normpath"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
349 |
<xsl:with-param name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
350 |
<xsl:if test="not(starts-with(.,'/'))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
351 |
<xsl:call-template name="before"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
352 |
<xsl:with-param name="text" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
353 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
354 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
355 |
<xsl:value-of select="."/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
356 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
357 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
358 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
359 |
<xsl:variable name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
360 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
361 |
<xsl:when test="not(contains($filename,':'))">/<xsl:for-each select="ancestor::*/@id"><xsl:apply-templates mode="path" select="."/>/</xsl:for-each></xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
362 |
<xsl:otherwise><xsl:for-each select="../../../@id|../../@id"><xsl:apply-templates mode="path" select="."/>/</xsl:for-each></xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
363 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
364 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
365 |
<xsl:variable name="segment"> <!-- the part relative to the fragment directory --> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
366 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
367 |
<xsl:when test="ancestor::layer"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
368 |
<xsl:apply-templates select="ancestor::package" mode="localid"/>/<xsl:apply-templates select="ancestor::collection" mode="localid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
369 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
370 |
<xsl:when test="ancestor::package"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
371 |
<xsl:apply-templates select="ancestor::collection" mode="localid"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
372 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
373 |
<xsl:when test="ancestor::collection"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
374 |
</xsl:choose>/<xsl:apply-templates select="ancestor::component" mode="localid"/>/</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
375 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
376 |
<xsl:when test="not(starts-with(concat(.,'/'),$segment) or starts-with(concat('/',.,'/'),$segment)) and $path-errors"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
377 |
<xsl:call-template name="Note"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -> <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
378 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
379 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
380 |
</xsl:template> |
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 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
383 |
<xsl:template match="@bldFile[starts-with(.,'/') or contains(.,'../') or contains(.,':')] | @mrp[starts-with(.,'/') or contains(.,'../') or contains(.,':')] |@base[starts-with(.,'/') or contains(.,'../') or contains(.,':')]"><xsl:param name="filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
384 |
<xsl:if test="substring(.,string-length(.))='/'"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
385 |
<xsl:call-template name="Warning"><xsl:with-param name="text"><code><xsl:value-of select="name()"/></code> path "<xsl:value-of select="."/>" should not end in /</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
386 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
387 |
<xsl:if test="contains(.,'\')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
388 |
<xsl:call-template name="Error"><xsl:with-param name="text"><code><xsl:value-of select="name()"/></code> path "<xsl:value-of select="."/>" must use only forward slashes</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
389 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
390 |
<xsl:variable name="fullpath"><xsl:call-template name="normpath"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
391 |
<xsl:with-param name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
392 |
<xsl:if test="not(starts-with(.,'/'))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
393 |
<xsl:call-template name="before"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
394 |
<xsl:with-param name="text" select="$filename"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
395 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
396 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
397 |
<xsl:value-of select="."/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
398 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
399 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
400 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
401 |
<xsl:variable name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
402 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
403 |
<xsl:when test="not(contains($filename,':'))">/<xsl:for-each select="ancestor::*/@id"><xsl:apply-templates mode="path" select="."/>/</xsl:for-each></xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
404 |
<xsl:otherwise><xsl:for-each select="../../../@id|../../@id"><xsl:apply-templates mode="path" select="."/>/</xsl:for-each></xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
405 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
406 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
407 |
<xsl:variable name="segment"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
408 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
409 |
<xsl:when test="ancestor::layer"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
410 |
<xsl:value-of select="concat($fullpath,'/')"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
411 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
412 |
<xsl:when test="ancestor::package"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
413 |
<xsl:value-of select="concat('/',substring-after(substring-after($fullpath,'/'),'/'),'/')"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
414 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
415 |
<xsl:when test="ancestor::collection"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
416 |
<xsl:value-of select="concat('/',substring-after(substring-after(substring-after($fullpath,'/'),'/'),'/'),'/')"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
417 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
418 |
<xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
419 |
<xsl:value-of select="concat('/',substring-after(substring-after(substring-after(substring-after($fullpath,'/'),'/'),'/'),'/'),'/')"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
420 |
</xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
421 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
422 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
423 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
424 |
<xsl:when test="contains($filename,':')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
425 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
426 |
<xsl:when test="not(starts-with(.,$path) or concat(.,'/')=$path) and $path-errors"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
427 |
<xsl:call-template name="Note"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -> <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="."/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
428 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
429 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
430 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
431 |
<xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
432 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
433 |
<xsl:when test="not($path-errors)"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
434 |
<xsl:when test="substring-before(substring($segment,2),'/') != substring-before(substring($path,2),'/') and (ancestor::SystemDefinition/@id-namespace!='http://www.symbian.org/system-definition' and not(contains(../../@id,':')))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
435 |
<xsl:call-template name="Warning"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -> <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
436 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
437 |
<xsl:when test="substring-before(substring($segment,2),'/') != substring-before(substring($path,2),'/')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
438 |
<xsl:call-template name="Error"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -> <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
439 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
440 |
<xsl:when test="not(starts-with($segment,$path))"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
441 |
<xsl:call-template name="Note"><xsl:with-param name="text">Unexpected <code><xsl:value-of select="name()"/></code> path for <xsl:apply-templates mode="path" select="../../../@id"/> -> <strong><xsl:apply-templates mode="path" select="../../@id"/></strong>: "<xsl:value-of select="$fullpath"/>"</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
442 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
443 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
444 |
</xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
445 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
446 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
447 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
448 |
<xsl:template match="SystemDefinition" mode="check-matches"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
449 |
<xsl:param name="which"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
450 |
<xsl:param name="other"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
451 |
<xsl:for-each select="//*[@mrp]"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
452 |
<xsl:variable name="mrp" select="@mrp"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
453 |
<xsl:if test="not($other//*[@mrp=$mrp])"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
454 |
<xsl:call-template name="Error"><xsl:with-param name="text"><xsl:value-of select="$mrp"/> has no match in <xsl:value-of select="$which"/>.</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
455 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
456 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
457 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
458 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
459 |
<xsl:template match="*" mode="value"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
460 |
<xsl:call-template name="Error"><xsl:with-param name="text"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
461 |
<xsl:value-of select="name()"/>:<xsl:for-each select="@*"><xsl:value-of select="concat(name(),'=',.)"/></xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
462 |
</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
463 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
464 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
465 |
<xsl:template match="*" mode="compare"><xsl:param name="base"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
466 |
<xsl:variable name="n" select="@id"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
467 |
<xsl:variable name="tag" select="name()"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
468 |
<xsl:variable name="v"><xsl:apply-templates select="." mode="value"/></xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
469 |
<xsl:variable name="v2"><xsl:apply-templates mode="value" select="$base//*[name()=$tag and @id=$n]"/></xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
470 |
<xsl:if test="$v != $v2"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
471 |
<xsl:call-template name="Error"><xsl:with-param name="text"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
472 |
<xsl:value-of select="concat(name(),' ',@name)"/> not identical. [<xsl:value-of select="$v"/>|<xsl:value-of select="$v2"/>]</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
473 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
474 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
475 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
476 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
477 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
478 |
<xsl:template match="unit" mode="compare" priority="1"><xsl:param name="base"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
479 |
<xsl:variable name="n" select="concat(@version,':',@mrp,'.',@prebuilt)"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
480 |
<xsl:variable name="v"><xsl:apply-templates select="." mode="value"/></xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
481 |
<xsl:variable name="v2"><xsl:apply-templates mode="value" select="$base//unit[concat(@version,':',@mrp,'.',@prebuilt)=$n]"/></xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
482 |
<xsl:if test="$v != $v2"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
483 |
<xsl:call-template name="Error"><xsl:with-param name="text"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
484 |
<xsl:value-of select="concat('
',name(),' ',../@name,' v',@version)"/> not identical. [<xsl:value-of select="$v"/>|<xsl:value-of select="$v2"/>]</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
485 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
486 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
487 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
488 |
<xsl:template match="/variations/@module"> (<xsl:value-of select="."/>)</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
489 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
490 |
<xsl:template match="/variations" mode="x-check"><xsl:param name="sysdef"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
491 |
<xsl:call-template name="Section"><xsl:with-param name="text">vp cross-check <xsl:apply-templates select="@module"/></xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
492 |
<xsl:for-each select="//component"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
493 |
<xsl:variable name="found"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
494 |
<xsl:apply-templates select="$sysdef" mode="lookfor"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
495 |
<xsl:with-param name="id" select="@name"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
496 |
<xsl:with-param name="version" select="@version"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
497 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
498 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
499 |
<xsl:if test="$found=''"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
500 |
<xsl:call-template name="Error"><xsl:with-param name="text">VP component "<xsl:value-of select="@name"/>"<xsl:if test="@version"> v<xsl:value-of select="@version"/></xsl:if> not in SysDef</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
501 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
502 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
503 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
504 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
505 |
<xsl:template match="*" mode="lookfor"><xsl:param name="id"/><xsl:param name="version"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
506 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
507 |
<xsl:when test="string-length($version) and //component[@id=$id and unit[@version=$version]]">Found</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
508 |
<xsl:when test="string-length($version)=0 and //*[@id=$id]">Found</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
509 |
<xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
510 |
<xsl:apply-templates select="document(//layer/@href | //package/@href | //collection/@href | //component/@href,.)/*/*" mode="lookfor"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
511 |
<xsl:with-param name="version" select="$version"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
512 |
<xsl:with-param name="id" select="$id"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
513 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
514 |
</xsl:otherwise> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
515 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
516 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
517 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
518 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
519 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
520 |
<xsl:template match="SystemBuild" mode="x-check"><xsl:param name="sysdef"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
521 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
522 |
<xsl:call-template name="Section"><xsl:with-param name="text">System Build cross-check</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
523 |
<xsl:for-each select="//ref"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
524 |
<xsl:variable name="found"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
525 |
<xsl:apply-templates select="$sysdef" mode="lookfor"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
526 |
<xsl:with-param name="id" select="current()/@item"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
527 |
</xsl:apply-templates> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
528 |
</xsl:variable> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
529 |
<xsl:if test="$found=''"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
530 |
<xsl:call-template name="Error"><xsl:with-param name="text">Build item "<xsl:value-of select="@item"/>" not in SysDef</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
531 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
532 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
533 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
534 |
<xsl:for-each select="//listRef"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
535 |
<xsl:if test="not(//list[@name=current()/@list])"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
536 |
<xsl:call-template name="Error"><xsl:with-param name="text">Build list "<xsl:value-of select="@name"/>" not defined</xsl:with-param></xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
537 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
538 |
</xsl:for-each> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
539 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
540 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
541 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
542 |
<xsl:template name="my-release"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
543 |
<xsl:variable name="n" select="@name"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
544 |
<xsl:variable name="new" select="@introduced"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
545 |
<xsl:variable name="end" select="@deprecated"/> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
546 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
547 |
<xsl:when test="$new!='' and $end!=''">(<xsl:value-of select="concat($new,' - ',$end)"/>)</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
548 |
<xsl:when test="$new!='' ">(<xsl:value-of select="$new"/>)</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
549 |
<xsl:when test="$end!=''">(? - <xsl:value-of select="$end"/>)</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
550 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
551 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
552 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
553 |
<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
|
554 |
<!-- 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
|
555 |
<xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
556 |
<xsl:when test="contains($path,'/../')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
557 |
<xsl:call-template name="normpath"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
558 |
<xsl:with-param name="path"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
559 |
<xsl:call-template name="before"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
560 |
<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
|
561 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
562 |
<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
|
563 |
</xsl:with-param> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
564 |
</xsl:call-template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
565 |
</xsl:when> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
566 |
<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
|
567 |
</xsl:choose> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
568 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
569 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
570 |
<!-- return all text before the last / --> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
571 |
<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
|
572 |
<xsl:if test="contains($text,'/')"> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
573 |
<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
|
574 |
</xsl:if> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
575 |
</xsl:template> |
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
576 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
577 |
|
f70b728ea30c
Move sysdeftools from buildtools package into build package
Bob Rosenberg <bob.rosenberg@nokia.com>
parents:
diff
changeset
|
578 |
</xsl:stylesheet> |