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 20:33:19 +0200
schrieb "openhab.doc" <openhab.doc@web.de>:

> Thank you for your explanation. Now I have changed my document but
> now I have the next problem.
> In the main document I have included a sub document with xi:include
> and I don't have an idea how to change the header of the included
> document. At the moment it looks like:
> <!DOCTYPE chapter [
>   <!ENTITY % darktable_ent SYSTEM "darktable.ent">
>   %darktable_ent;
> ]>  

That's perfectly fine.

> [...]
> *The output of *
> /xsltproc --xinclude --output
> Test.html /docbook-xsl-1.79.2/xhtml/docbook.xsl source.xml/
> *is like this:*
> /source.xml:31: parser error : Entity 'eacute' not defined 
> overview/overview.xml:273: parser error : Entity 'nbsp' not defined 

Well, you probably used the eacute entity in one of your XML files, but
never defined it.

For example, "nbsp" and "eacute" are entities that are used in DocBook
4. However, DocBook 5 doesn't define any entities at all. Fortunately,
you can use entities and DocBook 5 together.

Use one of these options:

* Replace all entities with the "real" Unicode characters, for
  example, &nbsp; with &#xa0;.

* Define the entities in your own entity file, for example as:

  <!ENTITY eacute   "&#x000E9;">
  <!ENTITY nbsp     "&#x000A0;">

* Include the definitions from DocBook 4 by inserting the following
  lines in your shared entity file ("darktable.ent", "common.ent" etc.):

  <!ENTITY % isolat1 PUBLIC
     "ISO 8879:1986//ENTITIES Added Latin 1//EN//XML"
  <!ENTITY % isonum PUBLIC
     "ISO 8879:1986//ENTITIES Numeric and Special Graphic//EN//XML"

  However, to make this work, your XML catalog has to contain the above

If you have used only a handful of these entities, then option 1 would
be probably the best fit.

> *Whats wrong with my Entity?*/

Nothing. :) It's just not found by your XML parser.

> *How do I define the chapter document in a proper way?*

I would recommend to create one file that you share between your
XML files.

For example, you could create a "common.ent" file where all your
entities are defined. Include this file in all headers of your XML
files. That should solve your problem.

    Thomas Schraitle

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