You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2004/04/02 18:51:46 UTC
cvs commit: xml-xerces/c/src/xercesc/validators/schema TraverseSchema.cpp
peiyongz 2004/04/02 08:51:46
Modified: c/src/xercesc/validators/schema TraverseSchema.cpp
Log:
Better error report support in XSAnnotation
Revision Changes Path
1.112 +16 -3 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.111
retrieving revision 1.112
diff -u -r1.111 -r1.112
--- TraverseSchema.cpp 13 Feb 2004 14:16:00 -0000 1.111
+++ TraverseSchema.cpp 2 Apr 2004 16:51:45 -0000 1.112
@@ -496,6 +496,8 @@
if (contents)
{
+ XSAnnotation* theAnnotation = 0;
+
unsigned int nonXSAttSize = nonXSAttList->size();
if (nonXSAttSize)
@@ -533,12 +535,23 @@
// add remaining annotation content
fBuffer.append(contents + annotTokenStart + 10);
- return new (fGrammarPoolMemoryManager) XSAnnotation(fBuffer.getRawBuffer(), fGrammarPoolMemoryManager);
+ theAnnotation = new (fGrammarPoolMemoryManager) XSAnnotation(fBuffer.getRawBuffer(), fGrammarPoolMemoryManager);
}
else
{
- return new (fGrammarPoolMemoryManager) XSAnnotation(contents, fGrammarPoolMemoryManager);
+ theAnnotation = new (fGrammarPoolMemoryManager) XSAnnotation(contents, fGrammarPoolMemoryManager);
}
+
+ /***
+ * set line, col and systemId info
+ ***/
+ theAnnotation->setLineCol(
+ ((XSDElementNSImpl*)annotationElem)->getLineNo()
+ , ((XSDElementNSImpl*)annotationElem)->getColumnNo()
+ );
+ theAnnotation->setSystemId(fSchemaInfo->getCurrentSchemaURL());
+
+ return theAnnotation;
}
return 0;
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org