You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ca...@apache.org on 2005/10/12 15:18:56 UTC
svn commit: r314888 -
/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
Author: cargilld
Date: Wed Oct 12 06:18:54 2005
New Revision: 314888
URL: http://svn.apache.org/viewcvs?rev=314888&view=rev
Log:
Annotation bug fixes.
Modified:
xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
Modified: xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
URL: http://svn.apache.org/viewcvs/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp?rev=314888&r1=314887&r2=314888&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp Wed Oct 12 06:18:54 2005
@@ -4527,11 +4527,12 @@
const XMLCh* name = child->getLocalName();
if (XMLString::equals(name, SchemaSymbols::fgELT_ANNOTATION)) {
- fSchemaGrammar->addAnnotation(
- traverseAnnotationDecl(
- child, fSchemaInfo->getNonXSAttList(), true)
- );
- sawAnnotation = true;
+ XSAnnotation* annot = traverseAnnotationDecl(
+ child, fSchemaInfo->getNonXSAttList(), true);
+ if (annot) {
+ fSchemaGrammar->addAnnotation(annot);
+ sawAnnotation = true;
+ }
}
else if (XMLString::equals(name, SchemaSymbols::fgELT_INCLUDE)) {
traverseInclude(child);
@@ -4563,11 +4564,12 @@
}
if (XMLString::equals(name, SchemaSymbols::fgELT_ANNOTATION)) {
- fSchemaGrammar->addAnnotation(
- traverseAnnotationDecl(
- child, fSchemaInfo->getNonXSAttList(), true)
- );
- sawAnnotation = true;
+ XSAnnotation* annot = traverseAnnotationDecl(
+ child, fSchemaInfo->getNonXSAttList(), true);
+ if (annot) {
+ fSchemaGrammar->addAnnotation(annot);
+ sawAnnotation = true;
+ }
}
else if (XMLString::equals(name, SchemaSymbols::fgELT_SIMPLETYPE)) {
@@ -8744,23 +8746,37 @@
XMLCh nextCh = *srcVal;
while (nextCh)
{
- if (nextCh == chDoubleQuote)
- {
- aBuf.append(chAmpersand);
- aBuf.append(XMLUni::fgQuot);
- aBuf.append(chSemiColon);
- }
- else if (nextCh == chCloseAngle)
- {
- aBuf.append(chAmpersand);
- aBuf.append(XMLUni::fgGT);
- aBuf.append(chSemiColon);
- }
- else if (nextCh == chAmpersand)
- {
- aBuf.append(chAmpersand);
- aBuf.append(XMLUni::fgAmp);
- aBuf.append(chSemiColon);
+ if (nextCh <= chOpenAngle) {
+ switch (nextCh) {
+ case chDoubleQuote:
+ aBuf.append(chAmpersand);
+ aBuf.append(XMLUni::fgQuot);
+ aBuf.append(chSemiColon);
+ break;
+ case chSingleQuote:
+ aBuf.append(chAmpersand);
+ aBuf.append(XMLUni::fgApos);
+ aBuf.append(chSemiColon);
+ break;
+ case chCloseAngle:
+ aBuf.append(chAmpersand);
+ aBuf.append(XMLUni::fgGT);
+ aBuf.append(chSemiColon);
+ break;
+ case chOpenAngle:
+ aBuf.append(chAmpersand);
+ aBuf.append(XMLUni::fgLT);
+ aBuf.append(chSemiColon);
+ break;
+ case chAmpersand:
+ aBuf.append(chAmpersand);
+ aBuf.append(XMLUni::fgAmp);
+ aBuf.append(chSemiColon);
+ break;
+ default:
+ aBuf.append(nextCh);
+ break;
+ } // end switch
}
else
aBuf.append(nextCh);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org