Author: mukulg Date: Sun Jan 6 06:21:31 2013 New Revision: 1429470 URL: http://svn.apache.org/viewvc?rev=1429470&view=rev Log: schema 1.1 commit: adding a new test case for implementation improvements committed few minutes ago.
Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml?rev=1429470&view=auto ============================================================================== --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xml Sun Jan 6 06:21:31 2013 @@ -0,0 +1 @@ +<X>abcde</X> \ No newline at end of file Added: xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd?rev=1429470&view=auto ============================================================================== --- xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd (added) +++ xerces/java/branches/xs-1.1-tests/data/assertions/list_union/listunion18.xsd Sun Jan 6 06:21:31 2013 @@ -0,0 +1,27 @@ +<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <xs:element name="X"> + <xs:simpleType> + <xs:union memberTypes="T1 T2 T3"/> + </xs:simpleType> + </xs:element> + + <xs:simpleType name="T1"> + <xs:restriction base="xs:integer"> + <xs:assertion test="($value mod 2) = 0"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="T2"> + <xs:restriction base="xs:date"> + <xs:assertion test="$value lt current-date()"/> + </xs:restriction> + </xs:simpleType> + + <xs:simpleType name="T3"> + <xs:restriction base="xs:string"> + <xs:length value="5"/> + </xs:restriction> + </xs:simpleType> + +</xs:schema> \ No newline at end of file Modified: xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java URL: http://svn.apache.org/viewvc/xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java?rev=1429470&r1=1429469&r2=1429470&view=diff ============================================================================== --- xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java (original) +++ xerces/java/branches/xs-1.1-tests/src/org/apache/xerces/tests/AssertionTests.java Sun Jan 6 06:21:31 2013 @@ -2764,4 +2764,20 @@ public class AssertionTests extends Xerc } } + public void testAssert155() { + String xmlfile = fDataDir+"/assertions/list_union/listunion18.xml"; + String schemapath = fDataDir+"/assertions/list_union/listunion18.xsd"; + try { + Schema s = fSchemaFactory.newSchema(new StreamSource(schemapath)); + Validator v = s.newValidator(); + v.setErrorHandler(this); + v.validate(new StreamSource(xmlfile)); + assertNull(fErrSysId); + assertNull(fFatErrSysId); + } catch(Exception ex) { + ex.printStackTrace(); + assertTrue(false); + } + } + } --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@xerces.apache.org For additional commands, e-mail: commits-h...@xerces.apache.org