facebook

XML snippet not well formed

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #214348 Reply

    JonathanOddy
    Member

    I am running MyEclipse version: 3.8.1+QF20040825.

    I’m using OJB within a project at the moment. It uses a number of XML files and “includes” one XML file within another. Specifically within repository.xml:

    <!ENTITY user SYSTEM “repository_user.xml”>


    <descriptor-repository version=”1.0″ isolation-level=”read-uncommitted”
    proxy-prefetching-limit=”50″>

    <!– include all used database connections –>
    &database;

    <!– include ojb internal mappings here –>
    &internal;

    <!– include user defined mappings here –>
    &user;

    The file repository_user.xml is a xml snippet in that it is included within repository.xml. When I run validation against repository.xml I get “The XML file is valid”, yet my repository_user.xml has a red cross against it and “The markup in the documnet following the root element must be well-formed” within the file (at some arbitrary point in the file) and in the Problems tab.

    This is really annoying as my project now has a little (and erroneous) red cross against it (and if I edit/validate any of the other include XML files I get more red crosses).

    Any thoughts/ideas about how to get around this issue?

    Jonathan

    #214353 Reply

    Riyad Kalla
    Member

    Jonathan,
    Validation is really intended for entire files, there currently isn’t a way to filter individual files so we would suggest turning off XML validation for your project, and just running it manually on the files you need it to run on. I know for JSPs in the similar situation the spec specifies to name the fragments .jspf, I don’t know if there is the same idea in xml, .xmlf maybe? THe idea being that you name non-complete files something else so the validator ignores them.

    #214356 Reply

    JonathanOddy
    Member

    Thanks Riyad,

    I’ve turned off validation for now and that gets rid of the red cross. Manual validation will be okay at the moment because we’ve not got many XML files and those we have don’t change too often.

    As a side issue, after turning off XML validation I added an error into the included file and manually ran the validator on the parent. It correctly noted that there was an error, but failed to locate it properly. It seemed to place the error line in the parent at some arbitrary location and not in the include file. This isn’t a problem when seeding errors, but when typing a long change…

    Jonathan

    #214360 Reply

    Riyad Kalla
    Member

    Hmm odd, can you give a small snippet as an example so I can reproduce this locally?

    #255561 Reply

    just confirm

    #255562 Reply

    jon, you just need to put repository_user.xml to a jar file, and copy that jar file to lib folder. then delete
    repository_user.xml

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: XML snippet not well formed

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