Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16303
| From | Gelonida N <gelonida@gmail.com> |
|---|---|
| Subject | Re: lxml precaching DTD for document verification. |
| Date | 2011-11-28 01:32 +0100 |
| References | <mailman.3078.1322420265.27778.python-list@python.org> <roy-6F0FD0.15291227112011@news.panix.com> <jauabo$sbr$1@reader1.panix.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3081.1322440368.27778.python-list@python.org> (permalink) |
On 11/27/2011 10:33 PM, John Gordon wrote: > In <roy-6F0FD0.15291227112011@news.panix.com> Roy Smith <roy@panix.com> writes: > >> In article <mailman.3078.1322420265.27778.python-list@python.org>, >> Gelonida N <gelonida@gmail.com> wrote: >> >>> I'd like to verify some (x)html / / html5 / xml documents from a server. > >> I'm sure you could roll your own validator with lxml and some DTDs, but >> you would probably save yourself a huge amount of effort by just using >> the validator the W3C provides (http://validator.w3.org/). This validator requires that I post the code to some host. The contents that I'd like to verify is intranet contents, which I am not allowed to post to an external site. > > With regards to XML, he may mean that he wants to validate that the > document conforms to a specific format, not just that it is generally > valid XML. I don't think the w3 validator will do that. > Basically I want to integrate this into a django unit test. I noticed, that some of of the templates generate documents with mismatching DTD headers / contents. All of the HTML code is parsable as xml (if it isn't it's a bug) There are also some custom XML files, which have their specific DTDs So I thought about validating some of the generated html with lxml. the django test environment allows to run test clients, which are supposedly much faster than a real http client.
Back to comp.lang.python | Previous | Next — Previous in thread | Find similar | Unroll thread
lxml precaching DTD for document verification. Gelonida N <gelonida@gmail.com> - 2011-11-27 19:57 +0100
Re: lxml precaching DTD for document verification. Roy Smith <roy@panix.com> - 2011-11-27 15:29 -0500
Re: lxml precaching DTD for document verification. John Gordon <gordon@panix.com> - 2011-11-27 21:33 +0000
Re: lxml precaching DTD for document verification. Gelonida N <gelonida@gmail.com> - 2011-11-28 01:32 +0100
csiph-web