Hi,

I've passes a whole load of conformnces test files to Xerces (just extracted 
from CVS today).

A set of test files pass which should fail and which James Clark's detects ate 
failures:

I'd just like to know if the following is a known problem or if there was a 
reason for this Xerces behaviour. If this is a problem then I will need to look 
under the hood of Xerces and figure out where to put in a fix.

The XML standard in Section 2.9 states the following validity constraint:
"The standalone document declaration must have the value "no" if any external 
markup declarations contain declaration of:
....

element types with element content, if white space occurs directly within any 
instance of those types."

The following XML file should not be validated, but is thought to be valid by 
Xerces:

<?xml version='1.0' standalone='yes'?>

<!DOCTYPE root SYSTEM "../valid/sa.dtd">
    
<root>
    <child>
    The whitespace before and after this element keeps
    this from being standalone.
    </child>
</root>


The DTD is as follows:
    <!ELEMENT child (#PCDATA)>
    <!ELEMENT attributes EMPTY>

    <!--
        2.9 gives validity constraints applying to attributes
        in standalone docs:  no external defaults or decls
        causing normalization.

        3.3.3 describes the normalization rules
    -->

    <!ATTLIST attributes
        token           (a|b|c)         "a"
        notation        (nonce|foo|bar) #IMPLIED
        nmtoken         NMTOKEN         #IMPLIED
        nmtokens        NMTOKENS        #IMPLIED
        id              ID              #IMPLIED
        idref           IDREF           #IMPLIED
        idrefs          IDREFS          #IMPLIED
        entity          ENTITY          #IMPLIED
        entities        ENTITIES        #IMPLIED
        cdata           CDATA           #IMPLIED
        >
    
    <!-- this needs normalization when used as an ID -->
    <!ENTITY internal   " internal&number; ">
    <!ENTITY number     "42">

    <!NOTATION nonce    SYSTEM "file:/dev/null">
    <!NOTATION foo      PUBLIC "-//public id//foo" "file:/dev/null">
    <!NOTATION bar      SYSTEM "file:/dev/tty">

    <!ENTITY unparsed-1 PUBLIC "-//some public//ID" "file:/dev/console"
                        NDATA nonce>
    <!ENTITY unparsed-2 SYSTEM "scheme://host/data"
                        NDATA foo>

  • Re: Co... Sean MacRoibeaird - Sun ireland - Solaris Software - Staff Engineer
    • R... Sean MacRoibeaird - Sun ireland - Solaris Software - Staff Engineer
      • ... Mike Pogue

Reply via email to