【问题标题】:How to create a new entity with RELAX NG schema in DocBook V5.0如何在 DocBook V5.0 中使用 RELAX NG 模式创建新实体
【发布时间】:2016-05-03 01:46:53
【问题描述】:

使用 DocBook V4.x 和 DTD,我可以创建一个实体:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [

<!ENTITY mdash   "&#8212;">

]>
<article>
...
<title>Em dash</title>

<para>The em dash is perhaps the most versatile punctuation mark.
Depending on the context, the em dash can take the place of commas,
parentheses, or colons&mdash;in each case to slightly different effect.</para>
...
</article>

如何使用 RELAX NG 模式对 DocBook V5.0 做同样的事情?:

<?xml version='1.0' encoding='utf-8'?>
<article xmlns='http://docbook.org/ns/docbook' version='5.0' xml:lang='en'>
...
<title>Em dash</title>
<para>The em dash is perhaps the most versatile punctuation mark.
Depending on the context, the em dash can take the place of commas,
parentheses, or colons&mdash;in each case to slightly different effect.</para>

【问题讨论】:

    标签: docbook dtd relaxng docbook-5 xml


    【解决方案1】:

    您无法使用 RELAX NG 定义一般实体。实体是 DTD 的东西。您要么需要使用内部 DTD 子集(如在您的第一个代码示例中),要么只使用硬编码的工具来识别实体(例如 Web 浏览器)。

    【讨论】:

      猜你喜欢
      • 2016-07-06
      • 1970-01-01
      • 2010-12-05
      • 1970-01-01
      • 2011-11-14
      • 1970-01-01
      • 2013-06-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多