Menu

Newbie with XMLCOPYEDITOR

Help
Jeff Couc
2007-10-01
2012-12-07
  • Jeff Couc

    Jeff Couc - 2007-10-01

    Hi;

    I first want to thank developers who made this software both available on Win and Linux.

    I'm starting with this tool and have difficulties with what may be obvious steps:

    The following xml file with inner dtd is declared to be valid:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!DOCTYPE lettre [
    <!ELEMENT lettre (#PCDATA)>
    ]>
    <lettre>
          Nunc est bibendum
    </lettre>

    If I generate an external dtd, nameley myfirstdtd.dtd

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!ELEMENT lettre (#PCDATA)>

    this one yields the following error
    "Error at line 2,column 1: syntax error"

    and when I associate it with the xml file

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE lettre SYSTEM "/home/jeffcouc/myfirstdtd.dtd">
    <lettre>
          Nunc est bibendum
    </lettre>

    the document is well formed but cannot be validate:
    "Error at line 1, column 1: Content error in the external subset"

    Any help would be welcome.

    thanks a lot

    Jeff Couc

     
    • gnschmidt

      gnschmidt - 2007-10-01

      Thanks Jeff. I think this is an issue that's resolved in the source (I'm hoping to release 1.1.0.3 very shortly). If it's the problem I expect you could fix it for now by disabling 'Save UTF-8 BOM' under Tools>Options and saving the DTD.

      The problem seems to be that the parser (Libxml) cannot handle a valid byte order mark at the start of UTF-8 DTDs. In my view that's a bug, but I have added an exception to the source repo that should ensure that DTDs never take UTF-8 BOMs. I think it's fair to say that UTF-8 should never require a BOM, but some MS editors require it and most editors understand it.

      If the above suggestion doesn't solve the problem, give me a shout and I'll investigate further!

      -Gerald

       
    • Jeff Couc

      Jeff Couc - 2007-10-01

      Hi Gerald.

      It works fine now.

      Thanks for your help.

      Jeff Couc

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.