knoaman     2004/11/25 09:03:19

  Modified:    c/src/xercesc/validators/schema TraverseSchema.cpp
  Log:
  Fix for synthetic annotation generation on 'extension' element of 
simpleContent
  
  Revision  Changes    Path
  1.126     +15 -15    
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.125
  retrieving revision 1.126
  diff -u -r1.125 -r1.126
  --- TraverseSchema.cpp        18 Nov 2004 16:20:06 -0000      1.125
  +++ TraverseSchema.cpp        25 Nov 2004 17:03:18 -0000      1.126
  @@ -3469,6 +3469,20 @@
           throw TraverseSchema::InvalidComplexTypeInfo;
       }
   
  +    //Skip over any annotations in the restriction or extension elements
  +    DOMElement* content = checkContent(simpleContent, 
XUtil::getFirstChildElement(simpleContent), true);
  +    if (fScanner->getGenerateSyntheticAnnotations() && !fAnnotation && 
fNonXSAttList->size())
  +    {
  +        fAnnotation = generateSyntheticAnnotation(simpleContent, 
fNonXSAttList);        
  +    }
  +    if (fAnnotation)
  +    {
  +        if (janAnnot->isDataNull())
  +            janAnnot->reset(fAnnotation);
  +        else
  +            janAnnot->get()->setNext(fAnnotation);
  +    }
  +
       // 
-----------------------------------------------------------------------
       // Handle the base type name
       // 
-----------------------------------------------------------------------
  @@ -3542,20 +3556,6 @@
       // 
-----------------------------------------------------------------------
       // Process the content of the derivation
       // 
-----------------------------------------------------------------------
  -    //Skip over any annotations in the restriction or extension elements
  -    DOMElement* content = checkContent(simpleContent, 
XUtil::getFirstChildElement(simpleContent), true);
  -    if (fScanner->getGenerateSyntheticAnnotations() && !fAnnotation && 
fNonXSAttList->size())
  -    {
  -        fAnnotation = generateSyntheticAnnotation(simpleContent, 
fNonXSAttList);        
  -    }
  -    if (fAnnotation)
  -    {
  -        if (janAnnot->isDataNull())
  -            janAnnot->reset(fAnnotation);
  -        else
  -            janAnnot->get()->setNext(fAnnotation);
  -    }
  -
       if (typeInfo->getDerivedBy() == SchemaSymbols::XSD_RESTRICTION) {
   
           //Schema Spec: 5.11: Complex Type Definition Properties Correct: 2
  
  
  

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

Reply via email to