gareth      2003/02/06 05:52:33

  Modified:    c/tests/DOM/TypeInfo TypeInfo.cpp
               c/tests/DOM/TypeInfo/data SecondSchema.xsd TypeInfo.xml
                        TypeInfo.xsd TypeInfoNoDTD.xml TypeInfoNoDTD.xsd
  Log:
  added tests for union attribute validation bug
  
  Revision  Changes    Path
  1.4       +16 -2     xml-xerces/c/tests/DOM/TypeInfo/TypeInfo.cpp
  
  Index: TypeInfo.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/TypeInfo.cpp,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TypeInfo.cpp      5 Feb 2003 18:55:20 -0000       1.3
  +++ TypeInfo.cpp      6 Feb 2003 13:52:33 -0000       1.4
  @@ -525,18 +525,26 @@
       testEle = (DOMElement *)testEle->getNextSibling()->getNextSibling();
       testAttr = testEle->getAttributeNodeNS(0, X("testAttr"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("decimalDerivedType"), X(""), 
__LINE__);
  +    testAttr = testEle->getAttributeNodeNS(0, X("testAttr2"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("stringDerivedType"), X(""), 
__LINE__);
   
       testEle = (DOMElement *)testEle->getNextSibling()->getNextSibling();
       testAttr = testEle->getAttributeNodeNS(0, X("testAttr"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("stringDerivedType"), X(""), 
__LINE__);
  +    testAttr = testEle->getAttributeNodeNS(0, X("testAttr2"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("decimalDerivedType"), X(""), 
__LINE__);
   
       testEle = (DOMElement *)testEle->getNextSibling()->getNextSibling();
       testAttr = testEle->getAttributeNodeNS(0, X("testAttr"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("decimal"), 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
  +    testAttr = testEle->getAttributeNodeNS(0, X("testAttr2"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("string"), 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
       testEle = (DOMElement *)testEle->getNextSibling()->getNextSibling();
       testAttr = testEle->getAttributeNodeNS(0, X("testAttr"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("string"), 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
  +    testAttr = testEle->getAttributeNodeNS(0, X("testAttr2"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), X("decimal"), 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
       return passed;
   
  @@ -636,6 +644,12 @@
       testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr2"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), SchemaSymbols::fgDT_INTEGER, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
  +    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr3"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), SchemaSymbols::fgDT_STRING, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
  +
  +    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr4"));
  +    DOMTYPEINFOTEST(testAttr->getTypeInfo(), SchemaSymbols::fgDT_INTEGER, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
  +
       DOMTYPEINFOTEST(testEle->getTypeInfo(), SchemaSymbols::fgATTVAL_ANYTYPE, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
       testEle = (DOMElement *)testEle->getFirstChild()->getNextSibling();
  @@ -651,14 +665,14 @@
       testEle = (DOMElement *)back->getNextSibling()->getNextSibling();
       back = testEle;
   
  -    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr3"));
  +    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr5"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), SchemaSymbols::fgDT_ANYSIMPLETYPE, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
       //anyTestAttr2
       testEle = (DOMElement *)back->getNextSibling()->getNextSibling();
       back = testEle;
   
  -    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr3"));
  +    testAttr = testEle->getAttributeNodeNS(X("http://www.secondSchema";), 
X("attr5"));
       DOMTYPEINFOTEST(testAttr->getTypeInfo(), SchemaSymbols::fgDT_ANYSIMPLETYPE, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA, __LINE__);
   
       //anyTestMissing
  
  
  
  1.2       +8 -1      xml-xerces/c/tests/DOM/TypeInfo/data/SecondSchema.xsd
  
  Index: SecondSchema.xsd
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/data/SecondSchema.xsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- SecondSchema.xsd  29 Jan 2003 20:04:16 -0000      1.1
  +++ SecondSchema.xsd  6 Feb 2003 13:52:33 -0000       1.2
  @@ -1,9 +1,16 @@
   <?xml version="1.0" encoding="UTF-8"?>
  -<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' 
elementFormDefault="unqualified"  targetNamespace="http://www.secondSchema"; >
  +<xs:schema xmlns:xs='http://www.w3.org/2001/XMLSchema' 
elementFormDefault="unqualified"  targetNamespace="http://www.secondSchema"; 
xmlns:ss="http://www.secondSchema";>
     <xs:element name="realTag1" type="xs:string" />
     <xs:element name="realTag2" type="xs:string" />
     <xs:element name="realTag3" type="xs:string" />
     <xs:attribute name="attr1" type="xs:string" />
     <xs:attribute name="attr2" type="xs:integer" />
  +
  +  <xs:attribute name="attr3" type="ss:unionType" />
  +  <xs:attribute name="attr4" type="ss:unionType" />
    
  +  <xs:simpleType name="unionType" >
  +    <xs:union memberTypes="xs:integer xs:string" />
  +  </xs:simpleType>
  +
   </xs:schema>
  
  
  
  1.2       +7 -7      xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfo.xml
  
  Index: TypeInfo.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfo.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeInfo.xml      29 Jan 2003 20:04:17 -0000      1.1
  +++ TypeInfo.xml      6 Feb 2003 13:52:33 -0000       1.2
  @@ -108,10 +108,10 @@
     <testEle >hello</testEle>
     <testEle >200</testEle>
     <testEle >abcdefg</testEle>
  -  <testEle2 testAttr="50" />
  -  <testEle2 testAttr="hello" />
  -  <testEle2 testAttr="200" />
  -  <testEle2 testAttr="abcdefg" />
  +  <testEle2 testAttr="50" testAttr2="hello"  />
  +  <testEle2 testAttr="hello" testAttr2="50" />
  +  <testEle2 testAttr="200" testAttr2="abcdefg" />
  +  <testEle2 testAttr="abcdefg" testAttr2="200" />
   </unionTest>
   <anonymousTest partNum="50">
     <quantity>50</quantity>
  @@ -140,13 +140,13 @@
     <xhtml:fakeTag2 />
     <ss:realTag1 >la</ss:realTag1>
   </anyTestPartial>
  -<anyTest ss:attr1="string" ss:attr2="2" >
  +<anyTest ss:attr1="string" ss:attr2="2" ss:attr3="string" ss:attr4="2">
     <ss:realTag2 >la</ss:realTag2>
     <ss:realTag3 >la</ss:realTag3>
     <ss:notRealTag >la</ss:notRealTag>
   </anyTest>
  -<anyTestAttr1 ss:attr3="2" />
  -<anyTestAttr2 ss:attr3="2" />
  +<anyTestAttr1 ss:attr5="2" />
  +<anyTestAttr2 ss:attr5="2" />
   <anyTestMissing />
   <invalidTest simple="abcd" invalid="asdas" >
     <simple >abcd</simple>
  
  
  
  1.2       +1 -0      xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfo.xsd
  
  Index: TypeInfo.xsd
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfo.xsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeInfo.xsd      29 Jan 2003 20:04:17 -0000      1.1
  +++ TypeInfo.xsd      6 Feb 2003 13:52:33 -0000       1.2
  @@ -317,6 +317,7 @@
       <xs:element name="testEle2" maxOccurs="4" >
         <xs:complexType >
            <xs:attribute name="testAttr" type="unionTestType" />
  +         <xs:attribute name="testAttr2" type="unionTestType" />
         </xs:complexType>
       </xs:element>
     </xs:sequence>
  
  
  
  1.2       +7 -7      xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfoNoDTD.xml
  
  Index: TypeInfoNoDTD.xml
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfoNoDTD.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeInfoNoDTD.xml 29 Jan 2003 20:04:17 -0000      1.1
  +++ TypeInfoNoDTD.xml 6 Feb 2003 13:52:33 -0000       1.2
  @@ -105,10 +105,10 @@
     <testEle >hello</testEle>
     <testEle >200</testEle>
     <testEle >abcdefg</testEle>
  -  <testEle2 testAttr="50" />
  -  <testEle2 testAttr="hello" />
  -  <testEle2 testAttr="200" />
  -  <testEle2 testAttr="abcdefg" />
  +  <testEle2 testAttr="50" testAttr2="hello"  />
  +  <testEle2 testAttr="hello" testAttr2="50" />
  +  <testEle2 testAttr="200" testAttr2="abcdefg" />
  +  <testEle2 testAttr="abcdefg" testAttr2="200" />
   </unionTest>
   <anonymousTest partNum="50">
     <quantity>50</quantity>
  @@ -137,13 +137,13 @@
     <xhtml:fakeTag2 />
     <ss:realTag1 >la</ss:realTag1>
   </anyTestPartial>
  -<anyTest ss:attr1="string" ss:attr2="2" >
  +<anyTest ss:attr1="string" ss:attr2="2" ss:attr3="string" ss:attr4="2">
     <ss:realTag2 >la</ss:realTag2>
     <ss:realTag3 >la</ss:realTag3>
     <ss:notRealTag >la</ss:notRealTag>
   </anyTest>
  -<anyTestAttr1 ss:attr3="2" />
  -<anyTestAttr2 ss:attr3="2" />
  +<anyTestAttr1 ss:attr5="2" />
  +<anyTestAttr2 ss:attr5="2" />
   <anyTestMissing />
   <invalidTest simple="abcd" invalid="asdas" >
     <simple >abcd</simple>
  
  
  
  1.2       +1 -0      xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfoNoDTD.xsd
  
  Index: TypeInfoNoDTD.xsd
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/tests/DOM/TypeInfo/data/TypeInfoNoDTD.xsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TypeInfoNoDTD.xsd 29 Jan 2003 20:04:17 -0000      1.1
  +++ TypeInfoNoDTD.xsd 6 Feb 2003 13:52:33 -0000       1.2
  @@ -315,6 +315,7 @@
       <xs:element name="testEle2" maxOccurs="4" >
         <xs:complexType >
            <xs:attribute name="testAttr" type="unionTestType" />
  +         <xs:attribute name="testAttr2" type="unionTestType" />
         </xs:complexType>
       </xs:element>
     </xs:sequence>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to