OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] Help needed to use ENTITY in docbook5 (convert from docbook4)

Hi Pierre,

Am Thu, 24 May 2018 08:14:17 +0200
schrieb openHAB.Doc@web.de:

> I have a docbook4 document that I want to convert to docbook5. In the
> docbook4 document I have a lot of special character which are defined
> in the document ownChar.dtd.

What does the ownChar.dtd contains? I guess it contains entity
declarations like this:

  <!ENTITY foo "Foo">

In that case, you should better rename that to ownChar.ent, because
it's not a DTD. :)

> How Do I have to change the “old docbook 4” DOCTYPE and ENTITY Part
> for a docbook5 relax NG document?
> Attached you will find an extract of the current document:
>     <?xml version="1.0" encoding="utf-8"?>
>     <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
>                    "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"; [
>                                    <!ENTITY % ownChar_dtd SYSTEM
> "dtd/ownChar.dtd">
>                                    %ownChar_dtd;
>     ]>

This is wrong, you shouldn't declare your document as DocBook V4.5 but
use the namespace for version 5.

If you want to keep your entity definitions, you can use this header:

  <!DOCTYPE book [
     <!ENTITY % myownchars SYSTEM "ownChar.ent">
  <book version="5.0"
    <!-- ... content pruned -->

However, you should keep the file "ownChar.ent" in the same folder as
your XML file(s).

    Thomas Schraitle

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]