You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by am...@apache.org on 2009/08/13 16:42:49 UTC
svn commit: r803906 -
/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp
Author: amassari
Date: Thu Aug 13 14:42:49 2009
New Revision: 803906
URL: http://svn.apache.org/viewvc?rev=803906&view=rev
Log:
Name and reference to names should be whitespace collapsed
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/viewvc/xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp?rev=803906&r1=803905&r2=803906&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/schema/TraverseSchema.cpp Thu Aug 13 14:42:49 2009
@@ -1174,7 +1174,7 @@
// ------------------------------------------------------------------
// Process contents
// ------------------------------------------------------------------
- const XMLCh* name = getElementAttValue(childElem,SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(childElem,SchemaSymbols::fgATT_NAME, true);
bool nameEmpty = (!name || !*name);
if (topLevel && nameEmpty) {
@@ -1306,7 +1306,7 @@
NamespaceScopeManager nsMgr(elem, fSchemaInfo, this);
// Get the attributes of the complexType
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
bool isAnonymous = false;
if (!name || !*name) {
@@ -1530,8 +1530,8 @@
NamespaceScopeManager nsMgr(elem, fSchemaInfo, this);
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
- const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
+ const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF, true);
bool nameEmpty = (!name || !*name);
bool refEmpty = (!ref || !*ref);
@@ -1738,8 +1738,8 @@
NamespaceScopeManager nsMgr(elem, fSchemaInfo, this);
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
- const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
+ const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF, true);
bool nameEmpty = (!name || !*name) ? true : false;
bool refEmpty = (!ref || !*ref) ? true : false;
@@ -2230,8 +2230,8 @@
NamespaceScopeManager nsMgr(elem, fSchemaInfo, this);
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
- const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
+ const XMLCh* ref = getElementAttValue(elem, SchemaSymbols::fgATT_REF, true);
bool nameEmpty = (!name || !*name);
bool refEmpty = (!ref || !*ref);
@@ -2632,13 +2632,13 @@
// if local element and ref attribute exists
if (!topLevel)
{
- const XMLCh* refName = getElementAttValue(elem, SchemaSymbols::fgATT_REF);
+ const XMLCh* refName = getElementAttValue(elem, SchemaSymbols::fgATT_REF, true);
if (refName)
return processElementDeclRef(elem, refName);
}
// check for empty name
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
if (!name || !*name)
{
reportSchemaError(elem, XMLUni::fgXMLErrDomain, XMLErrs::NoNameRefElement);
@@ -2782,7 +2782,7 @@
}
// Handle 'type' attribute
- const XMLCh* typeStr = getElementAttValue(elem, SchemaSymbols::fgATT_TYPE);
+ const XMLCh* typeStr = getElementAttValue(elem, SchemaSymbols::fgATT_TYPE, true);
if (typeStr)
{
if (anonymousType)
@@ -2895,7 +2895,7 @@
// -----------------------------------------------------------------------
// Process notation attributes/elements
// -----------------------------------------------------------------------
- const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(elem, SchemaSymbols::fgATT_NAME, true);
bool nameEmpty = (!name || !*name) ? true : false;
if (nameEmpty) {
@@ -3015,7 +3015,7 @@
NamespaceScopeManager nsMgr(contentElem, fSchemaInfo, this);
DatatypeValidator* baseValidator = 0;
- const XMLCh* baseTypeName = getElementAttValue(contentElem, SchemaSymbols::fgATT_ITEMTYPE);
+ const XMLCh* baseTypeName = getElementAttValue(contentElem, SchemaSymbols::fgATT_ITEMTYPE, true);
fAttributeCheck.checkAttributes(
contentElem, GeneralAttributeCheck::E_List, this, false, fNonXSAttList
@@ -4268,7 +4268,7 @@
// -----------------------------------------------------------------------
// Create identity constraint
// -----------------------------------------------------------------------
- const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME, true);
if (!XMLChar1_0::isValidNCName(name, XMLString::stringLen(name))) {
reportSchemaError(icElem, XMLUni::fgXMLErrDomain, XMLErrs::InvalidDeclarationName,
@@ -4329,7 +4329,7 @@
// -----------------------------------------------------------------------
// Create identity constraint
// -----------------------------------------------------------------------
- const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME, true);
if (!XMLChar1_0::isValidNCName(name, XMLString::stringLen(name))) {
reportSchemaError(icElem, XMLUni::fgXMLErrDomain, XMLErrs::InvalidDeclarationName,
@@ -4391,7 +4391,7 @@
// -----------------------------------------------------------------------
// Verify that key reference "refer" attribute is valid
// -----------------------------------------------------------------------
- const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(icElem, SchemaSymbols::fgATT_NAME, true);
const XMLCh* refer = getElementAttValue(icElem, SchemaSymbols::fgATT_REFER, true);
if (!XMLChar1_0::isValidNCName(name, XMLString::stringLen(name))) {
@@ -4691,7 +4691,7 @@
for (; child != 0; child = XUtil::getNextSiblingElement(child)) {
const XMLCh* name = child->getLocalName();
- const XMLCh* typeName = getElementAttValue(child, SchemaSymbols::fgATT_NAME);
+ const XMLCh* typeName = getElementAttValue(child, SchemaSymbols::fgATT_NAME, true);
int fullNameId = 0;
if (typeName) {
@@ -4882,7 +4882,7 @@
, const bool processAnnot)
{
DOMElement* content = contentElem;
- const XMLCh* name = getElementAttValue(rootElem,SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(rootElem,SchemaSymbols::fgATT_NAME, true);
fAnnotation = 0;
Janitor<XSAnnotation> janAnnot(0);
@@ -4962,7 +4962,7 @@
if (!baseValidator) {
- const XMLCh* name = getElementAttValue(content,SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(content,SchemaSymbols::fgATT_NAME, true);
reportSchemaError(content, XMLUni::fgXMLErrDomain, XMLErrs::UnknownSimpleType, name);
}
@@ -4981,7 +4981,7 @@
if (typeNameIndex == -1 || baseTypeInfo == 0) {
- const XMLCh* name = getElementAttValue(content,SchemaSymbols::fgATT_NAME);
+ const XMLCh* name = getElementAttValue(content,SchemaSymbols::fgATT_NAME, true);
reportSchemaError(content, XMLUni::fgXMLErrDomain, XMLErrs::UnknownComplexType, name);
}
@@ -8168,7 +8168,7 @@
}
// if component already redefined skip
- const XMLCh* typeName = getElementAttValue(child, SchemaSymbols::fgATT_NAME);
+ const XMLCh* typeName = getElementAttValue(child, SchemaSymbols::fgATT_NAME, true);
fBuffer.set(fTargetNSURIString);
fBuffer.append(chComma);
@@ -8390,7 +8390,7 @@
if (!XMLString::equals(name, redefineChildComponentName)) {
result += changeRedefineGroup(child, redefineChildComponentName, redefineChildTypeName, redefineNameCounter);
} else {
- const XMLCh* refName = getElementAttValue(child, SchemaSymbols::fgATT_REF);
+ const XMLCh* refName = getElementAttValue(child, SchemaSymbols::fgATT_REF, true);
if (refName && *refName) {
@@ -8442,7 +8442,7 @@
if (XMLString::equals(name, redefineChildComponentName)) {
- const XMLCh* infoItemName = getElementAttValue(child, SchemaSymbols::fgATT_NAME);
+ const XMLCh* infoItemName = getElementAttValue(child, SchemaSymbols::fgATT_NAME, true);
if(!XMLString::equals(infoItemName, redefineChildTypeName)) {
continue;
@@ -8466,7 +8466,7 @@
if (XMLString::equals(redefName, redefineChildComponentName)) {
- const XMLCh* infoItemName = getElementAttValue(redefChild, SchemaSymbols::fgATT_NAME);
+ const XMLCh* infoItemName = getElementAttValue(redefChild, SchemaSymbols::fgATT_NAME, true);
if(!XMLString::equals(infoItemName, redefineChildTypeName)) {
continue;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org