You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mu...@apache.org on 2022/01/15 05:13:35 UTC

svn commit: r1897071 - in /xerces/java/branches/xs-1.1-tests: README readme.txt src/org/apache/xerces/tests/JiraBugsTests.java

Author: mukulg
Date: Sat Jan 15 05:13:35 2022
New Revision: 1897071

URL: http://svn.apache.org/viewvc?rev=1897071&view=rev
Log:
xercesj commit : added an xsd 1.1 test case, and minor improvements to test case documentation.

Added:
    xerces/java/branches/xs-1.1-tests/README
      - copied, changed from r1897042, xerces/java/branches/xs-1.1-tests/readme.txt
Removed:
    xerces/java/branches/xs-1.1-tests/readme.txt
Modified:
    xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java

Copied: xerces/java/branches/xs-1.1-tests/README (from r1897042, xerces/java/branches/xs-1.1-tests/readme.txt)
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/README?p2=xerces/java/branches/xs-1.1-tests/README&p1=xerces/java/branches/xs-1.1-tests/readme.txt&r1=1897042&r2=1897071&rev=1897071&view=diff
==============================================================================
--- xerces/java/branches/xs-1.1-tests/readme.txt (original)
+++ xerces/java/branches/xs-1.1-tests/README Sat Jan 15 05:13:35 2022
@@ -15,18 +15,21 @@
  * limitations under the License.
  */
  
-This SVN branch contains Xerces proprietary (other than IBM / Xerces contributions to W3C XML Schema 1.1 test suite) 
-unit test cases for the Xerces's XML Schema 1.1 implementation.
+This SVN branch contains, following XML Schema 1.1 tests,
+1) IBM / Xerces implementation of W3C XML Schema 1.1 test suite (within the folder "w3c_xmlschema11-testsuite").
+2) Xerces proprietary XML Schema 1.1 tests (within the top level folders, "src" and "data").
 
-Configuration notes: Minimum JRE needed to run these tests is 1.5. These unit tests contain a folder "data" parallel 
-to the "src" folder, that contain the XML and XSD documents needed for the unit tests. Before invoking this unit test 
-suite, the following argument needs to be provided to the Java VM,
+Configuration notes, for running Xerces proprietary XML Schema 1.1 tests:
+Minimum JRE needed to run these tests is 1.7. These unit tests contain a folder "data" parallel 
+to the "src" folder, that contain the XML and XSD documents needed for the unit tests. Before 
+invoking this unit test suite, the following argument needs to be provided to the Java VM,
 -Dorg.apache.xerces.tests.dataDir=<path to data directory>
-(The unit tests, retrieve XML and XSD documents relative to this directory location)
+(the unit tests, retrieve XML and XSD documents relative to this directory location)
 
 The class "AllXercesXSD11Tests" is the entry point of this unit test suite.
 
 Acknowledgements:
-Many of the XSD 1.1 unit tests in this SVN branch, were contributed by Roger L. Costello (costello@mitre.org), and have 
-been included here with Roger's permission. Roger's contributions of useful XSD 1.1 examples to this test 
-suite is highly appreciated. Roger has been an active contributor to the XML Schema standards work.
\ No newline at end of file
+Many of the Xerces proprietary, XML Schema 1.1 tests within this SVN branch, were contributed by 
+Roger L. Costello (costello@mitre.org), and have been included here with Roger's permission. 
+Roger's contributions of useful XML Schema 1.1 examples to this test suite is highly appreciated. 
+Roger has been an active contributor to the XML Schema standards work.
\ No newline at end of file

Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java?rev=1897071&r1=1897070&r2=1897071&view=diff
==============================================================================
--- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java (original)
+++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/JiraBugsTests.java Sat Jan 15 05:13:35 2022
@@ -21,6 +21,7 @@ import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
+import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.sax.SAXSource;
 import javax.xml.transform.stream.StreamSource;
 import javax.xml.validation.Schema;
@@ -582,6 +583,22 @@ public class JiraBugsTests extends Xerce
 		    Schema s = fSchemaFactory.newSchema(new File(schemapath));
             Validator v = s.newValidator();
 		    v.setErrorHandler(this);
+            v.validate(new DOMSource(getDomDocument(xmlfile)));
+            assertNull(fErrSysId);
+            assertNull(fFatErrSysId);
+		} catch(Exception ex) {
+		   ex.printStackTrace();
+		   assertTrue(false);
+		}
+	}
+	
+	public void testJira_1726_2() {
+		String xmlfile = fDataDir+"/jira_bugs/1726_1.xml";
+		String schemapath = fDataDir+"/jira_bugs/1726_1.xsd";		
+		try {
+		    Schema s = fSchemaFactory.newSchema(new File(schemapath));
+            Validator v = s.newValidator();
+		    v.setErrorHandler(this);
             v.validate(new SAXSource(new InputSource(new 
             		                           java.io.FileInputStream(xmlfile))));
             assertNull(fErrSysId);
@@ -592,7 +609,7 @@ public class JiraBugsTests extends Xerce
 		}
 	}
 	
-	public void testJira_1726_2() {
+	public void testJira_1726_3() {
 		String xmlfile = fDataDir+"/jira_bugs/1726_1.xml";
 		String schemapath = fDataDir+"/jira_bugs/1726_1.xsd";		
 		try {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org