Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 79756 invoked from network); 25 Apr 2005 07:35:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 25 Apr 2005 07:35:22 -0000 Received: (qmail 54779 invoked by uid 500); 25 Apr 2005 07:35:45 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 54585 invoked by uid 500); 25 Apr 2005 07:35:43 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 54572 invoked by uid 99); 25 Apr 2005 07:35:43 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from host-130.homsysaston.com (HELO mail.aston.fr) (213.41.104.130) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 25 Apr 2005 00:35:42 -0700 Received: from asmail3.aston.fr ([IP=10.3.5.60]) by eSafe SMTP Relay 1114008856; Mon Apr 25 09:40:10 2005 Received: by ASMAIL3 with Internet Mail Service (5.5.2653.19) id <22LPJV1J>; Mon, 25 Apr 2005 09:36:35 +0200 Message-ID: From: COGOLUEGNES Arnaud To: 'JMeter Users List' Subject: RE: validating HTML with JMeter Date: Mon, 25 Apr 2005 09:36:34 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-ESAFE-STATUS: Mail clean X-ESAFE-DETAILS: Clean X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N I kept on trying with the DTD validation, but I'm quite a XML newbie. One drawback of DTD validation is that Java XML API are really strict. If a document is not well formed, the validation can't be done as the parser stops. That's why I was looking for specific HTML library. The best would= be to have results like those from the W3C validator (tag not closed, DTD violation but also hints), but I think I should stop dreaming. So far, I didn't try with local copies of DTD, as the XML parser is able = to get the DTD from the internet. But it's a good idea to have local copies = as I noticed long delay for validation, think it was coming from the DTD retrieval. I'll keep on working on this if my job allows me to, perhaps my first contribution to JMeter :-) Cheers, Arno -----Message d'origine----- De : sebb [mailto:sebbaz@gmail.com] Envoy=E9 : samedi 23 avril 2005 12:15 =C0 : JMeter Users List Objet : Re: validating HTML with JMeter Why not just enhance XML Assertion to add DTD validation as well? Or maybe XPathAssertion.=20 There does not yet seem to be an XML Schema for XHTML, otherwise that could presumably be used as it is. Seems unnecessary to have yet another Assertion. In any case, presumably one would need local copies of the relevant DTD to allow this to work when offline. Or have I misunderstood this completely? S. On 4/22/05, Dave Maung wrote: > You need to create your own DTD Assertion and extend the functionality = to create XHTML Assertion. you need to point to the following xhtml1-strict.= dtd then xhtml will work as standard way. I have never done it but I am sure = it will work. >=20 > http://www.w3.org/TR/2002/REC-xhtml1-20020801/ >=20 > > PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> >=20 > A.1.1. XHTML-1.0-Strict > The file DTD/xhtml1-strict.dtd is a normative part of this specificatio= n. The annotated contents of this file are available in this separate sectio= n for completeness. > A.1.2. XHTML-1.0-Transitional > The file DTD/xhtml1-transitional.dtd is a normative part of this specification. The annotated contents of this file are available in this separate section for completeness. > A.1.3. XHTML-1.0-Frameset > The file DTD/xhtml1-frameset.dtd is a normative part of this specification. The annotated contents of this file are available in this separate section for completeness. >=20 > Dave >=20 >=20 > Peter Lin wrote: > I'm not aware of a XHTML validation library. Many of the libraries out > there like HtmlParser, JTidy are built to fix bad html and make it > XHTML compliant. I suppose one option would be to strip out the > javascript and then run it through DTD validation. >=20 > not sure how that would work, but it's an idea. >=20 > peter >=20 > On 4/22/05, COGOLUEGNES Arnaud wrote: > > thanks for quick answers. > > > > I downloaded 2.0.3 and tried the XML assertion. If I may give some critics: > > - it's an assertion, so it must be plugged to each request. I was mor= e > > thinking about a listener, as it can be easily added/removed from the test > > plan (JMeter's first goal is load testing, so tests could be altered = by the > > HTML validation) > > - it's using JTidy. I don't know much about this parser but it didn't > > detect none closed tag and looks pretty old. Tell me if I'm wrong. > > > > I began working on a listener with DTD validation (with JDK default X= ML > > libraries, that is Xerces I think). It's working quite well (thanks t= o > > JMeter extensibility ;-) ) but the DTD validation doesn't really suit= to > > HTML validation (because of JavaScript for example). Does anyone know= a good > > Java (X)HTML validator? > > > > Thanks. > > > > Arno > > > > PS: tell me if this thread should continue on the developper list. > > > > >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org > For additional commands, e-mail: jmeter-user-help@jakarta.apache.org >=20 > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org *** We scanned this email for malicious content *** *** IMPORTANT: Do not open attachments from unrecognized senders *** *** MailSystem ASTON *** --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org