diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-02-13 09:36:13 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2017-02-13 09:36:13 +0000 |
| commit | e9db35dd8f7a78b3f85bddad66445e88858aee1f (patch) | |
| tree | 432fe513279efbe2af1ce2d4200c44868397022d /docutils/docs/ref | |
| parent | c304a4ed9ce10e71ec1ac0263d10630e047582e1 (diff) | |
| download | docutils-e9db35dd8f7a78b3f85bddad66445e88858aee1f.tar.gz | |
Enable validation of Docutils XML documents against the DTD:
Use attribute type NMTOKEN instead of REFID for the `refid` attribute
and NMTOKENS for `backrefs`: REFID refers to an ID type instance,
however, the `ids` attribute cannot use the ID type because `XML only
allows one ID per Element Type`__ and does not support a multiple-ID
"IDS" attribute type.
__ https://www.w3.org/TR/REC-xml/#sec-attribute-types
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk@8031 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docutils/docs/ref')
| -rw-r--r-- | docutils/docs/ref/docutils.dtd | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/docutils/docs/ref/docutils.dtd b/docutils/docs/ref/docutils.dtd index 9d412518c..74a4c9c87 100644 --- a/docutils/docs/ref/docutils.dtd +++ b/docutils/docs/ref/docutils.dtd @@ -47,7 +47,8 @@ by wrapper DTDs. <!-- Attributes shared by all elements in this DTD: -- `ids` are unique identifiers, typically assigned by the system. +- `ids` are unique identifiers, typically assigned by the system. The NMTOKENS + attribute type is used because XML doesn't support a multiple-ID "IDS" type. - `names` are identifiers assigned in the markup. - `dupnames` is the same as `name`, used when it's a duplicate. - `source` is the name of the source of this document or fragment. @@ -65,13 +66,21 @@ Attributes shared by all elements in this DTD: <!ENTITY % refuri.att " refuri CDATA #IMPLIED "> -<!-- Internal reference to the `id` attribute of an element. --> +<!-- +Internal reference to the `ids` attribute of an element. The NMTOKENS +type is used instead of IDREF, because XML doesn't support a multiple-ID +"IDS" type. +--> <!ENTITY % refid.att - " refid IDREF #IMPLIED "> + " refid NMTOKEN #IMPLIED "> -<!-- Space-separated list of id references, for backlinks. --> +<!-- +Space-separated list of `ids` references, for backlinks. The NMTOKENS +type is used instead of IDREF, because XML doesn't support a multiple-ID +"IDS" type. +--> <!ENTITY % backrefs.att - " backrefs IDREFS #IMPLIED "> + " backrefs NMTOKENS #IMPLIED "> <!-- Internal reference to the `name` attribute of an element. On a |
