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 2003/03/10 16:27:29 UTC
cvs commit: xml-xerces/c/src/xercesc/internal XMLScanner.cpp XMLScanner.hpp
tng 2003/03/10 07:27:29
Modified: c/src/xercesc/internal XMLScanner.cpp XMLScanner.hpp
Log:
XML1.0 Errata E38
Revision Changes Path
1.40 +10 -2 xml-xerces/c/src/xercesc/internal/XMLScanner.cpp
Index: XMLScanner.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLScanner.cpp,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- XMLScanner.cpp 9 Mar 2003 16:38:36 -0000 1.39
+++ XMLScanner.cpp 10 Mar 2003 15:27:28 -0000 1.40
@@ -207,6 +207,7 @@
, fExternalSchemaLocation(0)
, fExternalNoNamespaceSchemaLocation(0)
, fStandardUriConformant(false)
+ , fXMLVersion(XMLReader::XMLV1_0)
{
commonInit();
@@ -262,6 +263,7 @@
, fExternalSchemaLocation(0)
, fExternalNoNamespaceSchemaLocation(0)
, fStandardUriConformant(false)
+ , fXMLVersion(XMLReader::XMLV1_0)
{
commonInit();
@@ -1321,12 +1323,18 @@
{
if (XMLString::equals(rawValue, XMLUni::fgVersion1_1)) {
if (type == Decl_XML) {
+ fXMLVersion = XMLReader::XMLV1_1;
fReaderMgr.setXMLVersion(XMLReader::XMLV1_1);
}
+ else {
+ if (fXMLVersion != XMLReader::XMLV1_1)
+ emitError(XMLErrs::UnsupportedXMLVersion, rawValue);
+ }
}
else if (XMLString::equals(rawValue, XMLUni::fgVersion1_0)) {
if (type == Decl_XML) {
- fReaderMgr.setXMLVersion(XMLReader::XMLV1_0);
+ fXMLVersion = XMLReader::XMLV1_0;
+ fReaderMgr.setXMLVersion(XMLReader::XMLV1_0);
}
}
else
1.18 +13 -0 xml-xerces/c/src/xercesc/internal/XMLScanner.hpp
Index: XMLScanner.hpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/xercesc/internal/XMLScanner.hpp,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- XMLScanner.hpp 7 Mar 2003 18:08:58 -0000 1.17
+++ XMLScanner.hpp 10 Mar 2003 15:27:29 -0000 1.18
@@ -56,6 +56,9 @@
/*
* $Log$
+ * Revision 1.18 2003/03/10 15:27:29 tng
+ * XML1.0 Errata E38
+ *
* Revision 1.17 2003/03/07 18:08:58 tng
* Return a reference instead of void for operator=
*
@@ -451,6 +454,7 @@
bool isUsingCachedGrammarInParse() const;
bool getCalculateSrcOfs() const;
Grammar* getRootGrammar() const;
+ XMLReader::XMLVersion getXMLVersion() const;
// -----------------------------------------------------------------------
// Getter methods
@@ -834,6 +838,9 @@
//
// fStandardUriConformant
// This flag controls whether we force conformant URI
+ //
+ // fXMLVersion
+ // Enum to indicate if the main doc is XML 1.1 or XML 1.0 conformant
// -----------------------------------------------------------------------
bool fStandardUriConformant;
bool fCalculateSrcOfs;
@@ -883,6 +890,7 @@
XMLCh* fRootElemName;
XMLCh* fExternalSchemaLocation;
XMLCh* fExternalNoNamespaceSchemaLocation;
+ XMLReader::XMLVersion fXMLVersion;
private :
// -----------------------------------------------------------------------
@@ -1124,6 +1132,11 @@
inline bool XMLScanner::getStandardUriConformant() const
{
return fStandardUriConformant;
+}
+
+inline XMLReader::XMLVersion XMLScanner::getXMLVersion() const
+{
+ return fXMLVersion;
}
// ---------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org