|
1 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> |
|
2 <!--Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 All rights reserved. |
|
4 This component and the accompanying materials are made available |
|
5 under the terms of the License "Eclipse Public License v1.0" |
|
6 which accompanies this distribution, and is available |
|
7 at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
|
9 Initial Contributors: |
|
10 Nokia Corporation - initial contribution. |
|
11 Contributors: |
|
12 Description: |
|
13 Validate a system definition file/files and output results as plain text |
|
14 --> |
|
15 <xsl:output method="text"/> |
|
16 <xsl:include href="lib/test-model.xsl"/> |
|
17 <xsl:param name="level" select="3"/> <!--<1/2/3> - (optional) The detail of the error messages. 1 = Errors only. 2 = Errors and Warnings. 3 = Notes as well (the default) --> |
|
18 <xsl:param name="path-errors" select="0"/> <!--1 - (optional) If present, it will check to see if unit paths follow the coding standards--> |
|
19 |
|
20 |
|
21 <!--Description:Validates a system definition file or files and outputs the result as plain text |
|
22 --> |
|
23 <!--Input:<sysdef> - (required) The system definition XML or Model XML file to process. Sysdefs must be in the 3.0 format, and can be a fragment or stand-alone.--> |
|
24 <!--Output:<log> - (optional) The file to write the error log to. If not present it will write to stdout.--> |
|
25 |
|
26 |
|
27 <xsl:template name="Section"><xsl:param name="text"/><xsl:param name="sub"/> |
|
28 <xsl:text>

</xsl:text> |
|
29 <xsl:value-of select="$text"/> |
|
30 <xsl:if test="$sub!=''"> (<xsl:value-of select="$sub"/>)</xsl:if> |
|
31 </xsl:template> |
|
32 |
|
33 |
|
34 <xsl:template name="Note"><xsl:param name="text"/><xsl:param name="sub"/> |
|
35 <xsl:if test="$level >= 3"> |
|
36 <xsl:text>
Note: </xsl:text> |
|
37 <xsl:value-of select="$text"/> |
|
38 <xsl:if test="$sub!=''"> (<xsl:value-of select="$sub"/>)</xsl:if> |
|
39 </xsl:if> |
|
40 </xsl:template> |
|
41 |
|
42 <xsl:template name="Warning"><xsl:param name="text"/><xsl:param name="sub"/> |
|
43 <xsl:if test="$level >= 2"> |
|
44 <xsl:text>
Warning: </xsl:text> |
|
45 <xsl:value-of select="$text"/> |
|
46 <xsl:if test="$sub!=''"> (<xsl:value-of select="$sub"/>)</xsl:if> |
|
47 </xsl:if> |
|
48 </xsl:template> |
|
49 |
|
50 <xsl:template name="Error"><xsl:param name="text"/><xsl:param name="sub"/> |
|
51 <xsl:text>
Error: </xsl:text> |
|
52 <xsl:value-of select="$text"/> |
|
53 <xsl:if test="$sub!=''"> (<xsl:value-of select="$sub"/>)</xsl:if> |
|
54 </xsl:template> |
|
55 |
|
56 </xsl:stylesheet> |