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

validator/share/templates/en_US earl_n3.tmpl,NONE,1.1 earl_xml.tmpl,NONE,1.1 xml_output.tmpl,NONE,1.1

From: Bjoern Hoehrmann via cvs-syncmail <cvsmail@w3.org>
Date: Sat, 10 Sep 2005 09:00:30 +0000
To: www-validator-cvs@w3.org
Message-Id: <E1EE1Dq-0002wb-O4@lionel-hutz.w3.org>

Update of /sources/public/validator/share/templates/en_US
In directory hutz:/tmp/cvs-serv11278/share/templates/en_US

Added Files:
	earl_n3.tmpl earl_xml.tmpl xml_output.tmpl 
Log Message:
templates for alternate output formats

--- NEW FILE: earl_xml.tmpl ---
Content-Type: application/rdf+xml; charset=UTF-8
X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status">
X-W3C-Validator-Errors: <TMPL_VAR NAME="number_of_errors">

<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF
  xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
  xmlns="http://www.w3.org/2001/03/earl/1.0-test#"
  xmlns:val="http://validator.w3.org/this_will_change/do_not_rely_on_it!">

  <Assertor rdf:about="http://validator.w3.org/">
    <name>W3 Validator</name>
    <contactInfo rdf:resource="http://validator.w3.org/about.html"/>
    <testMode rdf:resource="http://www.w3.org/2001/03/earl/1.00#Auto" />

<TMPL_IF NAME="VALID">
  <asserts>
   <Assertion>
    <subject rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">" />
    <result rdf:resource="http://www.w3.org/2001/03/earl/1.00#passes" />
    <testCase rdf:resource="http://www.w3.org/MarkUp/" />
    <note>Valid!</note>
   </Assertion>
  </asserts>
<TMPL_ELSE>

  <asserts>
   <Assertion rdf:ID="result">
    <subject rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">" />
    <result rdf:resource="http://www.w3.org/2001/03/earl/1.00#fails" />
    <testCase rdf:resource="http://www.w3.org/MarkUp/" />
    <note>Invalid!</note>
   </Assertion>
  </asserts>

<TMPL_LOOP NAME="file_errors">
    <asserts>
      <Assertion rdf:ID="err<TMPL_VAR NAME="__counter__" ESCAPE="HTML">">
        <subject rdf:parseType="Resource">
          <reprOf rdf:resource="<TMPL_VAR NAME="file_uri" ESCAPE="HTML">"/>
          <val:line><TMPL_VAR NAME="line" ESCAPE="HTML"></val:line>
          <val:column><TMPL_VAR NAME="char" ESCAPE="HTML"></val:column>
        </subject>
        <result rdf:resource="http://www.w3.org/2003/03/earl/1.00#fails" />
        <testCase rdf:resource="http://www.w3.org/Markup/" />
        <note><TMPL_VAR NAME="msg" ESCAPE="HTML"></note>
      </Assertion>
    </asserts>
</TMPL_LOOP>
</TMPL_IF>

  </Assertor>
</rdf:RDF>


--- NEW FILE: earl_n3.tmpl ---
Content-Type: text/plain; charset=UTF-8
X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status">
X-W3C-Validator-Errors: <TMPL_VAR NAME="number_of_errors">

@prefix earl: <http://www.w3.org/2001/03/earl/1.0-test#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix val: <http://validator.w3.org/this_will_change/do_not_rely_on_it!> .

<http://validator.w3.org/> a earl:Assertor;
  earl:name "W3 Validator";
  earl:asserts
<TMPL_IF NAME="VALID">
    [
      earl:testMode earl:Auto;
      rdf:predicate earl:passes;
      rdf:subject   [earl:testSubject <<TMPL_VAR NAME="file_uri">>];
      rdf:object    [
                      earl:id <http://www.w3.org/HTML/>;
                      earl:note "Valid"
                    ]
    ]
<TMPL_ELSE>
<TMPL_LOOP NAME="file_errors">
    [
      earl:testMode earl:Auto;
      rdf:predicate earl:fails;
      rdf:subject [
                    val:column "<TMPL_VAR NAME="char">";
                    val:line   "<TMPL_VAR NAME="line">";
                    earl:testSubject <<TMPL_VAR NAME="file_uri">>
                  ];
      rdf:object [
                   earl:id <http://www.w3.org/HTML/>;
                   earl:note """<TMPL_VAR NAME="msg">"""
                 ]
<TMPL_IF __last__>
    ]
<TMPL_ELSE>
    ],
</TMPL_IF>
</TMPL_LOOP>
</TMPL_IF>

.

# EOF

--- NEW FILE: xml_output.tmpl ---
Content-Type: application/xml; charset=UTF-8
X-W3C-Validator-Status: <TMPL_VAR NAME="valid_status">
X-W3C-Validator-Errors: <TMPL_VAR NAME="number_of_errors">

<?xml version="1.0" encoding="UTF-8"?>
<!--
  FIXME: text/xsl is not a registered media type
-->
<?xml-stylesheet type="text/xsl" href="xml-results.xsl"?>

<!--
  This interface is highly experimental and the output *will* change
  (probably even several times) before finished. Do *not* rely on it!
  See http://validator.w3.org/docs/users.html#api-warning
-->

<!DOCTYPE result [
  <!ELEMENT result (meta, warnings?, messages?)>
  <!ATTLIST result
    version CDATA #FIXED '0.9.1'
  >

  <!ELEMENT meta (uri, modified, server, size, encoding, doctype, errors)>
  <!ELEMENT uri      (#PCDATA)>
  <!ELEMENT modified (#PCDATA)>
  <!ELEMENT server   (#PCDATA)>
  <!ELEMENT size     (#PCDATA)>
  <!ELEMENT encoding (#PCDATA)>
  <!ELEMENT doctype  (#PCDATA)>
  <!ELEMENT errors   (#PCDATA)>

  <!ELEMENT warnings (warning)+>
  <!ELEMENT warning  (#PCDATA)>

  <!ELEMENT messages (msg)*>
  <!ELEMENT msg      (#PCDATA)>
  <!ATTLIST msg
    line   CDATA #IMPLIED
    col    CDATA #IMPLIED
    offset CDATA #IMPLIED
  >
]>

<result>
  <meta>
    <uri><TMPL_VAR NAME="file_uri" ESCAPE="HTML"></uri>
    <modified><TMPL_VAR NAME="file_modified" ESCAPE="HTML"></modified>
    <server><TMPL_VAR NAME="file_server" ESCAPE="HTML"></server>
    <size><TMPL_VAR NAME="file_size" ESCAPE="HTML"></size>
    <encoding><TMPL_VAR NAME="file_charset" ESCAPE="HTML"></encoding>
    <doctype><TMPL_VAR NAME="file_doctype" ESCAPE="HTML"></doctype>
    <errors><TMPL_VAR NAME="number_of_errors" ESCAPE="HTML"></errors>
  </meta>

  <warnings>
<TMPL_LOOP NAME="file_warnings">
    <warning><TMPL_VAR NAME="Message" ESCAPE="HTML"></warning>
</TMPL_LOOP>
  </warnings>

  <messages>
<TMPL_LOOP NAME="file_errors">
    <msg line="<TMPL_VAR NAME="line" ESCAPE="HTML">"
         col="<TMPL_VAR NAME="char" ESCAPE="HTML">"
    ><TMPL_VAR NAME="msg" ESCAPE="HTML"></msg>
</TMPL_LOOP>
  </messages>

</result>
Received on Saturday, 10 September 2005 09:00:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:02:14 UTC