Author: scabanovich
Date: 2007-07-24 07:51:15 -0400 (Tue, 24 Jul 2007)
New Revision: 2622
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/StrutsConfigLoader.java
Log:
EXIN-86 model gets access to dtds from wtp
Modified:
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/StrutsConfigLoader.java
===================================================================
---
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/StrutsConfigLoader.java 2007-07-24
11:50:50 UTC (rev 2621)
+++
trunk/struts/plugins/org.jboss.tools.struts/src/org/jboss/tools/struts/model/StrutsConfigLoader.java 2007-07-24
11:51:15 UTC (rev 2622)
@@ -48,9 +48,10 @@
// String encoding = XModelObjectLoaderUtil.getEncoding(body);
// body = FileUtil.encode(body, encoding);
+ int resolution =
EntityXMLRegistration.getInstance().resolve(object.getModelEntity());
String[] errors =
//XMLUtil.getXMLErrors(new StringReader(body));
- XMLUtil.getXMLErrors(new StringReader(body), false, false);
+ XMLUtil.getXMLErrors(new StringReader(body), resolution == EntityXMLRegistration.DTD,
resolution == EntityXMLRegistration.SCHEMA);
boolean hasErrors = (errors != null && errors.length > 0);
if(hasErrors) {
object.setAttributeValue("isIncorrect", "yes");