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