- This topic has 21 replies, 9 voices, and was last updated 18 years, 1 month ago by Ebi.
-
AuthorPosts
-
ErezMemberI’v got this XML file in my Web module which starts like this:
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE securityfilter-config PUBLIC "-//SecurityFilter.org//DTD Security Filter Configuration 1.1//EN" "http://www.securityfilter.org/dtd/securityfilter-config_1_1.dtd"> ... ...
In the ‘problems’ pane I get the following error:
“The markup declarations contained or pointed to by the document type declaration must be well-formed.”
How can I get rid of this?
Thanks,
Erez
Scott AndersonParticipantErez,
Is your file well-formed below the DOCTYPE line? For example does it contain a securityfilter-config as the root element? Taking the header you have and appending <securityfilter-config/> to the file makes it well-formed.
ErezMemberI do have it – here is my XML file (not too long)
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE securityfilter-config PUBLIC "-//SecurityFilter.org//DTD Security Filter Configuration 1.1//EN" "http://www.securityfilter.org/dtd/securityfilter-config_1_1.dtd"> <securityfilter-config> <security-constraint> <web-resource-collection> <web-resource-name>Secured Area</web-resource-name> <url-pattern>/user/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>User</role-name> <role-name>Operator</role-name> <role-name>Admin</role-name> </auth-constraint> <user-data-constraint> <description></description> <transport-guarantee>NONE</transport-guarantee> </user-data-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/index.jsp</form-login-page> <form-error-page>/index.jsp</form-error-page> <form-default-page>/user/Login.do</form-default-page> </form-login-config> </login-config> <security-role> <description>Site Admnistrator</description> <role-name>Admin</role-name> </security-role> <security-role> <description>A member of the site system stuff</description> <role-name>Operator</role-name> </security-role> <security-role> <description>Simple user of this site</description> <role-name>User</role-name> </security-role> <realm className="securityFilter.JBossRealmAdapter" /> </securityfilter-config>
Is this well formed ?
Erez
Scott AndersonParticipantErez,
It’s fine. I pasted it into an XML file using our editor and it validated just fine. Are you sure you’re using our XML editor? Which version of the product? Is validation turned on?
Riyad KallaMemberErez,
When you right click on your XML file, go to “Open With” andmake sure the default is “MyEclipse XML Editor”, its possible it is some other editor.
ErezMemberI’ve checked and everything is in place:
First, I am running the 3.7.0 M7 version on Win XP.
– the MyEclipse XML Editor is marked as the default editor.
– Under the Windows/properties/MyEclipse/Editors/XML Editors/Configuration I have the following:1. validate: only Deployment Descriptors
2. Use cache for DTDs (checked)
3. Suppress warning for non-default file encodingBy the way the error marker (red X) is placed next to the first row:
<?xml version="1.0" encoding="UTF-8" ?>
Erez
support-michaelKeymasterI’m curious if an error marker has been attached to the file in question and some how is not being cleared (not likely).
A couple of more things to try:
1) Try creating a new XML file and paste the contents of the file you posted. Then save and validate that file to see if the error marker appears.
2) Rebuild Project, Project->Rebuild Project
ErezMemberI tried everything you told me to do, but it still shows the error, and yes, it does show a small error marker (“X”) next to the file and next to the containing project as well.
Erez
Riyad KallaMemberErez, can you refresh your project, close it, close Eclipse, reload Eclipse and reopen your project THEN rebuild project and see what happens?
ErezMemberRiyad,
I have done it all – close all three related projects (EAR, EJB, and Web), closed Eclipse, reload, and rebuild all but no go… 🙁
A very sticky error..
Erez
Riyad KallaMemberGood god that is a sticky error…
Ok lets try this. Cut-paste the contents of the XML file from Eclipse into an empty Notepad window. Then delete the file from your project, does the error go away? Ok, now create a new XML file (with same name) and paste the contents back in.
Did that work?
NathanMemberI have the same thing happening….The xml file in question has never had this problem before and has not been edited — the only thing that has changed is a new version of myeclipse / eclipse…..any ideas?
Riyad KallaMemberNathan, did you try the last suggestion I Made to Erez?
beskowMemberHi,
I’m experiencing exactly the same problem with a struts validator file, using the doctype
<!DOCTYPE form-validation PUBLIC
“-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.1//EN”
“http://jakarta.apache.org/commons/dtds/validator_1_1.dtd”>/Bjorn
Riyad KallaMemberBjorn,
Did you try the suggestion that I made to Nathan, which was originally made to Erez?Ok lets try this. Cut-paste the contents of the XML file from Eclipse into an empty Notepad window. Then delete the file from your project, does the error go away? Ok, now create a new XML file (with same name) and paste the contents back in.
-
AuthorPosts