- This topic has 6 replies, 5 voices, and was last updated 18 years, 8 months ago by jasclarke24.
-
AuthorPosts
-
Brett ConnorMember– System Setup ——————————-
Operating System and version: WinXP pro
Eclipse version: 3.0.0
Eclipse build id: 200406251208
Fresh Eclipse install (y/n): n
If not, was it upgraded to its current version using the update manager? y
Other installed external plugins:
Number of plugins in the <eclipse>/plugins directory that begin with org.eclipse.pde.*: 7
MyEclipse version: various versions; 3.8 b2, 3.7 are listed most commonly
Eclipse JDK version: 1.4.2_01
Application Server JDK version: 1.4.2_01
Are there any exceptions in the Eclipse log file? no– Message Body ——————————-
This question is aimed at xdoclet and eclipse as much as myeclipse, I hope someone here can answer:
I have a taglibs.xml merge file in my xdoclet configuration for one of my web projects. This currently defines two taglibs. The problem therefore is that the document fragment has in effect 2 root elements (<taglib>). (The example in the tutorial here has only one taglib – cop-out! 🙂 ) This is poluting my errors output with an error:The markup in the document following the root element must be well-formed.
How can I get rid of this error, either by preventing the fragment by being validated (what is doing this?), filtering the error (tried the filters but couldn’t get anything useful) or making the fragment legal XML, or of course anything else that will work.
Thanks
Brett
Riyad KallaMemberI’ll ask our XDoclet guy to have a look Brett.
GregMemberBrett,
This might be a long shot but could you create two merge files with just one <taglib> element in each file?
Brett ConnorMemberThe merge file names are defined by xdoclet; it defines a merge file called taglibs.xml and that’s what you’ve got. Otherwise I could change the XML extension to something else and probably prevent the validation at that point. Do you have any idea how to prevent merge files being validated? that would do it.
Has no-one else come across this problem?
Scott AndersonParticipantBrett,
The problem is that the XML validation error is legitimate — the document is not well-formed. Unfortunately, that is the way the XDoclet team specified them, I suppose never considering that someone might try to actually validate them. Unfortunately, there isn’t a real fix since the file as specified is indeed malformed, and they insist on using the .xml extension, for an invalid file. About all I can recommend is either ignoring the error on this file or turning off XML validation on that particular project. If you take the second approach, you can still manually validate files on demand from the context menu in the Package Explorer view. Sorry I can’t offer anything better at this point.
Brett ConnorMemberScott, thanks for the reply. It is strange that they specified it like this; I was hoping that they would have a root element eg <taglibs>…</taglibs> for their own purposes, or use a different file extension, but neither is the case. The file is treated as an unparsed entity and yet called .xml. I shall try to raise a marker on this in the xdoclet world.
In the mean time, how do I turn off XML validation for this project? I have not found what is doing it, and I can find no relevent settings in the project.
jasclarke24MemberRight click on project -> preferences -> My Eclipse – Validation
You might have to click on overide validation preferences then unclick XML check boxes. -
AuthorPosts