使用丹麦字符验证XHTML [英] Validation of XHTML with danish characters

查看:83
本文介绍了使用丹麦字符验证XHTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在验证包含丹麦语

字符的简单XHTML时遇到问题。试图验证下面的XHTML片段会给出下面提到的错误

。如果我删除第一行(XML部分)文件

验证正常。有没有人知道如何解决这个问题没有

将字符更改为#xxx;或者& oslash;我已经和UTF-8一起玩了。

******************************** ******************

<?xml version =" 1.0" encoding =" iso-8859-1"?>

<!DOCTYPE html PUBLIC" - // W3C // DTD XHTML 1.0 Transitional // EN"

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

< html xmlns =" http://www.w3。组织/ 1999 / XHTML" XML:朗= QUOT; DA" lang =" da">

< head>

< meta http-equiv =" Content-Type"含量=" text / html的;字符集= ISO-8859-1" />

< title>文件标题< / title>

< / head>


< body>

< p>这是丹麦文件的丹麦文件? ?和?< / p>

< / body>


< / html>


错误:

"抱歉,我无法验证此文档,因为在第11行它

包含一个或多个字节,我无法将其解释为us-ascii(在其他

字,找到的字节在指定字符中无效值

编码)。请检查文件的内容和字符

编码指示。

I have a problem validating a simple piece of XHTML containing danish
characters. Trying to validate the following piece of XHTML gives the error
mentioned beneath. If I remove the first line (the XML part) the document
validates fine. Does anyone have an idea how to solve this problem without
changing the characters to #xxx; or &oslash; I''ve triede with UTF-8.
**************************************************
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="da" lang="da">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Document title</title>
</head>

<body>
<p>This is a danish document with the Danish letters ? ? and ?</p>
</body>

</html>

The error:
"Sorry, I am unable to validate this document because on line 11 it
contained one or more bytes that I cannot interpret as us-ascii (in other
words, the bytes found are not valid values in the specified Character
Encoding). Please check both the content of the file and the character
encoding indication."

推荐答案

" Nicolai Pedersen" < np@dynamicsystems.dk>写道:
"Nicolai Pedersen" <np@dynamicsystems.dk> wrote:
我在验证包含丹麦语字符的简单XHTML时遇到问题。
I have a problem validating a simple piece of XHTML containing danish
characters.




这是漫长而悲伤的故事,在

解释后你会感到困惑。简短的建议很简单:停止使用XHTML;

升级到HTML 4.01。毕竟,这只是一个语法上的问题,但是玩XHTML规则会让你头疼

如果你不熟悉它们(和也许即使你这样做了。


-

Yucca, http://www.cs.tut.fi/~jkorpela/

有关网页制作的网页: http://www.cs.tut.fi/~jkorpela/www.html



This is long and sad story, and you would be confused after the
explanation. The short advice is simple: stop playing with XHTML;
upgrade to HTML 4.01. After all, it''s just a matter of syntactic
trivialities, but playing by XHTML rules gives you a headache
if you don''t know them well (and maybe even if you do).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


我正在从4.01升级到XHTML。不是为了它的乐趣 - 但是

因为我真的需要这样做。


Jukka K. Korpela < JK ****** @ cs.tut.fi>在消息中写道

news:Xn ***************************** @ 193.229.0.31。 ..
I''m currently upgrading from 4.01 to XHTML. Not for the fun of it - but
because I really need to do it.

"Jukka K. Korpela" <jk******@cs.tut.fi> wrote in message
news:Xn*****************************@193.229.0.31. ..
" Nicolai Pedersen" < np@dynamicsystems.dk>写道:
"Nicolai Pedersen" <np@dynamicsystems.dk> wrote:
我在验证包含丹麦语字符的简单XHTML时遇到了问题。
I have a problem validating a simple piece of XHTML containing danish
characters.



这是漫长而悲伤的故事,
解释后你会感到困惑。简短的建议很简单:停止使用XHTML;
升级到HTML 4.01。毕竟,这仅仅是语法上的琐碎问题,但是如果你不了解它们(也许即使你这样做),那么使用XHTML规则会让你头疼。
-
Yucca, http:/ /www.cs.tut.fi/~jkorpela/
有关网页制作的网页: http://www.cs.tut.fi/~jkorpela/www.html



2003年10月27日星期一12:13:33 +0100,Nicolai Pedersen

< np@dynamicsystems.dk>写道:
On Mon, 27 Oct 2003 12:13:33 +0100, "Nicolai Pedersen"
<np@dynamicsystems.dk> wrote:
我目前正在从4.01升级到XHTML。不是为了它的乐趣 - 但是
因为我真的需要这样做。
I''m currently upgrading from 4.01 to XHTML. Not for the fun of it - but
because I really need to do it.




为什么?


吉姆。

-

comp.lang.javascript常见问题 - http://jibbering.com/faq/



Why?

Jim.
--
comp.lang.javascript FAQ - http://jibbering.com/faq/


这篇关于使用丹麦字符验证XHTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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