From 7e3f1c32d22ab8eb308fed9dc3a866168861dd50 Mon Sep 17 00:00:00 2001
From: Alberto Massari <amassari@apache.org>
Date: Mon, 27 Mar 2006 12:24:31 +0000
Subject: [PATCH] Allow whitespace at the beginning and after the union
 operator in XPath expressions of identity constraints

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@389118 13f79535-47bb-0310-9956-ffa450edef68
---
 src/xercesc/validators/schema/TraverseSchema.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/xercesc/validators/schema/TraverseSchema.cpp b/src/xercesc/validators/schema/TraverseSchema.cpp
index dbbc7d46a..19de44a0d 100644
--- a/src/xercesc/validators/schema/TraverseSchema.cpp
+++ b/src/xercesc/validators/schema/TraverseSchema.cpp
@@ -4404,6 +4404,12 @@ bool TraverseSchema::traverseIdentityConstraint(IdentityConstraint* const ic,
     unsigned int startIndex = 0;
     	
     while (startIndex < xpathLen) {
+        if(XMLChar1_0::isWhitespace(*(xpathExpr+startIndex)))
+        {
+            fBuffer.append(xpathExpr + startIndex, 1);
+            startIndex++;
+            continue;
+        }
 
         if (!XMLString::startsWith(xpathExpr + startIndex, fgForwardSlash)
             && !XMLString::startsWith(xpathExpr + startIndex, fgDot)) {
-- 
GitLab