Hi Hussein,

Awesome response.

On Tue, Nov 8, 2011 at 4:15 AM, Hussein Shafie <[email protected]> wrote:
> On 11/07/2011 10:54 PM, Jeffrey Walton wrote:
>>
>> I open my XML file with a plain text editor and insert a right double
>> quote. The entity code is&rdquo;.
>
> Please use our "Characters" tool to do that.
>
> Or if you prefer, Press "Esc n" (Esc then n) and then type (autocompletion)
> the name of a character entity.
>
> See Tutorial, "Inserting special characters",
> http://www.xmlmind.com/xmleditor/_tutorial/insert_char/index.html
Yes, I need to take more time to learn the tool :)

>> If I subsequently open and save the file using XMLEditor, the editor
>> changes the character to&rdquor;.&rdquor; looks like a left double
>> quote, which is wrong.
>>
>> Any ideas how to get the editor to stop making the replacement?
>>
>
> --> I cannot reproduce this behavior with an XHTML document. The XHTML 1.0
> DTD contains the following character entity definition:
>
> In xhtml-special.ent:
>
> <!ENTITY rdquo   "&#8221;"> <!-- right double quotation mark,
>                                 U+201D ISOnum -->
> No definition of rdquor.
You are right. I should have said DocBook 4.5.

> --> I can reproduce this behavior with a DocBook 4 document. The DocBook
> V4.5  DTD contains the following character entity definitions:
>
> In ent/isonum.ent:
>
> <!ENTITY rdquo "&#x0201D;" ><!--RIGHT DOUBLE QUOTATION MARK -->
>
> In ent/isopub.ent:
>
> <!ENTITY rdquor "&#x0201D;" ><!--RIGHT DOUBLE QUOTATION MARK -->
>
> I don't know why rdquo has been defined like that by the OASIS committee.
> See
> http://www.oasis-open.org/docbook/documentation/reference/html/iso-num.html
>
> --> XMLmind XML Editor strictly conforms to what's specified in the DTD.
> Therefore there is no bug here we could fix.
OK, no problem. I have a script that builds the book. I just added:
    echo Fixing right double quote
    for file in ./*.xml; do
        sed --in-place 's/\&rdquor;/\&rdquo;/g' $file
    done

> --> Let's suppose you are using a DocBook 4 DTD.
>
> There is no good way to solve your problem. If you modify
> XXE_install_dir/addon/config/docbook/dtd/V4.5/ent/isonum.ent [*], you'll
> have interchange problems. That is, it will work fine just in the context of
> your local copy of XMLmind XML Editor.
And this fixed 4.5 (to 4.4):

  echo Fixing DocBook version
  for file in ./*.xml; do
    sed --in-place -e 's/DTD DocBook XML V4.5/DTD DocBook XML V4.4/g' \
    -e 's/xml\/4\.5\/docbookx\.dtd/xml\/4\.4\/docbookx\.dtd/g' $file
  done

Thanks for the help.

Jeff
 
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to