Re: [css] documentation for autotest

Le mercredi 30 août 2006 à 10:34 +0900, olivier Thereaux a écrit :
> 
> On Aug 29, 2006, at 23:26 , Jean-Guilhem Rouel wrote:
> > It's simple because it was the first time I was using the xml parsing
> > API (I don't remember it's name). I used this parser because I didn't
> > want to create an xml schema to use tools like JAXB even if the code
> > would be much simpler after that.
> 
> You mean SAX? I was a little surprised how little your code used it  
> to extract content from the soap output and build the test results.  
> But as I said, it works well already.

Yes, SAX! I had forgotten the name. But after looking at the code, it's
very ugly. SAX is only used to read the xml test files. As we only need
a few information from the SOAP output, a simple equivalent of grep
(indexOf) is used. It works well, but it's not very beautiful :p.

Originally it was a shell-script. When I decided to use xml files as
input I switched to Java, but I kept the grep-like extraction of
information ;)

Oh, and I think the method createValidURL could be replaced by a call to
URLEncoder.encode
(http://java.sun.com/j2se/1.5.0/docs/api/java/net/URLEncoder.html), this
would be more reliable and efficient than the little method I wrote. 

-- 
Jean-Guilhem Rouel                    http://www.w3.org/People/Jean-Gui
W3C Webmaster   MIT/CSAIL             http://www.w3.org/
Voice: +1.617.258.8143                Fax: +1.617.258.5999

Received on Wednesday, 30 August 2006 02:34:30 UTC