neilg       2003/11/23 21:14:18

  Modified:    c/src/xercesc/parsers AbstractDOMParser.cpp
  Log:
  change the way DOMTypeInfo for attributes is implemented so that it is stateless
  
  Revision  Changes    Path
  1.56      +4 -38     xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp
  
  Index: AbstractDOMParser.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/parsers/AbstractDOMParser.cpp,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- AbstractDOMParser.cpp     21 Nov 2003 22:38:50 -0000      1.55
  +++ AbstractDOMParser.cpp     24 Nov 2003 05:14:18 -0000      1.56
  @@ -898,35 +898,7 @@
   
               attr->setSpecified(oneAttrib->getSpecified());
   
  -            XMLAttDef *attDef = 0;
  -            if(defAttrs != 0)
  -                attDef = defAttrs->findAttDef(attrURIId, oneAttrib->getQName());
  -
  -            if(attDef != 0) {
  -                attr->setTypeInfo(attDef->getDOMTypeInfoName(), 
attDef->getDOMTypeInfoUri());
  -                attDef->reset();
  -            }
  -            else {
  -                const XMLCh *name = oneAttrib->getName();
  -                if (XMLString::equals(oneAttrib->getPrefix(), XSI)) {
  -                    if(XMLString::equals(name, SchemaSymbols::fgXSI_TYPE)) {
  -                        attr->setTypeInfo(SchemaSymbols::fgDT_QNAME, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  -                    }
  -                    else if(XMLString::equals(name, SchemaSymbols::fgATT_NILL)) {
  -                        attr->setTypeInfo(SchemaSymbols::fgDT_BOOLEAN, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  -                    }
  -                    else if(XMLString::equals(name, 
SchemaSymbols::fgXSI_NONAMESPACESCHEMALOCACTION)) {
  -                        attr->setTypeInfo(SchemaSymbols::fgDT_ANYURI, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  -                    }
  -                }
  -                else if(foundXMLNS || XMLString::equals(oneAttrib->getPrefix(), 
XMLUni::fgXMLNSString)){
  -                    //for normal ns attrs
  -                    attr->setTypeInfo(SchemaSymbols::fgDT_ANYURI, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  -                }
  -                else {
  -                    attr->setTypeInfo(SchemaSymbols::fgDT_ANYSIMPLETYPE, 
SchemaSymbols::fgURI_SCHEMAFORSCHEMA);
  -                }
  -            }
  +            attr->setTypeInfo(oneAttrib->getValidatingTypeName(), 
oneAttrib->getValidatingTypeURI());
           }
       }
       else {    //DOM Level 1
  @@ -954,14 +926,7 @@
                   attr->fNode.isIdAttr(true);
               }
   
  -            XMLAttDef *attDef = 0;
  -            if(defAttrs != 0)
  -                attDef = defAttrs->findAttDef(oneAttrib -> getURIId(), 
oneAttrib->getQName());
  -
  -            if(attDef != 0) {
  -                attr->setTypeInfo(attDef->getDOMTypeInfoName(), 
attDef->getDOMTypeInfoUri());
  -                attDef->reset();
  -            }
  +            attr->setTypeInfo(oneAttrib->getValidatingTypeName(), 
oneAttrib->getValidatingTypeURI());
   
           }
       }
  @@ -1033,6 +998,7 @@
                       }
                   }
   
  +                // REVISIT:  this won't work in multithreaded code...
                   insertAttr->setTypeInfo(attr->getDOMTypeInfoName(), 
attr->getDOMTypeInfoUri());
   
               }
  
  
  

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

Reply via email to