help-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[help-texinfo] Re: How fix (non-fatal) error by producing .fo (by fop) f


From: Oleksandr Gavenko
Subject: [help-texinfo] Re: How fix (non-fatal) error by producing .fo (by fop) from .docbook from .texi about missing entities?
Date: Sat, 26 Feb 2011 23:07:55 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

On 2011-02-18 0:42, Karl Berry wrote:
     I get cedet.texi from GNU Emacs distro, fix include issue and produce
     .docbook:
        $ makeinfo --enable-encoding --docbook -o cedet.docbook cedet.texi
     [...]
     Why 'makeinfo' add
        ©“”
     if DocBook spec don't include this entities?

No good reason.  Can you tell us what should be done for the copyright
symbol and [lr]dquo in Docbook?

Sorry for long delay.

I don't deeply look at code but from texinfo/makeinfo/cmds.c:

      if (html)
        add_word ("„");
      else if (docbook)
        xml_insert_entity ("ldquor");
      else if (xml && !docbook)
        xml_insert_entity ("bdquo");
      else
        add_word ("\"");

Check:

  http://www.w3.org/TR/2008/REC-xml-20081126/#sec-predefined-ent

XML standard only define named entities for its special chars.

Same applied to DocBook, especially with 5 edition which forbid
(may I wrong ??) DTD in docbook and moves to plain XML.

I think that there is LARGE problem in decision that preferred XML
output coding is UTF-8. This quotes from XML spec 5ed:

  All XML processors MUST accept the UTF-8 and UTF-16
  encodings of Unicode.

By now assumed that any program for XML processing can handle UTF-8.

In that way we can convert .texi to UTF-8 and make replace for chars:

  © ==> ©
  “ ==> “
  ” ==> ”
  ‘ ==> ‘
  ’ ==> ’
  ⇒ ==> →

I think sources contain more entities that require rewriting.
For quick search I use


http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references

I expect spend some time to this problem.

May be right thing supply this entities in external file which
will be included by generated '.docbook'.
I try search how this do and nothing found.

Only inline in resulted document:

  <?xml version="1.0"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd";
[
  <!ENTITY copy "&#xa9;">
]>

--
Best regards!




reply via email to

[Prev in Thread] Current Thread [Next in Thread]