<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>199</bug_id>
          
          <creation_ts>2003-04-19 02:09:06 +0000</creation_ts>
          <short_desc>Validator &quot;API&quot; Needs Sample Code.</short_desc>
          <delta_ts>2007-08-06 06:30:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Validator</product>
          <component>Documentation</component>
          <version>0.6.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc>http://lists.w3.org/Archives/Public/www-validator/2002Dec/0067.html</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>0.8.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Terje Bless">link</reporter>
          <assigned_to name="Terje Bless">link</assigned_to>
          
          
          <qa_contact name="qa-dev tracking">www-validator-cvs</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>448</commentid>
    <comment_count>0</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2003-04-19 02:09:06 +0000</bug_when>
    <thetext>The various &quot;APIs&quot; to the Validator needs sample code to demonstrate how to use
them. SOmething in the vein of the Perl snippet in the URL but for multiple
languages, platforms, and environments.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>498</commentid>
    <comment_count>1</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2003-05-24 07:47:00 +0000</bug_when>
    <thetext>Retargetting 0.7.0 (by which time it may be mooted by SOAP).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2200</commentid>
    <comment_count>2</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2004-09-01 13:03:43 +0000</bug_when>
    <thetext>Retargetting for 1.0; ain&apos;t gonna happen for 0.7 (and neither is SOAP).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12673</commentid>
    <comment_count>3</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-10-31 01:28:28 +0000</bug_when>
    <thetext>I think http://validator.w3.org/docs/api.html covers this. 
So does http://validator.localhost/docs/users.html#Output to some extent.
closing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12689</commentid>
    <comment_count>4</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2006-10-31 08:18:37 +0000</bug_when>
    <thetext>There&apos;s not a single line of code in the API docs referenced. -&gt; Reopening.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12747</commentid>
    <comment_count>5</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2006-11-01 14:47:18 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; There&apos;s not a single line of code in the API docs referenced. 

Then I disagree code samples are necessary. I&apos;d rather we encouraged building libraries (see e.g http://www.w3.org/QA/2006/10/validator_api.html on the QA weblog), and link to these libraries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>12765</commentid>
    <comment_count>6</comment_count>
    <who name="Terje Bless">link</who>
    <bug_when>2006-11-01 20:22:22 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Then I disagree code samples are necessary. I&apos;d rather we encouraged building
&gt; libraries []

The relationship between those options is not &quot;either or&quot; but &quot;and&quot;; code samples are a good way to encourage building libraries.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15356</commentid>
    <comment_count>7</comment_count>
    <who name="Brett Bieber">brett.bieber</who>
    <bug_when>2007-06-11 15:51:01 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; There&apos;s not a single line of code in the API docs referenced. -&gt; Reopening.
&gt; 

If code is provided to interact with the API, the W3 would need to maintain their own library to interact with the API. I think this is unnecessary at the moment and we should just link to API libraries which have code samples and documentation. I feel that the W3 has fulfilled enough of an obligation by providing the SOAP output without causing additional coding support.

The other alternative is to make an official API library supported by the W3, but this would add non-core burden on the validator team (there are already libraries which are in the wild and supported externally).

A library which does have documentation and code samples is available at pear.php.net which could be link in the libraries references which may fulfill some of this bug.

Link to library homepage:
http://pear.php.net/package/Services_W3C_HTMLValidator

API and methods available for the library:
http://pear.php.net/package/Services_W3C_HTMLValidator/docs/latest/Services_W3C_HTMLValidator/Services_W3C_HTMLValidator.html

API interaction example:
http://pear.php.net/manual/en/package.webservices.services-w3c-htmlvalidator.examples.php

</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>16062</commentid>
    <comment_count>8</comment_count>
    <who name="Olivier Thereaux">ot</who>
    <bug_when>2007-08-06 06:30:42 +0000</bug_when>
    <thetext>Just added a link to the PEAR library into the API documentation. 

As for whether to give actual code bits to access the API, I have to admit:
* I &apos;ve never see it done (checked a number of APIs like flickr, they all detail their API and give a list of libraries that bind to it)
* I don&apos;t know how to do it without actually writing a library and showing the code, which I believe would be too verbose for the documentation. 

given the above, and although I do understand Terje&apos;s points, I&apos;m closing as WORKSFORME.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>