- From: Karl Dubost via cvs-syncmail <cvsmail@w3.org>
- Date: Mon, 14 Jul 2008 03:15:27 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/validator/httpd/cgi-bin
In directory hutz:/tmp/cvs-serv12119
Modified Files:
check
Log Message:
Adding support for JSON output following the format of Validator.nu mostly
Index: check
===================================================================
RCS file: /sources/public/validator/httpd/cgi-bin/check,v
retrieving revision 1.590
retrieving revision 1.591
diff -u -d -r1.590 -r1.591
--- check 30 Jun 2008 18:45:56 -0000 1.590
+++ check 14 Jul 2008 03:15:25 -0000 1.591
@@ -394,7 +394,14 @@
global_vars => TRUE,
filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
);
-
+$File->{Templates}->{JSON} = HTML::Template->new(
+ %template_defaults,
+ filename => File::Spec->catfile($CFG->{Paths}->{Templates},
+ $lang, 'json_ouput.tmpl'),
+ loop_context_vars => TRUE,
+ global_vars => TRUE,
+ filter => sub { my $ref = shift;${$ref} = Encode::decode_utf8(${$ref});}
+);
$File->{Templates}->{PrefillHTML} = HTML::Template->new(
%template_defaults,
filename => File::Spec->catfile($CFG->{Paths}->{Templates},
@@ -1000,6 +1007,8 @@
$template = $File->{Templates}->{EARLXML};
} elsif ($File->{Opt}->{Output} eq 'n3') {
$template = $File->{Templates}->{EARLN3};
+} elsif ($File->{Opt}->{Output} eq 'json') {
+ $template = $File->{Templates}->{JSON};
} elsif ($File->{Opt}->{Output} eq 'ucn') {
$template = $File->{Templates}->{UCN};
} elsif ($File->{Opt}->{Output} eq 'soap12') {
Received on Monday, 14 July 2008 03:16:07 UTC