You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Ryan Schmidt <su...@ryandesign.com> on 2006/06/22 13:31:58 UTC

Re: Hook to validate XHTML (OT)

On Jun 22, 2006, at 14:09, Andy Levy wrote:

> On 6/22/06, emerson cargnin <ec...@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.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Hook to validate XHTML (OT)

Posted by Andy Levy <an...@gmail.com>.
On 6/22/06, Ryan Schmidt <su...@ryandesign.com> wrote:
> On Jun 22, 2006, at 14:09, Andy Levy wrote:
>
> > On 6/22/06, emerson cargnin <ec...@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