Closed LoSong closed 7 years ago
Yes, that is a known limitation: you need to add the document namespace to the topmost element(s) in your entities.
Stefan is right - I consider this a libxml2 bug.
So this works:
<!ENTITY exampleuser "
<systemitem xmlns='http://docbook.org/ns/docbook' class='username'>
tux
</systemitem>">
and
<!ENTITY foo "
<para xmlns='http://docbook.org/ns/docbook'>
Lorem <emphasis>ipsum</emphasis>
</para>">
If there are two parent tags, you need to add the namespace declaration for both:
<!ENTITY baz "
<para xmlns='http://docbook.org/ns/docbook'>
Lorem <emphasis>ipsum</emphasis>
</para>
<para xmlns='http://docbook.org/ns/docbook'>
Dolor <emphasis>ipsum</emphasis>
</para>">
Closing.
When using tags inside entities there is a namespace warning when validating or transforming into pdf:
entity.ent
MAIN-test.xml
Executing the following command:
user@linux-q86n:~/Documents/DocBook/daps> daps -d DC-test --debug validate
results in the following warning message:
Nevertheless, the transformation generates a correct pdf.
So it is not that important, but maybe there is a way to eleminate this warning?
DAPS 2.3.0 OpenSuse Leap 42.2 (Virtualbox VM)