Welcome to WebHeadStart.org

Web Technologies

Sponsored By

WebHeadStart.org is currently in beta.
Please pardon our appearance as we work to provide you with the most comprehensive reference on today's web technologies.

Interested in advertising on WebHeadStart? Become an advertising partner today!

[WWW-HTML Mailing List Archive Home] [Messages By Thread] [Messages By Date]

Re: content type for XHTML fragments

From: Shane McCarron <shane@aptest.com>
Date: Mon, 16 Jan 2006 10:07:51 -0600
Message-ID: <43CBC4D7.4060604@aptest.com>
To: Garret Wilson <garret@globalmentor.com>
CC: Spartanicus <spartanicus.3@ntlworld.ie>, www-html@w3.org

If it were me....  I would include a DOCTYPE and ensure that the 
fragment was actually legal xml (the example below is not).  Somehting like:


<!DOCTYPE p
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd ">
<p>This is <em>really</em> cool</p>

And use a content type of application/xml-external-parsed-entity.  Then my parser can look at the DOCTYPE 
if it chooses, but no one will think that it is actually XHTML.  



Garret Wilson wrote:

> Thanks, but that's not a full solution---how does the application (the 
> Wiki, the newsfeed---whatever) know whether to process and interpret 
> tags? If it were really plain text, the "this is <em>really</em> cool" 
> could be a plain text example of how to use to use markup, rather than 
> actual use of markup.
>
> Garret
>
> Spartanicus wrote:
>
>>Garret Wilson <garret@globalmentor.com> wrote:
>>
>>  
>>
>>>A common use nowadays, especially with wikis and newsfeeds, is to store 
>>>XHTML fragments (such as "this is <em>really</em> cool") to be later 
>>>integrated into a larger XHTML document.
>>>
>>>What content type should we use for XHTML fragments?
>>>    
>>>
>>
>>As long as the application that processes the fragments handles it
>>properly it shouldn't matter, as these fragments should never be
>>accessible in other ways.
>>
>>I'd use text/plain
>>
>>  
>>

-- 
Shane P. McCarron                          Phone: +1 763 786-8160 x120
Managing Director                            Fax: +1 763 786-8180
ApTest Minnesota                            Inet: shane@aptest.com
Received on Monday, 16 January 2006 16:08:20 GMT
Valid XHTML 1.0! Valid CSS! Site Map | Privacy Policy | Terms of Use | WebHeadStart.org © 2005 All Rights Reserved.