knoaman     2003/01/07 07:43:47

  Modified:    c/src/xercesc/internal IGXMLScanner.cpp SGXMLScanner.cpp
               c/src/xercesc/validators/schema TraverseSchema.cpp
  Log:
  Errata E1-22: anyType has process contents of lax.
  
  Revision  Changes    Path
  1.3       +6 -2      xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp
  
  Index: IGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/IGXMLScanner.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IGXMLScanner.cpp  20 Dec 2002 22:09:56 -0000      1.2
  +++ IGXMLScanner.cpp  7 Jan 2003 15:43:47 -0000       1.3
  @@ -1956,6 +1956,8 @@
       ContentLeafNameTypeVector* cv = 0;
       XMLContentModel* cm = 0;
       int currentScope = Grammar::TOP_LEVEL_SCOPE;
  +    bool laxThisOne = false;
  +
       if (!isRoot && fGrammarType == Grammar::SchemaGrammarType) {
           SchemaElementDecl* tempElement = (SchemaElementDecl*) 
fElemStack.topElement()->fThisElement;
           SchemaElementDecl::ModelTypes modelType = tempElement->getModelType();
  @@ -1968,6 +1970,9 @@
               cv = cm->getContentLeafNameTypeVector();
               currentScope = fElemStack.getCurrentScope();
           }
  +        else if (modelType == SchemaElementDecl::Any) {
  +            laxThisOne = true;
  +        }
       }
   
       //  Now, since we might have to update the namespace map for this element,
  @@ -2042,7 +2047,6 @@
   
       //if schema, check if we should lax or skip the validation of this element
       bool parentValidation = fValidate;
  -    bool laxThisOne = false;
       if (cv) {
           QName element(fPrefixBuf.getRawBuffer(), &qnameRawBuf[prefixColonPos + 1], 
uriId);
           // elementDepth will be > 0, as cv is only constructed if element is not
  
  
  
  1.8       +6 -3      xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp
  
  Index: SGXMLScanner.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/SGXMLScanner.cpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- SGXMLScanner.cpp  6 Jan 2003 19:44:57 -0000       1.7
  +++ SGXMLScanner.cpp  7 Jan 2003 15:43:47 -0000       1.8
  @@ -1110,6 +1110,7 @@
       ContentLeafNameTypeVector* cv = 0;
       XMLContentModel* cm = 0;
       int currentScope = Grammar::TOP_LEVEL_SCOPE;
  +    bool laxThisOne = false;
       if (!isRoot) {
   
           SchemaElementDecl* tempElement = (SchemaElementDecl*) 
fElemStack.topElement()->fThisElement;
  @@ -1123,6 +1124,9 @@
               cv = cm->getContentLeafNameTypeVector();
               currentScope = fElemStack.getCurrentScope();
           }
  +        else if (modelType == SchemaElementDecl::Any) {
  +            laxThisOne = true;
  +        }
       }
   
       //  Now, since we might have to update the namespace map for this element,
  @@ -1162,7 +1166,6 @@
   
       //if schema, check if we should lax or skip the validation of this element
       bool parentValidation = fValidate;
  -    bool laxThisOne = false;
       if (cv) {
           QName element(fPrefixBuf.getRawBuffer(), &qnameRawBuf[prefixColonPos + 1], 
uriId);
           // elementDepth will be > 0, as cv is only constructed if element is not
  @@ -1851,7 +1854,7 @@
       fElemStateSize = newSize;
   }
   
  -//  This method is called from scanStartTagNS() to build up the list of
  +//  This method is called from scanStartTag() to build up the list of
   //  XMLAttr objects that will be passed out in the start tag callout. We
   //  get the key/value pairs from the raw scan of explicitly provided attrs,
   //  which have not been normalized. And we get the element declaration from
  
  
  
  1.51      +4 -4      xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp
  
  Index: TraverseSchema.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xerces/c/src/xercesc/validators/schema/TraverseSchema.cpp,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- TraverseSchema.cpp        6 Jan 2003 19:43:49 -0000       1.50
  +++ TraverseSchema.cpp        7 Jan 2003 15:43:47 -0000       1.51
  @@ -2599,7 +2599,7 @@
               elemDecl->setAttWildCard(new SchemaAttDef(XMLUni::fgZeroLenString,
                                                         XMLUni::fgZeroLenString,
                                                         fEmptyNamespaceURI, 
XMLAttDef::Any_Any,
  -                                                      
XMLAttDef::ProcessContents_Strict));
  +                                                      
XMLAttDef::ProcessContents_Lax));
           }
   
           // key/keyref/unique processing
  @@ -5656,7 +5656,7 @@
                                                                        
fEmptyNamespaceURI),
                                                              false);
   
  -        anySpecNode->setType(ContentSpecNode::Any);
  +        anySpecNode->setType(ContentSpecNode::Any_Lax);
           anySpecNode->setMinOccurs(0);
           anySpecNode->setMaxOccurs(SchemaSymbols::UNBOUNDED);
   
  @@ -5995,7 +5995,7 @@
               baseAttWildCard = new SchemaAttDef(XMLUni::fgZeroLenString,
                                                  XMLUni::fgZeroLenString,
                                                  fEmptyNamespaceURI, 
XMLAttDef::Any_Any,
  -                                               XMLAttDef::ProcessContents_Strict);
  +                                               XMLAttDef::ProcessContents_Lax);
               janBaseAttWildCard.reset(baseAttWildCard);
           }
                
  
  
  

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

Reply via email to