psgml 的奇怪问题

这一阵编辑 XML 文件比较多,当然要用 [PSGML Mode],再配合上 [DTD],可以很方便地添加相应的标记,比如 DTD 里面会规定一个标记里可以嵌套哪些子标记,有哪些属性等等,通过在相应的位置按 C-c C-e 或者 C-c + 就可以添加子标记或者属性。当然要在 XML 文档里面加上 DTD 的声明,并按 C-c C-p 来解析 DTD 以后才可以。

编辑的时候发现,经常会上述说的功能就不管用了,并且插入一些乱七八糟的实体符号,后来发现是在编辑别的文件时,用了 HTML-mode 以后,上述功能就不起作用了。而这个 HTML-mode 是 PSGML 里面从 SGML-mode 下继承过来的,可能用了这个模式以后改了 PSGML 内部的东西,造成在其他模式里面出错。

正确和错误的结果如下:

正确

错误

没时间仔细看,现在留个备份,以后再细查。

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You can use BBCode tags in the text.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
 __        __  _   _          _           _____  __   __ __        __
\ \ / / (_) | | __ __| | __ _ | ___| \ \ / / \ \ / /
\ \ /\ / / | | | |/ / / _` | / _` | | |_ \ V / \ \ /\ / /
\ V V / | | | < | (_| | | (_| | | _| | | \ V V /
\_/\_/ |_| |_|\_\ \__,_| \__, | |_| |_| \_/\_/
|_|
Enter the code depicted in ASCII art style.