- From: Thomas Gambet <tgambet@w3.org>
- Date: Tue, 18 May 2010 11:04:52 +0200
- To: Dan Connolly <connolly@w3.org>
- CC: Ted Guild <ted@w3.org>, public-qa-dev@w3.org
Le 17/05/2010 22:53, Dan Connolly a écrit :
> While you're at it, how about avoiding _here_ links?
> http://www.w3.org/QA/Tips/noClickHere
>
>
Ok.
>
> I deployed it on appspot for now:
>
> http://css-val.appspot.com/cssval?uri=http%
> 3a//www.w3.org/People/Berners-Lee/general.css
>
> But I get:
> "Test Validator" returned an invalid response."
>
> Help?
>
> I'm attaching this "invalid" response.
>
Your response is indeed invalid. As explained on the second example [1],
a message is composed of 0+ context elements, a title element, and an
optional description element. So your code should look like this:
val (status, msg) = css.parseAll(css.stylesheet, content) match {
case css.Success(_, _) =>
("passed",
<message type="info">
<title>CSS syntax test passed.</title>
</message>)
case css.Failure(errmsg, next) =>
("failed",
<message type="error"> // Should it be a warning ?
<context line="{next.pos.line}"
column="{next.pos.column}">{next.pos.longString}</context> // I assumed
next.pos.longString is the context
<title>{errmsg}</title>
</message>)
case css.Error(errmsg, next) =>
("failed",
<message type="error">
<context>{next.pos.longString}</context>
<title>{errmsg}</title>
</message>)
}
> p.s. Unicorn complained that this is an invalid URI:
>
> http://css-val.appspot.com/cssval?uri=http://www.w3.org/People/Berners-Lee/general.css
>
> It seems happier with the : encoded as %3a.
> But browsers don't seem to do that during form submission,
> so it's a bit of a pain to make up URIs like that from
> forms such as
> http://css-val.appspot.com/index.html
>
>
>
You're right, I will correct this.
Thomas.
[1]
http://qa-dev.w3.org/unicorn/check?ucn_uri=qa-dev.w3.org/unicorn/tutorial/test_2.xml&ucn_task=test
<http://qa-dev.w3.org/unicorn/check?ucn_uri=qa-dev.w3.org/unicorn/tutorial/test_2.xml&ucn_task=test>
Received on Tuesday, 18 May 2010 09:05:02 UTC