/[PAMELA software]/quicklook/dataToXML/Data/TabDumpTemplate.xsl
ViewVC logotype

Annotation of /quicklook/dataToXML/Data/TabDumpTemplate.xsl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download) (as text)
Tue Apr 25 09:00:20 2006 UTC (18 years, 7 months ago) by kusanagi
Branch point for: MAIN
File MIME type: application/xml
Initial revision

1 kusanagi 1.1 <?xml version="1.0" encoding="UTF-8"?> <!-- Prologo XML -->
2     <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <!-- Dichiarazione del documento XSLT -->
3     <!-- <xsl:stylesheet version="1.0"
4     xmlns:xsl="http://www.w3.org/TR/WD-xsl"> -->
5    
6     <!--
7     =====================================================================================
8     Stylesheet: TabDumpTemplate.xsl
9     Version: 1.0 (2006-03-01)
10     Author: Maurizio Nagni
11     Descr.: Merge the output of the TabDumpToXml.c script with the TabDumpInfo.xml
12     file to generate a human readble verion of the TabDump packet
13     =====================================================================================
14     -->
15    
16     <!--Contains some utility to converts dec/hex/bin numbers-->
17     <xsl:include href="numberutils_lib.xsl"/>
18    
19     <!--Contains all the customer specific parameters-->
20     <!--<xsl:include href="Configure.xsl"/>-->
21    
22     <!-- Define which a key called "varDes"
23     which will search inside the node "var" of the reference
24     ArrDumpInfo.xml (or whatever file instead of the is used)
25     all values values of the node "idx" matching the valued passed when
26     the key "fileName" is called -->
27     <!-- No xml file is defined here because the xsl:key is absolutely generic -->
28     <xsl:key name="arrDes" match="tab" use="idx"/>
29    
30     <xsl:template match="/" name="TabDumpReference">
31     <xsl:param name="code"/>
32     <xsl:param name="arrval"/>
33     <xsl:for-each select="document('./compilationInfo/PRH_ParamHandler_INFN_auto.tab.xml')">
34     <xsl:for-each select="key('arrDes', $code)">
35     <td><xsl:value-of select="name"/><xsl:text>(</xsl:text><xsl:value-of select="idx"/><xsl:text>)</xsl:text></td>
36     <td><xsl:value-of select="comment"/></td>
37     <td><xsl:copy-of select="$arrval"/></td>
38     </xsl:for-each>
39     </xsl:for-each>
40     </xsl:template>
41    
42     <xsl:template match="/" name="TabDumpTemplate">
43     <html>
44     <body STYLE="font-family:Arial, helvetica, sans-serif; font-size:12pt">
45     <h2>TabDump Event</h2>
46     <table border="1">
47     <xsl:for-each select="//TABDUMP_EVENT">
48     <tr bgcolor="#1acd32">
49     <th align="center">Packet OBT</th>
50     <th align="center">Packet Num</th>
51     </tr>
52     <tr>
53     <td><xsl:value-of select="PACKET_OBT"/></td>
54     <td><xsl:value-of select="PACKET_NUM"/></td>
55     </tr>
56     <tr bgcolor="#9acd32">
57     <th align="left">Name (ID) </th>
58     <th align="left">Description</th>
59     <th align="left">Value </th>
60     </tr>
61     <!--<xsl:variable name="compTS" select="COMPILATION_TS"> </xsl:variable>-->
62     <xsl:for-each select="TABDUMP_RECORDS/TABDUMP_RECORD">
63    
64     <xsl:variable name="arrString">
65     <table border="1">
66     <xsl:for-each select="ROW">
67     <tr>
68     <xsl:for-each select="COL">
69     <td>
70     <xsl:text>0x</xsl:text>
71     <xsl:call-template name="Dec2Hex">
72     <xsl:with-param name="value" select="."/>
73     </xsl:call-template>
74     </td>
75     </xsl:for-each>
76     </tr>
77     </xsl:for-each>
78     </table>
79     </xsl:variable>
80    
81     <tr>
82     <xsl:variable name="retTemplate">
83     <xsl:call-template name="TabDumpReference">
84     <xsl:with-param name="code" select="TAB_ID"/>
85     <xsl:with-param name="arrval" select="$arrString"/>
86     </xsl:call-template>
87     </xsl:variable>
88     <xsl:if test='$retTemplate=""'>
89     <td> <xsl:value-of select="TAB_ID"/> -- n.a. </td>
90     <td> n.a. </td>
91     <td> <xsl:copy-of select="$arrString"/> </td>
92     </xsl:if>
93     <xsl:if test='$retTemplate!=""'>
94     <xsl:copy-of select="$retTemplate" />
95     </xsl:if>
96     <!--
97     <td>
98     0x
99     <xsl:call-template name="Dec2Hex">
100     <xsl:with-param name="value" select="INFO1"/>
101     </xsl:call-template>
102    
103     <xsl:value-of select="INFO1"/>
104     </td>
105     -->
106     </tr>
107     </xsl:for-each>
108     </xsl:for-each>
109    
110     </table>
111     </body>
112     </html>
113     </xsl:template>
114    
115     </xsl:stylesheet>

  ViewVC Help
Powered by ViewVC 1.1.23