[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: svn commit: r1517488 [3/3] - in /xerces/c/trunk: projects/Win32/VC10/xerces-all/ src/xercesc/interna
From: amassari () apache ! org
Date: 2013-08-26 10:33:27
Message-ID: 20130826103328.72B422388B34 () eris ! apache ! org
[Download RAW message or body]
Modified: xerces/c/trunk/src/xercesc/util/XMLChar.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLChar.hpp?rev=1517488&r1=1517487&r2=1517488&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLChar.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLChar.hpp Mon Aug 26 10:33:26 2013
@@ -162,6 +162,11 @@ inline bool XMLChar1_0::isFirstNameChar(
{
if (!toCheck2)
return ((fgCharCharsTable1_0[toCheck] & gFirstNameCharMask) != 0);
+ else {
+ if ((toCheck >= 0xD800) && (toCheck <= 0xDB7F))
+ if ((toCheck2 >= 0xDC00) && (toCheck2 <= 0xDFFF))
+ return true;
+ }
return false;
}
@@ -170,7 +175,11 @@ inline bool XMLChar1_0::isFirstNCNameCha
if (!toCheck2) {
return (((fgCharCharsTable1_0[toCheck] & gFirstNameCharMask) != 0) && \
(toCheck != chColon)); }
-
+ else {
+ if ((toCheck >= 0xD800) && (toCheck <= 0xDB7F))
+ if ((toCheck2 >= 0xDC00) && (toCheck2 <= 0xDFFF))
+ return true;
+ }
return false;
}
@@ -178,6 +187,11 @@ inline bool XMLChar1_0::isNameChar(const
{
if (!toCheck2)
return ((fgCharCharsTable1_0[toCheck] & gNameCharMask) != 0);
+ else {
+ if ((toCheck >= 0xD800) && (toCheck <= 0xDB7F))
+ if ((toCheck2 >= 0xDC00) && (toCheck2 <= 0xDFFF))
+ return true;
+ }
return false;
}
@@ -185,6 +199,11 @@ inline bool XMLChar1_0::isNCNameChar(con
{
if (!toCheck2)
return ((fgCharCharsTable1_0[toCheck] & gNCNameCharMask) != 0);
+ else {
+ if ((toCheck >= 0xD800) && (toCheck <= 0xDB7F))
+ if ((toCheck2 >= 0xDC00) && (toCheck2 <= 0xDFFF))
+ return true;
+ }
return false;
}
Modified: xerces/c/trunk/src/xercesc/util/XMLUni.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLUni.cpp?rev=1517488&r1=1517487&r2=1517488&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUni.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUni.cpp Mon Aug 26 10:33:26 2013
@@ -316,6 +316,11 @@ const XMLCh XMLUni::fgStandaloneString[]
chLatin_s, chLatin_t, chLatin_a, chLatin_n, chLatin_d, chLatin_a, chLatin_l, \
chLatin_o, chLatin_n, chLatin_e, chNull };
+const XMLCh XMLUni::fgVersion1[] =
+{
+ chDigit_1, chPeriod, chNull
+};
+
const XMLCh XMLUni::fgVersion1_0[] =
{
chDigit_1, chPeriod, chDigit_0, chNull
Modified: xerces/c/trunk/src/xercesc/util/XMLUni.hpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/XMLUni.hpp?rev=1517488&r1=1517487&r2=1517488&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/XMLUni.hpp (original)
+++ xerces/c/trunk/src/xercesc/util/XMLUni.hpp Mon Aug 26 10:33:26 2013
@@ -98,6 +98,7 @@ public :
static const XMLCh fgRefString[];
static const XMLCh fgRequiredString[];
static const XMLCh fgStandaloneString[];
+ static const XMLCh fgVersion1[];
static const XMLCh fgVersion1_0[];
static const XMLCh fgVersion1_1[];
static const XMLCh fgSysIDString[];
Modified: xerces/c/trunk/src/xercesc/validators/DTD/DTDValidator.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/validators/DTD/DTDValidator.cpp?rev=1517488&r1=1517487&r2=1517488&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/validators/DTD/DTDValidator.cpp (original)
+++ xerces/c/trunk/src/xercesc/validators/DTD/DTDValidator.cpp Mon Aug 26 10:33:26 \
2013 @@ -137,6 +137,7 @@ DTDValidator::validateAttrValue(const
const XMLCh* const valueText = attDef->getValue();
const XMLCh* const fullName = attDef->getFullName();
const XMLCh* const enumList = attDef->getEnumeration();
+ const bool isExternal = attDef->isExternal();
//
// If the default type is fixed, then make sure the passed value maps
@@ -222,6 +223,14 @@ DTDValidator::validateAttrValue(const
pszTmpVal = janTmpVal.get();
}
+ // if the type is an enumeration, normalize it, unless standalone = yes is \
specified + // "The standalone document declaration MUST have the value "no" if \
any external markup declarations contain declarations of: + // - ...
+ // - attributes with tokenized types, where the attribute appears in the \
document with a value such that normalization will + // produce a different \
value from that which would be produced in the absence of the declaration" + if \
(multipleValues && (!isExternal || !getScanner()->getStandalone())) + \
XMLString::collapseWS(pszTmpVal, getScanner()->getMemoryManager()); +
XMLCh* valPtr = pszTmpVal;
bool doNamespace = getScanner()->getDoNamespaces();
Modified: xerces/c/trunk/tests/src/XSTSHarness/XMLHarnessHandlers.cpp
URL: http://svn.apache.org/viewvc/xerces/c/trunk/tests/src/XSTSHarness/XMLHarnessHandlers.cpp?rev=1517488&r1=1517487&r2=1517488&view=diff
==============================================================================
--- xerces/c/trunk/tests/src/XSTSHarness/XMLHarnessHandlers.cpp (original)
+++ xerces/c/trunk/tests/src/XSTSHarness/XMLHarnessHandlers.cpp Mon Aug 26 10:33:26 \
2013 @@ -62,6 +62,9 @@ static XMLCh szError[]={ chLatin_e, chLa
static XMLCh szBase[]={ chLatin_x, chLatin_m, chLatin_l, chColon, chLatin_b, \
chLatin_a, chLatin_s, chLatin_e, chNull }; static XMLCh szNamespace[]={ chLatin_N, \
chLatin_A, chLatin_M, chLatin_E, chLatin_S, chLatin_P, chLatin_A, chLatin_C, \
chLatin_E, chNull }; static XMLCh szNO[]={ chLatin_n, chLatin_o, chNull };
+static XMLCh szVersion[] = { chLatin_V, chLatin_E, chLatin_R, chLatin_S, chLatin_I, \
chLatin_O, chLatin_N, chNull }; +static XMLCh szEdition[] = { chLatin_E, chLatin_D, \
chLatin_I, chLatin_T, chLatin_I, chLatin_O, chLatin_N, chNull }; +static XMLCh \
szFive[]={ chDigit_5, chNull };
// ---------------------------------------------------------------------------
// XMLHarnessHandlers: Implementation of the SAX DocumentHandler interface
@@ -86,6 +89,27 @@ void XMLHarnessHandlers::startElement(co
{
const XMLCh* useNS=attrs.getValue(szNamespace);
const XMLCh* testName=attrs.getValue(szID);
+ const XMLCh* version=attrs.getValue(szVersion);
+ if(version == NULL || XMLString::equals(version, XMLUni::fgVersion1_0))
+ {
+ const XMLCh* editions=attrs.getValue(szEdition);
+ // skip tests that don't apply to v.1.0 5th Edition
+ if(editions)
+ {
+ BaseRefVectorOf<XMLCh>* tokens = \
XMLString::tokenizeString(editions); + bool appliesTo5 = false;
+ for (XMLSize_t i = 0; i < tokens->size(); i++) {
+ if (XMLString::equals(tokens->elementAt(i), szFive)) {
+ appliesTo5 = true;
+ break;
+ }
+ }
+ delete tokens;
+ if(!appliesTo5)
+ return;
+ }
+ }
+
XMLURL testSet;
testSet.setURL(*fTestBaseURL.peek(), attrs.getValue(szURI));
bool success=true, fatalFailure=false;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic