W3C home > Mailing lists > Public > www-validator-cvs@w3.org > September 2010

unicorn commit: ~ fixed for non-grouped observations

From: Mercurial notifier <nobody@w3.org>
Date: Thu, 16 Sep 2010 20:13:45 +0000
To: Unicorn Updates <www-validator-cvs@w3.org>
Message-Id: <E1OwKq1-0006d4-W2@blinky.w3.org>
changeset:   1493:4a6e703af958
tag:         tip
user:        Thomas Gambet <tgambet@w3.org>
date:        Thu Sep 16 16:11:57 2010 -0400
files:       WebContent/WEB-INF/resources/templates/text.vm
description:
~ fixed for non-grouped observations


diff -r 8c9db27d4f5e -r 4a6e703af958 WebContent/WEB-INF/resources/templates/text.vm
--- a/WebContent/WEB-INF/resources/templates/text.vm	Tue Sep 14 13:41:14 2010 -0400
+++ b/WebContent/WEB-INF/resources/templates/text.vm	Thu Sep 16 16:11:57 2010 -0400
@@ -31,7 +31,6 @@
 #end
 
 #end
-
 #set($observationList = $unicorncall.ObservationList)
 #foreach ($observationName in $observationList.keySet())
 #set ($observation = $observationList.get($observationName))
@@ -39,97 +38,57 @@
 #set ($errorCount = $observation.getErrorCount())
 #set ($warningCount = $observation.getWarningCount())
 ==================================================================================================================================================
-#if($observation.isPassed())$test_ok#else$test_fail#end $unicorncall.getObserverName($observationName, $lang)#if($observation.Rating) ($observation.Rating/100)#end
-
+#if($observation.isPassed())#set($ref = "test_ok")#elseif($observation.isUndef())#set($ref = "test_undef")#else#set($ref = "test_fail")#end$ucn.evaluate($lang, $ref, "$unicorncall.getObserverName($observationName, $lang)#if($observation.isSetRating()) ($observation.Rating/100)#end")
 #if($infoCount && $infoCount > 0)$info_label ($infoCount)
 #end#if($errorCount && $errorCount > 0)$error_label ($errorCount)
 #end#if($warningCount && $warningCount > 0)$warning_label ($warningCount)
-#end#if($observation.getFilteredRequestUri())$direct_link_label $observation.getFilteredRequestUri()
-#{else}$direct_link_label $observation.getBaseURI($observationName)#end
+#end
+$direct_link_label -> #if ($unicorncall.getInputMethod() == "URI")$observation.getHTMLRequestUri()#else$observation.getHTMLIndexUri()#end
+
 #if ($infoCount && $infoCount > 0)
 --------------------------------------------------------------------------------------------------------------------------------------------------
 $info_label ($infoCount)
 --------------------------------------------------------------------------------------------------------------------------------------------------
-#foreach($result in $observation.getResultsList())
-#if(!$result.Infos.isEmpty())
-#if ($unicorncall.getInputMethod() == "URI")=> $uri_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "UPLOAD")=> $file_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "DIRECT")=> $submitted_file#end
+#set ($messages = $observation.getURISortedMessages(0))
+#foreach ($uri in $messages.keySet())
+#if ($unicorncall.getInputMethod() == "URI")[$uri_token $uri]
+#end#if ($unicorncall.getInputMethod() == "UPLOAD")#if ($unicornTool.isTemporaryURL($uri))[$submitted_file]#else[$file_token -> $uri]#end
+#end#if ($unicorncall.getInputMethod() == "DIRECT")[$submitted_file]
+#end#foreach($message in $messages.get($uri))
+    * $strUtils.trimToEmpty($message.Title).replaceAll("[ \t]*\n[ \t]*", " ")
+#foreach($context in $message.getContexts())
+        -> #if($context.Line)$line_token $context.Line #end#if($context.Column)| $column_token $context.Column #end#if($context.Context && $context.Context != "")| $context_token #if($context.URI && $context.URI != $uri) ($context.URI) #end$strUtils.trimToEmpty($context.Context).replaceAll("[ \t]*\n[ \t]*", " ")#end
 
-#foreach($info in $result.Infos)
-   -#if($info.Line) $line_token $info.Line#end#if($info.Column) $column_token $info.Column#end#if($info.Context) $context_token $info.Context#end
-#if ($info.Line || $info.Column || $info.Context)
-
-    #end
-#foreach($message in $info.Message)
- $message
-#if($velocityHasNext)    #end
-#end
-##foreach($longMessage in $info.Longmessage)
-##foreach($longMessagePiece in $longMessage.Content)
-##$longMessagePiece
-##end
-##end
-#end
-#end
-#end
-#end
-#if ($errorCount && $errorCount > 0)
+#end#end#end#end
+#if($errorCount && $errorCount > 0)
 --------------------------------------------------------------------------------------------------------------------------------------------------
 $error_label ($errorCount)
 --------------------------------------------------------------------------------------------------------------------------------------------------
-#foreach($result in $observation.getResultsList())
-#if(!$result.Errors.isEmpty())
-#if ($unicorncall.getInputMethod() == "URI")=> $uri_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "UPLOAD")=> $file_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "DIRECT")=> $submitted_file#end
+#set ($messages = $observation.getURISortedMessages(2))
+#foreach ($uri in $messages.keySet())
+#if ($unicorncall.getInputMethod() == "URI")[$uri_token $uri]
+#end#if ($unicorncall.getInputMethod() == "UPLOAD")#if ($unicornTool.isTemporaryURL($uri))[$submitted_file]#else[$file_token -> $uri]#end
+#end#if ($unicorncall.getInputMethod() == "DIRECT")[$submitted_file]
+#end#foreach($message in $messages.get($uri))
+    * $strUtils.trimToEmpty($message.Title).replaceAll("[ \t]*\n[ \t]*", " ")
+#foreach($context in $message.getContexts())
+        -> #if($context.Line)$line_token $context.Line #end#if($context.Column)| $column_token $context.Column #end#if($context.Context && $context.Context != "")| $context_token #if($context.URI && $context.URI != $uri) ($context.URI) #end$strUtils.trimToEmpty($context.Context).replaceAll("[ \t]*\n[ \t]*", " ")#end
 
-#foreach($error in $result.Errors)
-   -#if($error.Line) $line_token $error.Line#end#if($error.Column) $column_token $error.Column#end#if($error.Context) $context_token $error.Context#end
-#if ($error.Line || $error.Column || $error.Context)
-
-    #end
-#foreach($message in $error.Message)
- $message
-#if($velocityHasNext)    #end
-#end
-##foreach($longMessage in $error.Longmessage)
-##foreach($longMessagePiece in $longMessage.Content)
-##$longMessagePiece
-##end
-##end
-#end
-#end
-#end
-#end
+#end#end#end#end
 #if ($warningCount && $warningCount > 0)
 --------------------------------------------------------------------------------------------------------------------------------------------------
 $warning_label ($warningCount)
 --------------------------------------------------------------------------------------------------------------------------------------------------
-#foreach($result in $observation.getResultsList())
-#if(!$result.Warnings.isEmpty())
-#if ($unicorncall.getInputMethod() == "URI")=> $uri_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "UPLOAD")=> $file_token $result.Uri#end
-#if ($unicorncall.getInputMethod() == "DIRECT")=> $submitted_file#end
+#set ($messages = $observation.getURISortedMessages(1))
+#foreach ($uri in $messages.keySet())
+#if ($unicorncall.getInputMethod() == "URI")[$uri_token $uri]
+#end#if ($unicorncall.getInputMethod() == "UPLOAD")#if ($unicornTool.isTemporaryURL($uri))[$submitted_file]#else[$file_token -> $uri]#end
+#end#if ($unicorncall.getInputMethod() == "DIRECT")[$submitted_file]
+#end#foreach($message in $messages.get($uri))
+    * $strUtils.trimToEmpty($message.Title).replaceAll("[ \t]*\n[ \t]*", " ")
+#foreach($context in $message.getContexts())
+        -> #if($context.Line)$line_token $context.Line #end#if($context.Column)| $column_token $context.Column #end#if($context.Context && $context.Context != "")| $context_token #if($context.URI && $context.URI != $uri) ($context.URI) #end$strUtils.trimToEmpty($context.Context).replaceAll("[ \t]*\n[ \t]*", " ")#end
 
-#foreach($warning in $result.Warnings)
-   -#if($warning.Line) $line_token $warning.Line#end#if($warning.Column) $column_token $warning.Column#end#if($warning.Context) $context_token $warning.Context#end
-#if ($warning.Line || $warning.Column || $warning.Context)
-
-    #end
-#foreach($message in $warning.Message)
- $message
-#if($velocityHasNext)    #end
-#end
-##foreach($longMessage in $warning.Longmessage)
-##foreach($longMessagePiece in $longMessage.Content)
-##$longMessagePiece
-##end
-##end
-#end
-#end
-#end
-#end
-
+#end#end#end#end
 #end
 ==================================================================================================================================================
\ No newline at end of file
Received on Thursday, 16 September 2010 20:13:48 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:17:44 UTC