- From: Francois Daoust <fd@w3.org>
- Date: Thu, 13 Jan 2011 22:20:06 +0100
- To: james@mobilewebexpert.co.uk
- CC: public-mobileok-checker@w3.org
On 01/11/2011 07:03 PM, james@mobilewebexpert.co.uk wrote: > Thanks Francois, > > Yes, you are right. I think I had jumped the gun a bit: I was assuming it had bombed out, but in actual fact it took 195 seconds to complete (for http://www.chaletdulys.it/)... Is 195 seconds normal?! Well, that's long. What usually takes a long time is resources retrieval, since the mobileOK Checker needs to retrieve: - the resource under test - the style sheets referenced by the resource - the images embedded in the resource and in the stylesheets - the resources linked from the main resource. Still, except when there's a connection problem with the resource to test, this should not take more than 30 seconds. > I've found it very hard to come across any current code snippets - could you share any with me or point me in the right direction. I'm just looking to perform a mobileOK test on a url, and extract data from the results to display onscreen. I'm afraid I don't have much to offer. You may want to have a look at how the W3C mobileOK Checker wraps around the mobileOK Checker library. The code is available under: http://dev.w3.org/cvsweb/2009/mobileok-servlet See in particular the "run" method in: http://dev.w3.org/cvsweb/2009/mobileok-servlet/src/org/w3c/mwi/mobileok/basic/servlet/TesterWrapper.java ... and how the results get converted to a visual report in method: private void sendResponse(HttpServletResponse response, TesterWrapper testerWrapper, String contentType) ... in: http://dev.w3.org/cvsweb/2009/mobileok-servlet/src/org/w3c/mwi/mobileok/basic/servlet/TesterHttpServlet.java The UI makes extensive use of XSLT to extract data from the mobileOK report and display that data on screen. Depending on what you want to do, this may or may not be the right way forward. Francois. > > Thanks for your help. > > Regards, > James > ----- Original Message ----- From: "Francois Daoust" <fd@w3.org> > To: <james@mobilewebexpert.co.uk> > Cc: <public-mobileok-checker@w3.org> > Sent: Tuesday, January 11, 2011 12:44 PM > Subject: Re: SXXP0003: Error reported by XML parser: The element type "a" must be terminated by the matching end-tag "</a>". > > >> Hi James, >> >> On 01/11/2011 02:28 AM, james@mobilewebexpert.co.uk wrote: >>> Hiya, >>> I've just started using the mobileOK Java library. It seems to work for sites that have valid XHTML, but when I try it on, e.g., http://www.chaletdulys.it/, I get this error when I call tester.runTests()... >>> >>> SXXP0003: Error reported by XML parser: The element type "a" must be terminated by the matching end-tag "</a>" >> >> The message is output by the XML parser used to parse the document in the XhtmlContent.parseDOM() function when the mobileOK Checker tries to parse the document as XML. >> >> The XML parser outputs the message and triggers an exception, but that exception should get caught by the above mentioned function in the mobileOK Checker, which then attempts to tidy the document before trying again to parse it as XML. In short, this message is merely a warning output by the XML parser and does not prevent the mobileOK Checker from running out just fine. >> >> >>> I'd like runTests() to function just how the http://validator.w3.org/mobile/ test does - i.e., not bomb out when there is an XHTML error. Does anyone know how I can configure it accordingly? >> >> It should already work as expected and you can ignore the message which just means "I tried to parse the resource under test as XML. It did not work, and I'm falling back to tagsoup parsing". As part of the mobileOK Checker report, you should see a CONTENT_FORMAT_SUPPORT-6 failure message since the document de facto does not validate against the XHTML Basic 1.1 DTD. >> >> There should be a way to disable the output of such warning messages through some configuration setting, although I don't know how on top of my head. >> >> HTH, >> Francois. >> >> >>> Many thanks, >>> James >> > > > -------------------------------------------------------------------------------- > > > > No virus found in this incoming message. > Checked by AVG - www.avg.com > Version: 9.0.872 / Virus Database: 271.1.1/3373 - Release Date: 01/11/11 07:34:00 > >
Received on Thursday, 13 January 2011 21:20:38 UTC