[WEB4LIB] Re: coding for both HTML 4.01 and xhtml transitional

Thomas Dowling tdowling at ohiolink.edu
Mon Sep 9 16:36:29 EDT 2002


At 04:15 PM 9/9/2002, Kevin W. Bishop wrote:
>At 08:33 AM 9/8/2002 -0700, JQ Johnson wrote:
> >I have a project for which I am attempting to generate code that
> >validates both as HTML 4.01 Transitional and as xhtml 1.0 Transitional.
> >I'm having difficulty, and wondered if anyone else has suggestions.
>
>In my understanding, it is not possible to define your document as two
>different types.  A DTD can only claim to be of one type or
>another.  Otherwise, how will the browser choose which set of rules its
>rendering engine will use?
>


As I understood the question, JQ's site has some HTML 4 and some XHTML, and 
both flavors of pages want to use SSI to include the same snippets of 
navigation tabs, stylesheet references, etc.  Our solution here was to 
create two sets of include files - a *.htinc set with "<link...>" and a 
*.xinc set with *<link.../>".

The trouble with the "<.../>" syntax in HTML is that it triggers some of 
SGML's inscrutable tag minimization options, according to which this is a 
complete paragraph:

   <p /Hi, how's it going?/

Just try finding a browser that will read it, though!  It's this kind of 
mushiness in SGML that lead to XML in the first place.



Thomas Dowling
OhioLINK - Ohio Library and Information Network
tdowling at ohiolink.edu




More information about the Web4lib mailing list