Commits

Anonymous committed 5015d1d

Added DTD for validator configs as suggested by Jasper Rosenberg

Issue Number: XW-504

git-svn-id: http://svn.opensymphony.com/svn/xwork/branches/2.0@1441e221344d-f017-0410-9bd5-d282ab1896d7

  • Participants
  • Parent commits 015e737
  • Branches 2.0, xwork_2_0_7

Comments (0)

Files changed (3)

File src/java/com/opensymphony/xwork2/validator/validators/default.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE validators PUBLIC
+        "-//OpenSymphony Group//XWork Validator Config 1.0//EN"
+        "http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
 <!-- START SNIPPET: validators-default -->
 <validators>
     <validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>

File src/java/xwork-validator-config-1.0.dtd

+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+  XWork Validator Config DTD.
+  Used the following DOCTYPE.
+
+  <!DOCTYPE validators PUBLIC
+  		"-//OpenSymphony Group//XWork Validator Config 1.0//EN"
+  		"http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
+-->
+<!ELEMENT validators (validator)+>
+
+<!ELEMENT validator (#PCDATA)>
+<!ATTLIST validator
+	name CDATA #REQUIRED
+    class CDATA #REQUIRED
+>

File src/test/validators.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE validators PUBLIC
+        "-//OpenSymphony Group//XWork Validator Config 1.0//EN"
+        "http://www.opensymphony.com/xwork/xwork-validator-config-1.0.dtd">
 <validators>
     <validator name="required" class="com.opensymphony.xwork2.validator.validators.RequiredFieldValidator"/>
     <validator name="requiredstring" class="com.opensymphony.xwork2.validator.validators.RequiredStringValidator"/>