[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Hook to validate XHTML (OT)

From: Andy Levy <andy.levy_at_gmail.com>
Date: 2006-06-22 15:36:27 CEST

On 6/22/06, Ryan Schmidt <subversion-2006q2@ryandesign.com> wrote:
> On Jun 22, 2006, at 14:09, Andy Levy wrote:
> > On 6/22/06, emerson cargnin <echofloripa.yell@gmail.com> wrote:
> >> Does anyone know of any hook to validate if a JSP is XHTML compliant?
> >
> > Wouldn't that depend upon the functions performed by the JSP and any
> > data they may output also generating XHTML? The JSP file itself won't
> > ever be valid XHTML (I don't think), and the final page that the JSP
> > produces may or may not be valid XHTML, depending on many factors.
> If ASP is anything like PHP, which I believe it is, then you can
> write your code either way. You could write:
> <?php
> echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ';
> echo '"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">' .
> "\n";
> echo '<html><head><title></title></head><body>' . "\n";
> echo rand() . "\n";
> echo '</body></html>' . "\n";
> ?>
> which, while it generates XHTML-compliant code, is not itself XHTML-
> compliant. But you could also write the equivalent:
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html><head><title></title></head><body>
> <script language="php">
> echo rand() . "\n";
> </script>
> </body></html>
> which might, with a little tweaking, conceivably pass as XHTML-
> compliant.

The language in question is JSP, not ASP, but I see your point.

However, even if you do this, and your PHP/JSP/ASP comes through as
"valid", the actual output generated by the code and sent to the
browser isn't assured of being valid, unless you're doing something
like a CMS with end to end validation of everything pumped through it
at the time it's input..

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 22 15:41:46 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.