问题描述
发布到:alt.html和comp.infosystems。
followup-to:comp.infosystems。
大家好,
我有2个关于验证的问题。
1-什么是基本区别
- 验证,有效性
- 格式良好
- 符合条件的文件
基本上,我认为一个格式良好的文件可能不是有效的,但有效的文件必须是格式良好的。一个有效的文件可能
不符合要求,但一致的文件必须是有效的文件。
至少,这是我的想法。我错了吗?你知道一个
文件解开,很好地区分这3个概念吗?
2-创建输入或选择或复选框时,必须将这些插入到
a< form>元件。现在,如果表单不会将任何数据发送到
服务器,那么我只需将action属性分配给空字符串,例如
这个:
< form action ="">
现在,W3C认为这是严格的HTML 4.01中的有效标记代码。
但HTML Tidy警告这是错误的或可能是错误的。什么是
当表单不向任何
服务器发送任何数据时,最好的办法是什么?那么我应该如何指定action属性以便
符合验证要求?
感谢您的帮助,
$ b $bGérard
-
删除等等给我发电子邮件
发布到:alt.html和comp.infosystems 。
followup-to:comp。 infosystems。
posted to: alt.html and comp.infosystems.www.authoring.html
followup-to: comp.infosystems.www.authoring.html
Hello all,
I have 2 questions about validations.
1- What''s basically the difference between
- validation, validity
- well-formedness
- conformant document
Basically, what I believe is that a well-formed document might not be
valid but a valid document must be well-formed. A valid document might
not be a conformant one but a conformant document must be a valid one.
At least, this is what I think. Am I wrong here? Do you know of a
document that untangles, distinguish well these 3 concepts?
2- When creating inputs or select or checkbox, one must nest these into
a <form> element. Now, if the form is not going to send any data to a
server, then I just assign the action attribute to an empty string like
this:
<form action="">
Now, the W3C considers this as valid markup code in strict HTML 4.01.
But HTML Tidy warns that this is wrong or possibly wrong. What would be
the best thing to do when a form is not going to send any data to any
server? How then should I specify the action attribute in order to
comply with validation requirements?
Thank you for your assistance,
Gérard
--
remove blah to email me
posted to: alt.html and comp.infosystems.www.authoring.html
followup-to: comp.infosystems.www.authoring.html
推荐答案
但为什么要创建一个不需要的表单行动?什么
将被使用?
leo
-
< ;
我描述了安全方法。为了符合验证要求,
只需编写动作="",但在实践中它会更有用于写入动作=&b;哦,这绝对不应该被使用!
(这是有效且语法不正确的。)
I described the safe approach. To comply with validation requirements,
it would suffice to write action="", though in practice it would be more
useful to write action="oh, this is never supposed to be used!".
(It''s valid and syntactically incorrect.)
你可以在你的三个列表中添加一个项目:"正确的HTML" ;.
与其他三个不同,这不是一个定义的术语,并且无法通过机器人检查
,因为它无法明确定义,而且它是'开放给
辩论和意见。
HTML Tidy是一个充其量只能检查良好状态的工具,它
不验证(检查DTD),或检查规范散文中表达的额外
要求。整洁尝试检查
前面提到的正确的HTML。如前所述,使用机器人检查这是不可能的。 Tidy所做的是它使用了一些由它的程序员制定的支票,这些支票可以是有用的,但是因为他们试图这样做不可能的Tidy的支票是
有争议的,有时是完全错误的。
评估HTML的正确性需要一个聪明的人。
正确性因素引起了这个(ciawh)平台的上升和目的,我们在这里讨论这个虚幻的问题。
-
Spartanicus
You could have added an item to your list of three: "correct HTML".
Unlike the other three this is not a defined term, and cannot be checked
by a bot because it cannot be defined unambiguously, and it''s open to
debate and opinion.
HTML Tidy is a tool that at best can check for well formdness, it
doesn''t validate (check against the DTD), or check for the additional
requirements expressed in a spec''s prose. Tidy attempts to check for the
aforementioned "correct HTML". As previously noted it isn''t possible to
check for this with a bot. What Tidy does is it uses a number of checks
that have been drawn up by it''s programmers, these checks can be
helpful, but because they attempt to do the impossible Tidy''s checks are
contentious, and sometimes plain wrong.
Assessing HTML for "correctness" requires an intelligent human being.
The "correctness" factor gives rise and purpose to platforms such as
this (c.i.a.w.h), where we debate this illusive issue.
--
Spartanicus
这篇关于2关于验证的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!