HTML5:关于评论的 HTML VS XHTML 规范问题

发布于 2024-09-03 18:05:24 字数 574 浏览 6 评论 0原文

在 HTML5 的 W3C 工作草案中,有一行我觉得令人困惑:

http://www.w3.org/TR/html5/introduction.html#html-vs-xhtml

包含字符串“-->”的注释 可以在 DOM 中表示,但不能 在 HTML 语法或 XML 中。

我可以用两种不同的方式解释这一点:

  • 包含字符串“-->”的注释可以用 XML 和 DOM 表示,但不能用 HTML 语法表示

  • 包含字符串“-->”的注释可以在 DOM 中表示,但不能用 HTML 语法或 XML 表示。

我真的发现原来的表述非常令人困惑。它是什么意思?它是正确的英语吗?

如果我想指出我发现这种措辞非常令人困惑,因此其他非英语母语人士很可能也会发现这种表述非常令人困惑,我应该联系谁?

In the W3C working draft for HTML5 here's a line I find confusing:

http://www.w3.org/TR/html5/introduction.html#html-vs-xhtml

Comments that contain the string "-->"
can be represented in the DOM but not
in the HTML syntax or in XML.

I can interpret this in two different ways:

  • Comments that contain the string "-->" can be represented in XML and in the DOM but not in the HTML syntax

  • Comments that contain the string"-->" can be represented in the DOM but neither in the HTML syntax nor in XML.

I really find the original formulation highly confusing. Which one does it mean and is it even correct english?

Who should I contact if I want to point out that I find such a wording highly confusing and that hence there's a high probability that other non-native english speaker would find this kind of formulation highly confusing too?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

小帐篷 2024-09-10 18:05:24

我认为这意味着:

  • DOM:是
  • HTML:否
  • XML:否

作为一个以英语为母语的人(但不是一个习惯于寻找歧义的律师),我不认为它有歧义(我想我知道它的意思)。

加上一个额外的逗号或者一个“nor”会更清楚:

...可以在 DOM 中表示,但不能用 HTML 语法或 XML 表示。

I think that it means:

  • DOM: yes
  • HTML: no
  • XML: no

As a native English speaker (but not a lawyer who is used to looking for ambiguity) I don't find it ambiguous (I think I know what it means).

It would be clearer with an extra comma and maybe a 'nor':

... can be represented in the DOM, but not in the HTML syntax nor in XML.

被翻牌 2024-09-10 18:05:24

你的第二种解释是正确的。您可以通过电子邮件将您的评论发送至 W3C HTML 工作组:[电子邮件保护] ,他们将从那里拿走它。他们过去让我感到困惑,并且后来重新措辞了部分内容。

Your second interpretation is correct. You can email your comment to the W3C HTML Working Group at [email protected], they'll take it from there. They've confused me in the past and since reworded sections.

橙幽之幻 2024-09-10 18:05:24

意思是包含“-->”的注释可以在 DOM 中创建(通过例如 Javascript),但不能在 XML 或 HTML 中创建。

这是由于 DOM 不必处理的解析问题。

编辑:是的,这是“正确的”英语,没有歧义,至少在我看来是这样。如果这意味着您的第一个解释,它可能会被写为“包含字符串 '-->' 的注释”可以用 DOM 和 XML 表示,但不能用 HTML 语法表示。”

It means that a comment containing "-->" can be created in the DOM (via e.g. Javascript), but that it cannot be created in either XML or HTML.

This is due to parsing issues that the DOM does not have to deal with.

Edit: And yes, it's "correct" English, with no ambiguity, at least in my opinion. Had it meant your first interpretation, it would likely have been written as "Comments that contain the string '-->' can be represented in the DOM and in XML, but not in the HTML syntax."

暗藏城府 2024-09-10 18:05:24

您可以在此处联系 W3C:

http://www.w3.org/Consortium/contact

You can contact the W3C here:

http://www.w3.org/Consortium/contact

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文