Yahoo!WidgetEngineReference-[Strict Mode]

Strict Mode

In version 2.1 and later, you can put the XML parser into a 'strict' mode. This means it enforces the rules of XML in ways the parser did not in the past. In fact, it was much too lenient in many ways. To enable this, you can just add the following line to the top of your XML file:
バージョン2.1以降では、XMLパーザーを"Strict"(厳密な)モードで動作させることができる。このモードで動作させることにより、パーザーがXMLの解析ルールに厳密に従うよう強制することができる。実際今まで、パーザーは期待したほど厳密にXMLの解析ルールに従ってはいなかった。Strictモードで動作させるためには、XMLファイルの1行目に

<?konfabulator xml-strict="true"?>

と記述すれば良い。

In strict mode, the following things are enforced:
Strictモードでは、以下の5つの点が強制されるようになる。

1) All attribute values must be put into quotes.
1) すべての属性値は、クォートで囲まれなければならない。

2) No stray "&" characters are allowed in a normal text section (i.e.use &amp;amp;).
2) 通常のテキストセクション内に単独で"&"が現れてはならない。(&amp;を用いる必要がある)

3) Entities (things that start with "&") are evaluated inside attribute values.
3) エンティティ("&"ではじまる文字列)は、属性値の中でも評価される。

4) No double dash ("--") allowed inside a comment. For this reason, it's best to put code
into CDATA blocks.
4) コメント内で、"--"が現れてはならない。この制約により、JavaScriptコードはCDATAブロック内に書くのがベストとなる。

5) If an external file is included, we do not replace entities such as < in that file.
5) 外部ファイルがIncludeされている場合、そのファイル内の&lt;のようなエンティティを置き換えない。

CDATA blocks are available in version 2.1 or later.
CDATAブロックは、バージョン2.1以降でのみ使用可能だ。

コメント