You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by pe...@apache.org on 2001/08/10 18:21:19 UTC
cvs commit: xml-xerces/c/src/validators/datatype AnyURIDatatypeValidator.hpp AnyURIDatatypeValidator.cpp
peiyongz 01/08/10 09:21:19
Modified: c/src/validators/datatype AnyURIDatatypeValidator.hpp
AnyURIDatatypeValidator.cpp
Log:
use XMLUri instead of XMLURL
Revision Changes Path
1.2 +9 -11 xml-xerces/c/src/validators/datatype/AnyURIDatatypeValidator.hpp
Index: AnyURIDatatypeValidator.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/datatype/AnyURIDatatypeValidator.hpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AnyURIDatatypeValidator.hpp 2001/08/01 18:49:16 1.1
+++ AnyURIDatatypeValidator.hpp 2001/08/10 16:21:19 1.2
@@ -55,8 +55,11 @@
*/
/*
- * $Id: AnyURIDatatypeValidator.hpp,v 1.1 2001/08/01 18:49:16 peiyongz Exp $
+ * $Id: AnyURIDatatypeValidator.hpp,v 1.2 2001/08/10 16:21:19 peiyongz Exp $
* $Log: AnyURIDatatypeValidator.hpp,v $
+ * Revision 1.2 2001/08/10 16:21:19 peiyongz
+ * use XMLUri instead of XMLURL
+ *
* Revision 1.1 2001/08/01 18:49:16 peiyongz
* AnyRUIDatatypeValidator
*
@@ -69,7 +72,7 @@
#include <validators/datatype/DatatypeValidator.hpp>
#include <validators/schema/SchemaSymbols.hpp>
#include <util/RefVectorOf.hpp>
-#include <util/XMLURL.hpp>
+#include <util/XMLUri.hpp>
class VALIDATORS_EXPORT AnyURIDatatypeValidator : public DatatypeValidator
{
@@ -182,8 +185,8 @@
// -----------------------------------------------------------------------
// Private data members
//
- // fTempURL
- //
+ // fTempURI
+ // to support relative URI, such as the urispec= "\sample"
//
// -----------------------------------------------------------------------
int fLength;
@@ -192,7 +195,7 @@
bool fEnumerationInherited;
RefVectorOf<XMLCh>* fEnumeration;
- XMLURL *fTempURI; //use XMLURL instead of XMLURI for the moment
+ XMLUri *fTempURI;
};
@@ -214,11 +217,6 @@
{
cleanUp();
}
-
-// -----------------------------------------------------------------------
-// Getter methods
-// -----------------------------------------------------------------------
-
// -----------------------------------------------------------------------
// Compare methods
1.2 +20 -19 xml-xerces/c/src/validators/datatype/AnyURIDatatypeValidator.cpp
Index: AnyURIDatatypeValidator.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/validators/datatype/AnyURIDatatypeValidator.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- AnyURIDatatypeValidator.cpp 2001/08/01 18:49:16 1.1
+++ AnyURIDatatypeValidator.cpp 2001/08/10 16:21:19 1.2
@@ -55,8 +55,11 @@
*/
/*
- * $Id: AnyURIDatatypeValidator.cpp,v 1.1 2001/08/01 18:49:16 peiyongz Exp $
+ * $Id: AnyURIDatatypeValidator.cpp,v 1.2 2001/08/10 16:21:19 peiyongz Exp $
* $Log: AnyURIDatatypeValidator.cpp,v $
+ * Revision 1.2 2001/08/10 16:21:19 peiyongz
+ * use XMLUri instead of XMLURL
+ *
* Revision 1.1 2001/08/01 18:49:16 peiyongz
* AnyRUIDatatypeValidator
*
@@ -75,6 +78,18 @@
static XMLCh value1[BUF_LEN+1];
static XMLCh value2[BUF_LEN+1];
+//http://www.template.com
+//
+static const XMLCh BASE_URI[] =
+{
+ chLatin_h, chLatin_t, chLatin_t, chLatin_p,
+ chColon, chForwardSlash, chForwardSlash,
+ chLatin_w, chLatin_w, chLatin_w, chPeriod,
+ chLatin_t, chLatin_e, chLatin_m, chLatin_p, chLatin_l,
+ chLatin_a, chLatin_t, chLatin_e, chPeriod,
+ chLatin_c, chLatin_o, chLatin_m, chNull
+};
+
// ---------------------------------------------------------------------------
// Constructors and Destructor
// ---------------------------------------------------------------------------
@@ -493,8 +508,6 @@
void AnyURIDatatypeValidator::checkContent( const XMLCh* const content, bool asBase)
{
- char* p=XMLString::transcode(content);
-
//validate against base validator if any
AnyURIDatatypeValidator *pBaseValidator = (AnyURIDatatypeValidator*) this->getBaseValidator();
if (pBaseValidator !=0)
@@ -585,13 +598,10 @@
}
// check 3.2.17.c0 must: URI (rfc 2396/2723)
- XMLURL *newURI;
-
-#ifdef REVISIT
try
{
if (!fTempURI)
- fTempURI = new XMLURL("http://www.template.com");
+ fTempURI = new XMLUri(BASE_URI);
// Support for relative URLs
// According to Java 1.1: URLs may also be specified with a
@@ -599,25 +609,16 @@
//
if (strLen)
{
- newURI = new XMLURL(*fTempURI, content );
+ XMLUri *newURI = new XMLUri(fTempURI, content );
delete newURI;
}
}
-#endif
- try
- {
- if (strLen)
- {
- newURI = new XMLURL(content );
- delete newURI;
- }
- }
catch (...)
{
ThrowXML1(InvalidDatatypeValueException, XMLExcepts::VALUE_NotIn_Enumeration, content);
//("Value '"+content+"' is a Malformed URI ");
}
-
+
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org