W3C home > Mailing lists > Public > www-validator-cvs@w3.org > October 2009

2006/unicorn/WebContent/WEB-INF/resources/templates xml.vm,NONE,1.1

From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
Date: Fri, 23 Oct 2009 16:31:42 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1N1N3G-0006Js-9v@lionel-hutz.w3.org>
Update of /sources/public/2006/unicorn/WebContent/WEB-INF/resources/templates
In directory hutz:/tmp/cvs-serv24278/WebContent/WEB-INF/resources/templates

Added Files:
	xml.vm 
Log Message:
new xml output template

--- NEW FILE: xml.vm ---
<?xml version="1.0" encoding="utf-8"?>
<observationresponse xmlns="http://www.w3.org/2009/10/unicorn/observationresponse"
					 ref="$unicorncall.getDocumentName()"
					 date="$unicorncall.getDate()"
					 xml:lang="$unicorncall.getLang()">

<status value="#if($unicorncall.isPassed())passed#{else}failed#end"/>

#set($lang = $unicorncall.getLang())
#set($uri = $unicorncall.getDocumentName())
#set($observationList = $unicorncall.ObservationList)
#foreach ($observationName in $observationList.keySet())
#set ($observation = $observationList.get($observationName))
	
	<group name="$observationName">
		<title>$unicorncall.getObserverName($observationName, $lang)</title>
	</group>
	
#foreach($group in $observation.getGroups())
	#if($group.hasParent())#set($parent=$group.getParentName())#else#set($parent=$observationName)#end
	<group name="$group.getName()" parent="$parent">
		<title>$group.getTitle()</title>
		#if($group.getDescription())<description>$group.getDescription()</description>#end
	</group>
#end

#foreach($message in $observation.getMessages())
	#if($message.getType()==2)#set($type="error")#elseif($message.getType()==1)#set($type="warning")#else#set($type="info")#end
	#if($message.getGroupName())#set($messageGroup=$message.getGroupName())#else#set($messageGroup=$observationName)#end
	<message type="$type" group="$messageGroup" level="$message.getLevel()" #if($message.getURI()!=$uri)ref="$message.getURI()"#end>
		#foreach($context in $message.getContexts())
		<context #if($context.getURI() && $context.getURI()!=$message.getURI())ref="$context.getURI()"#end #if($context.getLine())line="$context.getLine()"#end #if($context.getColumn())column="$context.getColumn()"#end>
			$!context.getContext()
		</context>
		#end
		<title>$message.getTitle()</title>
		<description>$message.getDescription()</description>
	</message>
#end

#end

</observationresponse>
Received on Friday, 23 October 2009 16:31:46 UTC

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