I think the best reason for generating XHTML (at this point) is that
adding an XHTML doctype at the top of a page makes IE and Mozilla "snap"
to standards-compliant mode.  Rather than writing tweeks for each
browser - the same code works in both.  This is a real lifesaver when
doing CSS positioning and DOM-based Javascript in pages.  It's also
really nice to be able to validate (http://validator.w3.org) code.  

An even better argument is that PDAs and Cell Phones are starting to
support XHTML.  If you have an XHTML document - especially a Strict one
- you can run it through an XSL stylesheet, and have a whole new
website.  

Sounds good to me!

Matt



> -----Original Message-----
> From: Craig R. McClanahan [mailto:[EMAIL PROTECTED]] 
> Sent: Thursday, January 16, 2003 12:05 AM
> To: Struts Developers List
> Subject: Re: xhtml javascript hiding methods
> 
> 
> 
> 
> On Wed, 15 Jan 2003, David Graham wrote:
> 
> > Date: Wed, 15 Jan 2003 23:35:27 -0700
> > From: David Graham <[EMAIL PROTECTED]>
> > Reply-To: Struts Developers List <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: xhtml javascript hiding methods
> >
> > Well, here are the choices as I understand them:
> >
> > 1.  Use CDATA to hide the javascript and make it completely 
> useless in 
> > current browsers.
> >
> > 2.  Use a comment to hide the javascript which allows 
> current browsers 
> > to work and xml parsers.
> >
> > The xhtml spec does suggest using CDATA but I don't see a 
> reason the 
> > comment method won't work.
> >
> 
> If you are using XML-based technologies like XSLT to 
> transform things to create your output pages, the "commented 
> out" text inside a <script> element is going to get dropped 
> on the floor.
> 
> What I also don't understand is why anybody is worried about 
> generating XHTML markup for the current generation of popular 
> browsers, none of which implement it correctly ... but that's 
> a different issue.
> 
> > Dave
> 
> Craig
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-dev-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to