durusmail: qp: Re: qpy development ideas
qpy development ideas
2007-10-08
2007-10-09
Re: qpy development ideas
2007-10-10
2007-10-10
2007-10-14
2007-10-15
David K. Hess (2 parts)
2007-10-09
2007-10-09
2007-10-10
2007-10-10
2007-10-10
2007-10-10
2007-10-10
Re: qpy development ideas
David K. Hess
2007-10-15
I've attached a modification of the echo demo to demonstrate this
idea. It would be nice if this was just as doable if not easier with
a new version of qpy. The performance of course is terrible when
validating so you would never do this in production. Also, there is
probably some re-factoring that could/should be done.

You'll need lxml if you intend to run this.

On Oct 14, 2007, at 3:23 AM, mario ruggier wrote:

> Considerations:
> Validation against a schema may only be done on a full document?

The example has one decorator for fragments that just parses the text
and another for pages that validates as an XHTML document.

> Only well-formedness could be checked on each template?

If the method/function generates a page, then a full XHTML document
check can be made by selecting the correct decorator.

> Such checks should be toggle-able, i.e. turned off in deployment.
> Can that easily be done using decorators?

The example decorators check a configuration variable on the Site.

>
>> My motivation for this is that it can be difficult to get an online
>> validator to validate offline and secure websites. This could also be
>> useful when using qp to implement REST web services.
>
> Ah, but it may be easier in that case to just not use XML... ;-)

Well, if you are trying to produce XHTML 1.0 Strict (qp's default
document type), I think you're stuck with XML. :-)

Dave





This email message is for the sole use of the intended recipient(s) and may
contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution is prohibited. If you
are not the intended recipient, please contact the sender by reply email and
delete and destroy all copies of the original message.
reply