- This topic has 4 replies, 3 voices, and was last updated 19 years, 3 months ago by Riyad Kalla.
-
AuthorPosts
-
adcworksMemberHi,
I’ve just bought ME yesterday and this morning been interfacing it to our existing web application. I’m pretty much done and pleased, but I am getting a lot of validation errors, 1 for the custom taglib and several for some struts related files.
1. The taglib error
vc-elt.1: Cannot find the declaration of element ‘taglib’. iq.tld iq/WebRoot/WEB-INF line 3 12 April 2005 10:56:11
The iq.tld is our custom taglib and it has the following declaration for taglib which I believe is pretty standard for J2EE 1.4 taglibs, and indeed has been running happily in Tomcat 5 for over a year.
<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd" version="2.0">
I can make the error go away by changing this declaration to
<taglib>
But I don’t really want to do that as it’s not as “full” a declaration.
2. Struts-config errors
We have a slight variation on how we create our struts-config that may be causing these problems. The error is
The markup in the document following the root element must be well-formed. struts-config-actions-core.xml iq/WebRoot/WEB-INF line 30 12 April 2005 11:00:54
This happens for each of our struts-config-actions-xxx.xml where xxx is a sub-system. You see, we break out our struts actions declarations to make our multi-developer team let dependent on 1 overall struts-config file, and then in the master struts-config we import these smaller fragments with standard XML entity imports (this file validates fine in ME)
<!ENTITY actions_core SYSTEM "struts-config-actions-core.xml"> <action-mappings> &actions_core; &actions_miscapps; </action-mappings>
These fragment files look like this:
<action path="/rewardsAndRecognitionScheme" type="com.qas.newmedia.intranet.rar.actions.RaRSchemeAction"> <forward name="rar.scheme" path="iq.rar.scheme" redirect="false" /> </action> <action path="/rewardsAndRecognitionIntro" type="com.qas.newmedia.intranet.rar.actions.RaRIntroductionAction"> <forward name="rar.intro" path="iq.rar.intro" redirect="false" /> </action>
That is to say, they do not start with an XML declaration or doctype or anything else, it’s straight into the action mappings. Even adding an XML declaration in does not fix the issue though because I tried it out, and besides, that would break at run-time due to the entity import.
I am guessing I need to disable XML validation but can I do it only for these set of files?
Looking forward to hearing your suggestions.
Riyad KallaMemberxsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee web-jsptaglibrary_2_0.xsd”
The issue is this part, it’s trying to find the XSD file in the same dir as the TLD file, preferablly you would want this XSD file on some public web space somewhere that is easily accessible.
and then in the master struts-config we import these smaller fragments with standard XML entity imports (this file validates fine in ME)
This is a known problem, although it doesn’t have the highest priority right now in comparison to other things we are working on (this is the 2nd report of this issue). What you can do as a temporary workaround is right click on your XML files, go to Properties and mark them as “Derived”, this will make the XML validator skip them so you don’t have to put up with bogus errors.
adcworksMemberthanks, i will follow your suggestions.
eivinnMemberI’m having the same problem as this guy in our web-project. Not using version=”2.0″ and the other stuff complains about the tag “function” not being declared.
Riyad KallaMembereivinn,
Please provide all pertinant details that the original poster did, if your problem was exactly the same you could follow my suggestion above to fix it, but my guess is there is something slightly different. -
AuthorPosts