Hi, there,
The current XML4C ACCEPTS the test case (shown below) and therefore FAILS
on validity constraint: Standalone document declaration.
Validity constraint: Standalone Document Declaration
The standalone document declaration must have the value "no"
if any external markup declarations contain declarations of:
attributes with default values, if elements to which
these attributes apply appear in the document without specifications of
values for these
attributes, or
Test case:
case1.xml
<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE animal SYSTEM "case1.dtd" [
<!ELEMENT animal EMPTY>
]>
<animal/>
case1.dtd (version a)
<!ATTLIST animal color CDATA #FIXED "yellow">
case1.dtd(version b)
<!ATTLIST animal color CDATA "yellow">
A fix is made to both XMLScanner.cpp and XMLScanner2.cpp.
Index: XMLScanner.cpp
===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/internal/XMLScanner.cpp,v
retrieving revision 1.29
diff -w -r1.29 XMLScanner.cpp
2521c2521,2522
< else if (defType == XMLAttDef::Default)
---
> else if ((defType == XMLAttDef::Default) ||
> (defType == XMLAttDef::Fixed) )
Index: XMLScanner2.cpp
===================================================================
RCS file: /home/cvspublic/xml-xerces/c/src/internal/XMLScanner2.cpp,v
retrieving revision 1.21
diff -w -r1.21 XMLScanner2.cpp
418a419,431
> 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());
>
> }
> }
Regards,
Peiyong Zhang
____________________________________________
XML Parsers Development
IBM Toronto Laboratory email: [EMAIL PROTECTED]
Phone: (416)448-4088; Fax: (416)448-4414; T/L: 778-4088
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]