The "DocBook Transclusion" paper[1] defines some attributes (trans:idfixup
, trans:suffix
, and trans:linkscope
) which are used for ID fixup in an (x)included XML document.
The trans:idfixup
attribute can only have one of the values "none", "suffix", or "auto" (see B.5 "Manually assigned suffix"[2] for a more exhaustive example).
Using the keyword suffix
in trans:idfixup
, an transclusion processor places the value of trans:suffix
after the resulting IDs. For example, lets assume the following xi:include
element:
<xi:include href="x.xml" trans:idfixup="suffix" trans:suffix="_bar_"/>
With the above trans attributes, a former ID foo
is rewritten as foo_bar_
. However, to get the opposite (_bar_foo
) is not possible with the current specification.
Some writers maybe have a style guide which defines IDs in a certain way.
Allow an additional value of prefix
for trans:idfixup
with the following definition:
prefix
[1] http://docbook.org/docs/transclusion/
[2] http://docbook.org/docs/transclusion/#ex.9
[3] https://lists.oasis-open.org/archives/docbook/201605/msg00007.html
Hi,
during drafting stage there was originally prefix attribute instead of suffix. But discussion revealed that suffix is more friendly option as in many scenarios suffix will be autogenerated piece of uniquie garbage.
See: https://lists.oasis-open.org/archives/docbook/201411/msg00006.html
https://lists.oasis-open.org/archives/docbook-tc/201411/msg00003.html
IMHO, supporting both prefix and suffix will just put more burden on implementers, so I don't think it's good idea to introduce prefix.
Jirka