root/resources/templates/output/en_xhtml10.vm @ 79:7b68060f625c

Revision 79:7b68060f625c, 7.2 KB (checked in by hduong, 5 years ago)

simplified observationresponse and generalize output format (now we can map a format type what defnied in the contract to a ResponseParser?)

Line 
1<?xml version="1.0"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5  <head>
6    #if($unicorncall.DocumentName)
7      <title>Result for $unicorncall.DocumentName</title>
8    #else
9      <title>Result for the document you submitted</title>
10    #end
11    <link rev="start" href="./" title="Home Page" />
12    <style type="text/css" media="all">@import "./style/base.css";</style>
13    <style type="text/css" media="all">@import "./style/results.css";</style>
14    <meta name="keywords" content="Unicorn, Observation"/>
15  </head>
16
17#macro(error $error)
18  <span class="err_type">Error</span>
19  <em>#if($error.Line)Line $error.Line #end #if($error.Column)Column $error.Column #end</em>:
20  #foreach($message in $error.Message)
21    <span class="msg">$message</span>
22  #end
23  #if($error.Context && $error.Context != "")
24    <pre><code class="input">$error.Context</code></pre>
25  #end
26  <div class="ve mid-127">
27  #foreach($longMessage in $error.Longmessage)
28      <p>
29        #foreach($longMessagePiece in $longMessage.Content)
30                        $longMessagePiece
31        #end
32      </p>
33  #end
34  </div>
35#end
36
37#macro(info $information)
38  <span class="err_type">Info</span>
39  <em>#if($information.Line)Line $information.Line #end #if($information.Column)Column $information.Column #end</em>:
40  #foreach($message in $information.Message)
41    <span class="msg">$message</span>
42  #end
43  #if($information.Context && $information.Context != "")
44    <pre><code class="input">$information.Context</code></pre>
45  #end
46  <div class="ve mid-127">
47  #foreach($longMessage in $information.Longmessage)
48      <p>
49        #foreach($longMessagePiece in $longMessage.Content)
50            $longMessagePiece
51        #end
52      </p>
53  #end
54  </div>
55#end
56
57#macro(warning $warning)
58  <span class="err_type">Warning</span>
59  <em>#if($warning.Line)Line $warning.Line #end #if($warning.Column)Column $warning.Column #end</em>:
60  #foreach($message in $warning.Message)
61    <span class="msg">$message</span>
62  #end
63  #if($warning.Context && $warning.Context != "")
64    <pre><code class="input">$warning.Context</code></pre>
65  #end
66  <div class="ve mid-127">
67  #foreach($longMessage in $warning.Longmessage)
68      <p>
69        #foreach($longMessagePiece in $longMessage.Content)
70            $longMessagePiece
71        #end
72      </p>
73  #end
74  </div>
75#end
76
77#macro(produceErrors $errors)
78    <ol class="error_list">
79    #foreach($error in $errors)
80      <li class="msg_err">
81        #error($error)
82      </li>
83    #end
84    </ol>
85#end
86
87#macro(produceWarnings $warnings)
88      <ol class="warning_list">
89      #foreach($warning in $warnings)
90        <li class="msg_warn">
91          #warning($warning)
92        </li>
93      #end
94      </ol>
95#end
96
97#macro(produceInfos $infos)
98    <ol class="info_list">
99    #foreach($information in $infos)
100      <li class="msg_info">
101        #info($information)
102      </li>
103    #end
104    </ol>
105#end
106
107<body>
108  <div id="banner">
109    <h1 id="title"><a href="http://www.w3.org/"><img height="48" alt="W3C" id="logo" src="http://www.w3.org/Icons/WWW/w3c_home_nb" /></a>
110<img src="images/unicorn.png" alt="Unicorn" /></h1>
111 
112  </div>
113  <p id="tagline">
114        the Web's Universal Conformance Checker - <strong>ALPHA Test Version</strong>
115  </p>
116  <div id="result">
117  #set($observationList = $unicorncall.ObservationList)
118  #foreach($observationName in $observationList.keySet())
119    #set($observation = $observationList.get($observationName))
120    #if($observation.isPassed())
121      <h2 class="valid">This document has passed the
122      #if($observation.getVersion())
123        $observation.getVersion().toUpperCase()
124      #else
125        $observationName
126      #end
127      test!</h2>
128    #else
129      <h2 id="results" class="invalid">This document has <strong>not</strong> passed the
130      #if($observation.getVersion())
131        $observation.getVersion().toUpperCase()
132      #else
133        $observationName
134      #end
135      test!</h2>
136      #foreach($result in $observation.getResultsList())
137        #if(!$result.Errors.isEmpty())
138          <h3><u>Location: $result.Uri</u></h3>
139          #produceErrors($result.Errors)
140        #end
141      #end
142    #end
143   
144   
145    #foreach($result in $observation.getResultsList())
146      #if(!$result.Infos.isEmpty() || !$result.Warnings.isEmpty())
147        <h3><u>Location: $result.Uri</u></h3>
148      #end
149 
150      #if(!$result.Infos.isEmpty())
151        #produceInfos($result.Infos)
152      #end
153   
154      #if(!$result.Warnings.isEmpty())
155        #produceWarnings($result.Warnings)
156      #end
157    #end
158   <hr/>
159   
160  #end
161
162  #if(!$unicorncall.haveHighPassed())
163    <p>
164      Some observations might not have been made because one or more with high
165      priority failed.
166    </p>
167  #end
168  #if(!$unicorncall.haveMediumPassed())
169    <p>
170      Some observations might not have been made because one or more with medium
171      priority failed.
172    </p>
173  #end
174
175  </div>
176
177     <ul class="navbar"  id="menu">
178        <li><a href="http://www.w3.org/QA/2006/obs_framework/" title="Documentation about this service and the software behind it">Documentation</a> <span class="hideme">|</span></li>
179                <li><a href="http://dev.w3.org/cvsweb/2006/unicorn/" title="Download the source for this service">Download</a> <span class="hideme">|</span></li>
180                <li><a href="mailto:public-qa-dev@w3.org" title="send us your thoughts and bug reports on the PUBLIC development mailing-list">Feedback</a> <span class="hideme">|</span></li>
181              </ul>
182
183   <p id="activity_logos">
184      <a href="http://www.w3.org/QA/" title="W3C's Quality Assurance Activity, bringing you free Web quality tools and more"><img src="http://www.w3.org/QA/2002/12/qa.png" alt="QA" /></a><a href="http://www.w3.org/Style/CSS/learning" title="Learn more about Cascading Style Sheets"></a>
185   </p>
186   <p id="support_logo">
187Support this tool, become a<br />
188<a href="http://www.w3.org/Consortium/supporters"><img src="http://www.w3.org/Consortium/supporter-logos/csupporter.png" alt="W3C Supporter" /></a>
189   </p>
190
191    <p class="copyright">
192      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> &copy; 1994-2006
193      <a href="http://www.w3.org/"><acronym title="World Wide Web Consortium">W3C</acronym></a>&reg;
194
195      (<a href="http://www.csail.mit.edu/"><acronym title="Massachusetts Institute of Technology">MIT</acronym></a>,
196      <a href="http://www.ercim.org/"><acronym title="European Research Consortium for Informatics and Mathematics">ERCIM</acronym></a>,
197      <a href="http://www.keio.ac.jp/">Keio</a>),
198      All Rights Reserved.
199      W3C <a href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
200      <a href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>,
201      <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-documents">document use</a>
202      and <a rel="Copyright" href="http://www.w3.org/Consortium/Legal/copyright-software">software licensing</a>
203
204      rules apply. Your interactions with this site are in accordance
205      with our <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Public">public</a> and
206      <a href="http://www.w3.org/Consortium/Legal/privacy-statement#Members">Member</a> privacy
207      statements.
208    </p>
209
210</body>
211</html>
Note: See TracBrowser for help on using the browser.