数字字符参考实体...命名 [英] Numerical character reference entities... Nomenclature

查看:265
本文介绍了数字字符参考实体...命名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以前很简单。


  • nbsp 实体

  •   是字符引用(对数字字符值的引用)

  • nbsp is an entity
  •   is, therefore, an entity reference (a reference to an entity)
  •   is a character reference (a reference to a numerical character value)

但是现在,我读了这么多的文件,甚至是官方的文件,你有字符实体,命名字符引用,数字实体,引用实体等。

But these days, I read so many documents, even official ones, where those words are all mangled together; you have character entities, named character references, numerical entities, reference entities, and so on.

那么真的是什么?这些东西真的叫什么名字?

So what is it really? How are these things really called? Who can I trust to have it right these days?

编辑:到目前为止的解决方案是& nbsp;   有以reference结尾的名称(尽管HTML4,HTML5和XML之间的引用之前的内容不同)。

the resolution so far is that   and   have names ending in "reference" (although what's before the "reference" varies between HTML4, HTML5 and XML). If you call them something ending in "entity", you're most likely incorrect.

推荐答案

您是正确的,除了 nbsp 不是实体,而是实体名称。

You are correct except that nbsp is not an entity but an entity name. The entity is the thing that the entity reference refers to, in this case the no-break space character.

实体引用也可以称为实体引用。实体引用指的是实体引用引用的实体引用,在这种情况下是不间断空格字符。 (因为SGML一般允许其他类型的实体引用)。类似地,字符引用可以被称为数字字符引用(以区别于在HTML中从未应用的某些SGML概念)。

The entity reference can also be called named entity reference (since SGML in general allows other types of entity reference, too). Similarly, the character reference can be called numeric character reference (to distinguish it from certain SGML concepts that never applied in HTML).

HTML规范名义上遵守的SGML(ISO 8879)术语,它们是对SGML标准的形式引用,直到并包括HTML 4.01。

This is the SGML (ISO 8879) terminology that HTML specifications nominally adhere to, be their formal references to the SGML standard, up to and including HTML 4.01.

实际上,HTML从来没有实现为基于SGML,尽管SGML的一些功能反映在实现中。)

(Even HTML specifications use SGML terms sloppily, though. And in fact, HTML was never implemented as SGML-based, though some features of SGML are reflected in implementations.)

XHTML基于XML ,这是SGML的简化并且正式定义为独立的。 XML使用术语实体引用字符引用(如SGML),但较长的名称不适用。

XHTML is based on XML, which is a simplification of SGML and formally defined as standalone. XML uses the terms entity reference and character reference, like SGML, but the longer names don’t apply.

HTML5是不同的:设计为独立于SGML和XML。它还引入了自己的术语。

HTML5 is something different: designed to be independent of SGML and XML. It also introduces its own terminology.

这篇关于数字字符参考实体...命名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆