CHTML简介

原文地址:http://code.google.com/p/chtml/
CHTML 是一种超文本标记语言. 它顺应汉语编程的历史潮流, 允许中国的互联网开发者发布信息到万维网上使用中文的字符作为标签. 比如
五大三<粗>粗</粗> 和 东倒西<歪>歪</歪>
详细介绍
CHTML 是国际互联网组织 W3C 超文本标记语言 4.0 的一个实现. 是互联网普遍协议与中国国情相结合的产物. 和汉语编程一样, 原来使用英文的标签现在可以全部使用中文, 比如 <粗> </歪>. 除此之外, 还额外扩展了两个标签, 即 <反功夫网> 和 <勾>. 除此以外, 该协议和现有 HTML 标准完全兼容. 目前 CHTML 的版本是零点零一.
<勾> 是和中国国情结合的产物. 因为中国的门户网站以及某组织投票常常都是一个答案, 所以此标签可用于及时丢弃用户投票, 节省服务器资源, 彰显社会主义优越性.
<反功夫网> 是著名的 CAPTCHA 系统的浏览器实现. 所以在此标签中的元素都变成 CAPTCHA 从而人可以顺利阅读, 而机器不能. 考虑到功夫网大部分由机器构成, 此标签可以透过功夫网. 目前的实现有两个, 一个是由 CMU 构建的 reCAPTCHA 文字自动转系统, 另一种是由中国网民发起的竖起来的文字系统. 此标签对人和搜索引擎都无害, 透明穿过功夫网. 据透露, Google 机器人很快将正式支持这个标签.
其他标签的含义也按照中文互联网的特色做了相应的定义. 如, <form> 变成 <带三个表>, <span> 变成 <俯卧撑>,更多的细节可以参见这个 中文文档.
已知实现
我们正在工作在一个火狐狸的实现, 而且已经要完成了基本上, 并且可以让火狐狸直接呈现 CHTML 页面. 对不起微软的用户, 因为我们没有得到任何英特网探险家的超文本解析库的授权, 按照新千禧年数字法案, 我们的工程师不能通过反向工程加入对 CHTML 的支持. 我们感到很抱歉为此.
竖排文字是 <反功夫网> 标签已知的一个实现, 在新版本 CHTML 的协议 中, 你可以使用 <反功夫网 方法="竖排"> 内容 </反功夫网> 飞跃功夫网. 其他的反功夫网方法正在紧张开发中.
在我们的代码库里面, 已经有一个 蟒蛇编程语言 的分析器, 验证器的实现和一个火狐狸的超文本解析器的实现.
为了方便我们的开发人员,代码库里面还有一个面向 Textmate 的 Bundle. 您使用Textmate 实作编写 CHTML 非常节省能量.
问题和答案
因为这是一个中国人的项目, 他有中文名字么?
是的, 他的名字在中文叫 "中文版如何做爱" 他是 CHTML 的全写: Chinese How To Make Love.
我怎么告诉我的浏览器我正在使用的是CHTML呢?
谢谢你精彩的问题, 这很简单. 就加
`<!DOCTYPE html PUBLIC "-//W3C//DTD CHTML 1.0 Strict//EN" "http://code.google.com/p/chtml/DTD/chtml.dtd">`
到第一行你的HTML代码.
你能给我一些例子关于这个激动人心的项目么?
是的, 你可以检查我们指定的 支持元素的列表.
我们也提供了一些 简单的例子 给初学者.
你可能想知道我们项目的最后效果, 这里是截屏幕
我有话要说.
请使用我们的邮件列表 http://groups.google.com/group/chtml.
我发现你们的工作有错误.
我们的工作还处于初级阶段, 可能还存在这样或那样的问题. 如果你需要上访请到 Issues 里面填写报告, 我们一定会予以高度重视.
等一下, 有些事情不对. 它是个玩笑嘛
不是的, 他/她不是. 他是一个有趣的项目而已,您可以检查我们的代码库跟踪我们开发进度. 我们欢迎开放源代码软件爱好者一起贡献代码.
鸣谢
谷歌翻译 提供了很多便利为我们的工作, 我们感谢他/她!

--------------------------------------------------------------------------------

About
CHTML is a brand new markup language that allows Chinese developers to publish contents on World Wide Web by using tags in Chinese characters, such as <粗>bold</粗> and <歪>italic</歪>
WTF is CHTML exactly?
CHTML is an implementation of W3C's HTML 4.0 except that all tags are now written in Chinese such as <你好> </再见>. It has extension tags that support the anti-censorship such as <antigfw> and <gou>. It's complied with XML and other known W3C language specifications except two tags: <gou> and <antigfw>
# <gou> is used in the situation that there is no democratic election in China. Therefore, the implementation of <input type="checkbox" /> in any HTML specification is illegal in China. <gou> (in Chinese 勾) is designed and aims to be used as an alternative such that you can vote. (you thought you can vote but you can not, this tag will discard the vote under any circumstance).
# <antigfw> is actually an implementation of the famous CAPTCHA system. All the words embedded are converted into CAPTCHA so that human can read it smoothly while the censorship system (we guess it is actually a computer) can't detect that. (Unless they can break the CAPTCHA system).
# Other tags are redefined in the context of Chinese Internet. For instance, <form> now becomes <带三个表> and <span> becomes <俯卧撑>
Known implementations:
Currently we are working on an implementation on Firefox. Sorry M$ user, since we don't have the library of IE and can't recompile the HTML parser library, we currently don't support IE.
You can checkout the python CHTML parser as well as a library extension of Firefox in the SVN repository.
Q&A
Since it's a Chinese project, does it have a Chinese name?
Yes, it's Chinese name is 中文版如何做爱. It means How To Make Love in Chinese.
How can I tell my browser I am using CHTML instead of HTML?
Thank you for the excellent question. It's very easy. Just add
`<!DOCTYPE html PUBLIC "-//W3C//DTD CHTML 1.0 Strict//EN" "http://code.google.com/p/chtml/DTD/chtml.dtd">`
to the first line of your HTML.
Can you show me some examples about this fantastic project?
Yes, you can check the supported Chinese tags .
We also provide a example page for beginners in CHTML.
You might wonder to know the actual result of our project, here are some screenshots
Wait, something is wrong. Is this a joke?
No, it's not. Please check out our code to figure out how to contribute.



[本日志由 子曰 于 2008-07-07 09:53 AM 编辑]
文章来自: 本站原创
引用通告: 查看所有引用 | 我要引用此文章
Tags:
评论: 0 | 引用: 0 | 查看次数: -
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.