[#7055] More on VC++ 2005 — Austin Ziegler <halostatue@...>

Okay. I've got Ruby compiling. I'm attempting to get everything in

17 messages 2006/01/05
[#7058] Re: More on VC++ 2005 — nobuyoshi nakada <nobuyoshi.nakada@...> 2006/01/06

Hi,

[#7084] mathn: ugly warnings — hadmut@... (Hadmut Danisch)

Hi,

22 messages 2006/01/10
[#7097] Re: mathn: ugly warnings — Daniel Berger <Daniel.Berger@...> 2006/01/10

Hadmut Danisch wrote:

[#7098] Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/10

Daniel Berger wrote:

[#7118] Re: Design contracts and refactoring (was Re: mathn: ugly warnings) — mathew <meta@...> 2006/01/12

*Dean Wampler *<deanwampler gmail.com> writes:

[#7226] Fwd: Re: Question about massive API changes — "Sean E. Russell" <ser@...>

Hello,

23 messages 2006/01/28
[#7228] Re: Question about massive API changes — Caleb Tennis <caleb@...> 2006/01/28

>

Re: [PATCH] Ruby 1.8.4 RDoc HTML Cleanups and HTML Language Support

From: "H.Yamamoto" <ocean@...2.ccsnet.ne.jp>
Date: 2006-01-13 10:28:15 UTC
List: ruby-core #7134
>> I have reviewed your patch, and have noticed two things.
>> 
>>   1. In your patch, xml:lang is specified in HTML4.01. Is this allowed?
>
>I think most browsers ignore attributes that they don't understand.  So,
>is it correct?  Probably not.  Will it cause problems?  Probably not.
>Does it matter?  Not really; the HTML produced with the patch is
>certainly more valid than the HTML produced without it.

Yes, and most browsers can parse <img ....> without end tag.
Why is this not good? because it's not valid xhtml. On the other hand xml:lang
is using xml namespace, so I think this is not valid html4.

>>        in lib\rdoc\generators\template\html\old_html.rb
>> 
>>        <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
>>        <html lang="%html_lang%" xml:lang="%html_lang%">
>> 
>>   2. If either charset or html_lang is not specified,
>> 
>>        rdoc ..\ruby_1_8\array.c --charset=SHIFT_JIS -o \temp
>> 
>>      I get
>> 
>>        <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-US">
>>        <head>
>>          <title>RDoc Documentation</title>
>>          <meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS" />
>> 
>>      But this is strange. I think
>> 
>>        <html xmlns="http://www.w3.org/1999/xhtml">
>>        <head>
>>          <title>RDoc Documentation</title>
>>          <meta http-equiv="Content-Type" content="text/html; charset=SHIFT_JIS" />
>> 
>>      is more reasonable.
>
>The HTML produced before my patch had 'lang="en"' hard-coded.  From the
>patch itself:
>
>  -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
>  +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="%html_lang%" lang="%html_lang%">
>
>I'm not disagreeing that this behavior isn't strange, just that it was
>worse before (at least now it's configurable).

Yes, but how about this?

Index: lib/rdoc/generators/template/html/one_page_html.rb
===================================================================
RCS file: /src/ruby/lib/rdoc/generators/template/html/one_page_html.rb,v
retrieving revision 1.1.2.2
diff -u -r1.1.2.2 one_page_html.rb
--- lib/rdoc/generators/template/html/one_page_html.rb  24 Mar 2004 17:01:11 -00
00      1.1.2.2
+++ lib/rdoc/generators/template/html/one_page_html.rb  7 Jan 2006 08:38:55 -000
0
@@ -79,7 +79,7 @@

 ONE_PAGE = %{
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<html lang="%html_lang%" xml:lang="%html_lang%">
 <head>
   <title>%title%</title>
   <meta http-equiv="Content-Type" content="text/html; charset=%charset%" />

Anyway, I'm not RDoc maintainer, I cannot decide intruducing new option.
I'll fix invalid xhtml error first based on your patch.

Regards,
Yamamoto


Attachments (1)

patch.zip (2.82 KB, Archive)

In This Thread