[XSL XHTML]& nbsp;实体问题 [英] [XSL XHTML]   entity problem

查看:64
本文介绍了[XSL XHTML]& nbsp;实体问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在XHTML中,实体代表


一个普通的空间,如 "也显示为普通空间,

但是多个空格如 "被解释为

xhtml页面中的1个空格。

所以有& nbsp;方便的:使用& nbsp;& nbsp;你有两个

空格。因此,使用nbsp实体,您可以创建多个空格(在显示中)。


现在我有一个带有& nbsp;的xml文件实体,

i将它放在一个知道xhtml实体的xsl文件中。

但输出结果如下:


" & nbsp;& nbsp;"


被翻译(正确)到:


"


但现在整个点都是& nbsp; xhtml中的实体消失了!!

如何解决这个问题

In XHTML the entity nbsp stands for  

A normal space like " " is also displayed as an normal space,
but multiple spaces like " " are interpreted as 1 space in the
xhtml page.
So there comes the   in handy: with "  " you have two
spaces. So with the nbsp entity you can create multiple spaces (in the display).

Now i have an xml file with   entities,
i put it in an xsl-file that know xhtml entities.
But the output of this:

"  "

is translated (correctly) to:

" "

But now the whole point of the   entity in xhtml is gone!!
How do you solve this problem

推荐答案

文章< 42 *** ********************@news.wanadoo.nl>,

Tjerk Wolterink< tj *** @ wolterinkwebdesign.com>写道:


& nbsp;定义为对

非破坏空间字符的引用。如果你有办法输入,你可以直接使用该字符,而不是使用

实体或引用,它与普通空间不同

字符,即使看到文件时看起来也一样。
In article <42***********************@news.wanadoo.nl>,
Tjerk Wolterink <tj***@wolterinkwebdesign.com> wrote:

&nbsp; is defined as   which is a reference to the
non-breaking-space character. If you have a way to type it in, you
can perfectly well use that character directly instead of using an
entity or reference, and it is different from an ordinary space
character even though it may look the same when you look at the file.
"& nbsp;& nbsp;"

被翻译(正确)到:

"
"&nbsp;&nbsp;"

is translated (correctly) to:

" "




所以引号之间的空格应该非常好

非破坏空格字符,而不是普通空格,应该工作

就像& nbsp; XHTML中的引用。


- Richard



So those blank spaces between the quotes should be perfectly good
non-breaking-space characters, not ordinary spaces, and should work
just like &nbsp; references in XHTML.

-- Richard


Richard Tobin写道:
Richard Tobin wrote:
在文章< 42***********************@news.wanadoo.nl>,
Tjerk Wolterink< tj *** @ wolterinkwebdesign.com>写道:

& nbsp;被定义为对非破坏空间角色的引用。如果你有办法输入,你可以直接使用该角色,而不是使用
实体或参考,它与普通的空间角色不同,即使它当你查看文件时,它看起来可能一样。

In article <42***********************@news.wanadoo.nl>,
Tjerk Wolterink <tj***@wolterinkwebdesign.com> wrote:

&nbsp; is defined as   which is a reference to the
non-breaking-space character. If you have a way to type it in, you
can perfectly well use that character directly instead of using an
entity or reference, and it is different from an ordinary space
character even though it may look the same when you look at the file.

"& nbsp;& nbsp;"

已被翻译(正确地):

"
"&nbsp;&nbsp;"

is translated (correctly) to:

" "



所以引号之间的空格应该非常好
非破坏空间的字符,而不是普通的空格,并且应该像
一样工作; NBSP; XHTML中的参考资料。

- Richard


So those blank spaces between the quotes should be perfectly good
non-breaking-space characters, not ordinary spaces, and should work
just like &nbsp; references in XHTML.

-- Richard




所以你的意思是 "和 "可以是不同的字符吗?



so you mean that " " and " " can be different characters?


在文章< 42 ********************** @ news。 wanadoo.nl>,

Tjerk Wolterink< tj *** @ wolterinkwebdesign.com>写道:
In article <42**********************@news.wanadoo.nl>,
Tjerk Wolterink <tj***@wolterinkwebdesign.com> wrote:
所以你的意思是 "和 "可以是不同的字符吗?
so you mean that " " and " " can be different characters?




是的,Unicode有几个不同的字符可能看起来像这样。


- Richard



Yes, Unicode has several different characters that may look like that.

-- Richard


这篇关于[XSL XHTML]&amp; nbsp;实体问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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