You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by tn...@apache.org on 2001/10/11 14:07:39 UTC
cvs commit: xml-xerces/c/src/validators/schema SchemaElementDecl.cpp SchemaElementDecl.hpp
tng 01/10/11 05:07:39
Modified: c/src/validators/schema SchemaElementDecl.cpp
SchemaElementDecl.hpp
Log:
Schema: model type should be based on complextypeinfo if exists.
Revision Changes Path
1.16 +13 -1 xml-xerces/c/src/validators/schema/SchemaElementDecl.cpp
Index: SchemaElementDecl.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaElementDecl.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- SchemaElementDecl.cpp 2001/09/14 14:50:22 1.15
+++ SchemaElementDecl.cpp 2001/10/11 12:07:39 1.16
@@ -56,6 +56,9 @@
/*
* $Log: SchemaElementDecl.cpp,v $
+ * Revision 1.16 2001/10/11 12:07:39 tng
+ * Schema: model type should be based on complextypeinfo if exists.
+ *
* Revision 1.15 2001/09/14 14:50:22 tng
* Schema: Fix some wildcard bugs, and some retrieving qualified/unqualified element decl problems.
*
@@ -254,8 +257,17 @@
XMLElementDecl::CharDataOpts SchemaElementDecl::getCharDataOpts() const
{
+ SchemaElementDecl::ModelTypes modelType = fModelType;
+
+ if (fXsiComplexTypeInfo) {
+ modelType = (SchemaElementDecl::ModelTypes) fXsiComplexTypeInfo->getContentType();
+ }
+ else if (fComplexTypeInfo) {
+ modelType = (SchemaElementDecl::ModelTypes) fComplexTypeInfo->getContentType();
+ }
+
XMLElementDecl::CharDataOpts retVal;
- switch(fModelType)
+ switch(modelType)
{
case Children :
retVal = XMLElementDecl::SpacesOk;
1.14 +10 -0 xml-xerces/c/src/validators/schema/SchemaElementDecl.hpp
Index: SchemaElementDecl.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/schema/SchemaElementDecl.hpp,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- SchemaElementDecl.hpp 2001/09/05 20:49:11 1.13
+++ SchemaElementDecl.hpp 2001/10/11 12:07:39 1.14
@@ -56,6 +56,9 @@
/*
* $Log: SchemaElementDecl.hpp,v $
+ * Revision 1.14 2001/10/11 12:07:39 tng
+ * Schema: model type should be based on complextypeinfo if exists.
+ *
* Revision 1.13 2001/09/05 20:49:11 knoaman
* Fix for complexTypes with mixed content model.
*
@@ -340,6 +343,13 @@
// ---------------------------------------------------------------------------
inline SchemaElementDecl::ModelTypes SchemaElementDecl::getModelType() const
{
+ if (fXsiComplexTypeInfo) {
+ return (SchemaElementDecl::ModelTypes) fXsiComplexTypeInfo->getContentType();
+ }
+ else if (fComplexTypeInfo) {
+ return (SchemaElementDecl::ModelTypes) fComplexTypeInfo->getContentType();
+ }
+
return fModelType;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org