cargilld 2004/11/13 10:52:38
Modified: c/src/xercesc/validators/schema TraverseSchema.cpp
Log:
Fix for validate annotations.
Revision Changes Path
1.124 +15 -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.123
retrieving revision 1.124
diff -u -r1.123 -r1.124
--- TraverseSchema.cpp 27 Oct 2004 15:24:22 -0000 1.123
+++ TraverseSchema.cpp 13 Nov 2004 18:52:38 -0000 1.124
@@ -8880,6 +8880,7 @@
MemoryManager *memMgr = fMemoryManager;
RefHashTableOfEnumerator<XSAnnotation> xsAnnotationEnum =
RefHashTableOfEnumerator<XSAnnotation> (fSchemaGrammar->getAnnotations(),
false, memMgr);
XSAnnotation& xsAnnot = xsAnnotationEnum.nextElement();
+ XSAnnotation* nextAnnot;
// create schema grammar
SchemaGrammar *grammar = new (memMgr) SchemaGrammar(memMgr);
@@ -9001,11 +9002,21 @@
scanner->scanDocument(*memBufIS);
- while (xsAnnotationEnum.hasMoreElements())
+ nextAnnot = xsAnnot.getNext();
+
+ while (nextAnnot || xsAnnotationEnum.hasMoreElements())
{
- XSAnnotation& xsAnnot = xsAnnotationEnum.nextElement();
- memBufIS->resetMemBufInputSource((const
XMLByte*)xsAnnot.getAnnotationString()
+ if (nextAnnot) {
+ memBufIS->resetMemBufInputSource((const
XMLByte*)nextAnnot->getAnnotationString()
+ ,
XMLString::stringLen(nextAnnot->getAnnotationString())*sizeof(XMLCh));
+ nextAnnot = nextAnnot->getNext();
+ }
+ else {
+ XSAnnotation& xsAnnot = xsAnnotationEnum.nextElement();
+ memBufIS->resetMemBufInputSource((const
XMLByte*)xsAnnot.getAnnotationString()
,
XMLString::stringLen(xsAnnot.getAnnotationString())*sizeof(XMLCh));
+ nextAnnot = xsAnnot.getNext();
+ }
scanner->scanDocument(*memBufIS);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]