facebook

Problem with XML Editor

  1. MyEclipse Archived
  2.  > 
  3. Web Development (HTML, CSS, etc.)
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #234180 Reply

    javaexpert
    Member

    Hi,

    I hava a little problem with an XML file (moz-bindings.xml from http://www.fckeditor.net/).

    <?xml version=”1.0″ encoding=”utf-8″ ?>
    <bindings xmlns=”http://www.mozilla.org/xbl”&gt;
    <binding id=”numericfield”>
    <implementation>
    <constructor>
    this.keypress = CheckIsDigit ;
    </constructor>
    <method name=”CheckIsDigit”>
    <body>
    var iCode = keyCode ;

    var bAccepted =
    (
    ( iCode >= 48 && iCode <= 57) // Numbers
    || (iCode >= 37 && iCode <= 40) // Arrows
    || iCode == 8 // Backspace
    || iCode == 46 // Delete
    ) ;

    return bAccepted ;
    </body>
    </method>
    </implementation>
    <events>
    <event type=”keypress” value=”CheckIsDigit()” />
    </events>
    </binding>
    </bindings>

    The MyEclipse XML Editor shows me 2 erros:
    Severity Description Resource In Folder Location Creation Time
    2 cvc-elt.1: Cannot find the declaration of element ‘bindings’. moz-bindings.xml FCKEditor/WebRoot/editor/dialog/common line 2 4. August 2005 12:26:23
    Severity Description Resource In Folder Location Creation Time
    2 The entity name must immediately follow the ‘&’ in the entity reference. moz-bindings.xml FCKEditor/WebRoot/editor/dialog/common line 14 4. August 2005 12:26:23

    Can anybody explain me how I can avoid this erros. I don’t understand especially the first error (there is no dtd specified).
    Any help is very appreciated.

    Regards,
    javaexpert

    #234249 Reply

    Riyad Kalla
    Member

    JE,
    First you need a schema location in your root element of this page, tell the XML editor where the DTD or schema lives so it can validate it.

    Second, you need to wrap your body contents in a CDATA tag, because you contain invalid XML chars in there.

    #235732 Reply

    I’m running into the same issue with the missing dtd as I’ve inherited some code from someone else and I’m trying to get it myEclipse compliant (code works, but myEclipse flags a lot of errors).

    Does anyone know where the dtd for the fckeditor project is or is there just a default w3c line that I can use?

    thanks

    #235733 Reply

    Riyad Kalla
    Member

    dave that really depends on what kind of file it is, have you checked with the FCK project? (http://fckeditor.sf.net). They have template files, style files, etc. that are all in XML, so it’s hard to say which one you are asking about.

    #235766 Reply

    Hi,

    I guess when some people say that they have the same problem, they really mean similiar problem. I however have the same problem. It’s the moz-bindings.xml in the same open source projects as the above person and yes I have looked at their website and cannot find a DTD for the file.

    This sort of brings me to another point. I’m getting errors in every jsp on every line that references this xml file which then causes myEclipse to stop processing errors (too many). This is not particularly user friendly to have what I consider to be a single warning (but I could be flexible and call it an error) ripple out to become 100 errors.

    DTDs have never been mandatory and most open-source projects don’t even have them, so I think you’re handling of missing DTDs is a bit user unfriendly. So.. I would suggest one or more of the following alternatives.
    a) make it a single warning on the XML file and not an error on every jsp.
    b) There are tools out there that will generate dtd from xml. Perhaps you guys should provide that as an alternative for those of us who don’t have a DTD because our open-source project code doesn’t provide (or really need) one. Yes, I can indeed do this myself via one of these websites, but it would be nice to have everything bundled together in my IDE.
    http://www.hitsw.com/xml_utilites/

    Please don’t get my wrong, I love myEclipse (and yes I have just voted for you in JDJ readers choice award), but in this instance I think you’re being a bit too stringent.

    Thanks.

    #235776 Reply

    Riyad Kalla
    Member

    This sort of brings me to another point. I’m getting errors in every jsp on every line that references this xml file which then causes myEclipse to stop processing errors (too many). This is not particularly user friendly to have what I consider to be a single warning (but I could be flexible and call it an error) ripple out to become 100 errors.

    How does your JSP page reference this XML file, code snippet pls.

    so I think you’re handling of missing DTDs is a bit user unfriendly.

    If you don’t provide a DTD or Schema, the XML editor simply validates that the file is valid XML, nothing more. It doesn’t require a DTD. Please provide *exact* errors you are getting and if they are marked int he probelm view and in the left or right margins of the editor.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Problem with XML Editor

You must be logged in to post in the forum log in