[prev in list] [next in list] [prev in thread] [next in thread]
List: xerces-cvs
Subject: cvs commit: xml-xerces/c/src/internal XMLScanner.cpp XMLScanner2.cpp
From: tng () apache ! org
Date: 2001-03-26 21:49:32
[Download RAW message or body]
tng 01/03/26 13:49:32
Modified: c/src/internal XMLScanner.cpp XMLScanner2.cpp
Log:
When Standalone="yes", it is NOT supposed to accept element
which is defined in external DTD with #FIXED attribute. Fixed by Pei Yong Zhang.
Revision Changes Path
1.30 +4 -3 xml-xerces/c/src/internal/XMLScanner.cpp
Index: XMLScanner.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner.cpp,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- XMLScanner.cpp 2001/03/21 21:56:04 1.29
+++ XMLScanner.cpp 2001/03/26 21:49:31 1.30
@@ -55,7 +55,7 @@
*/
/*
- * $Id: XMLScanner.cpp,v 1.29 2001/03/21 21:56:04 tng Exp $
+ * $Id: XMLScanner.cpp,v 1.30 2001/03/26 21:49:31 tng Exp $
*/
@@ -2518,8 +2518,9 @@
, elemDecl->getFullName()
);
}
- else if (defType == XMLAttDef::Default)
- {
+ else if ((defType == XMLAttDef::Default) ||
+ (defType == XMLAttDef::Fixed) )
+ {
if (fStandalone)
{
//
1.22 +14 -1 xml-xerces/c/src/internal/XMLScanner2.cpp
Index: XMLScanner2.cpp
===================================================================
RCS file: /home/cvs/xml-xerces/c/src/internal/XMLScanner2.cpp,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- XMLScanner2.cpp 2001/03/21 21:56:05 1.21
+++ XMLScanner2.cpp 2001/03/26 21:49:31 1.22
@@ -55,7 +55,7 @@
*/
/*
- * $Id: XMLScanner2.cpp,v 1.21 2001/03/21 21:56:05 tng Exp $
+ * $Id: XMLScanner2.cpp,v 1.22 2001/03/26 21:49:31 tng Exp $
*/
@@ -416,6 +416,19 @@
, curDef.getFullName()
);
}
+ else if ((defType == XMLAttDef::Default) ||
+ (defType == XMLAttDef::Fixed) )
+ {
+ if (fStandalone)
+ {
+ //
+ // XML 1.0 Section 2.9
+ // Document is standalone, so attributes must not be defaulted.
+ //
+ emitError(XMLErrs::BadStandalone, elemDecl.getFullName());
+
+ }
+ }
}
//
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic