Test case inv-not-sa02: com.jclark.xml.sax.SAX2Driver Failed

Test case inv-not-sa02: com.jclark.xml.sax.SAX2Driver Failed

Tests the Standalone Document Declaration VC, ensuring that attributes needing normalization cause a validity error.

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

<!DOCTYPE attributes SYSTEM "../valid/sa.dtd" [
    <!ENTITY internal " number99">
]>

    <!-- sync with ../valid/not-sa02.xml -->

    <!--
	LOTS of normalized/defaulted attributes
	keep this from being standalone

	XXX not the best of tests!!
	... each type of normalization/defaulting
	needs separate testing
    -->

<attributes
    notation =	" nonce "
    nmtoken =	" this-gets-normalized "
    nmtokens =	" this&#x0d;&#x0a; also	 gets&#x20; normalized "
    id =	"	&internal; "
    idref =	" &internal;
    "
    idrefs =	" &internal;  &internal;    &internal;"
    entity =	" unparsed-1 "
    entities =	"unparsed-1
    unparsed-2		
"
    cdata =	"nothing happens to this one!"
    />
Expected resultActual result for com.jclark.xml.sax.SAX2Driver
<?xml version="1.0" encoding="UTF-8"?>
<ConformanceResults>
    <startDocument/>
    <resolveEntity>
        <systemID>file:/home/elharo/SAXTest/xmlconf/sun/valid/sa.dtd</systemID>
    </resolveEntity>
    <notation>
        <name>bar</name>
        <systemID>file:/dev/tty</systemID>
    </notation>
    <notation>
        <name>foo</name>
        <publicID>-//public id//foo</publicID>
        <systemID>file:/dev/null</systemID>
    </notation>
    <notation>
        <name>nonce</name>
        <systemID>file:/dev/null</systemID>
    </notation>
    <unparsedEntity>
        <name>unparsed-1</name>
        <publicID>-//some public//ID</publicID>
        <systemID>file:/dev/console</systemID>
        <notation>nonce</notation>
    </unparsedEntity>
    <unparsedEntity>
        <name>unparsed-2</name>
        <systemID>scheme://host/data</systemID>
        <notation>foo</notation>
    </unparsedEntity>
    <startElement>
        <namespaceURI/>
        <localName>attributes</localName>
        <qualifiedName>attributes</qualifiedName>
        <attributes>
            <attribute>
                <namespaceURI/>
                <localName>cdata</localName>
                <qualifiedName>cdata</qualifiedName>
                <value>nothing\shappens\sto\sthis\sone!</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>entities</localName>
                <qualifiedName>entities</qualifiedName>
                <value>unparsed-1\sunparsed-2</value>
                <type>ENTITIES</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>entity</localName>
                <qualifiedName>entity</qualifiedName>
                <value>unparsed-1</value>
                <type>ENTITY</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>id</localName>
                <qualifiedName>id</qualifiedName>
                <value>number99</value>
                <type>ID</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>idref</localName>
                <qualifiedName>idref</qualifiedName>
                <value>number99</value>
                <type>IDREF</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>idrefs</localName>
                <qualifiedName>idrefs</qualifiedName>
                <value>number99\snumber99\snumber99</value>
                <type>IDREFS</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>nmtoken</localName>
                <qualifiedName>nmtoken</qualifiedName>
                <value>this-gets-normalized</value>
                <type>NMTOKEN</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>nmtokens</localName>
                <qualifiedName>nmtokens</qualifiedName>
                <value>this\r\n\salso\sgets\snormalized</value>
                <type>NMTOKENS</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>notation</localName>
                <qualifiedName>notation</qualifiedName>
                <value>nonce</value>
                <type>NMTOKEN</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>token</localName>
                <qualifiedName>token</qualifiedName>
                <value>a</value>
                <type>NMTOKEN</type>
            </attribute>
        </attributes>
    </startElement>
    <endElement>
        <namespaceURI/>
        <localName>attributes</localName>
        <qualifiedName>attributes</qualifiedName>
    </endElement>
    <endDocument/>
</ConformanceResults>
<?xml version="1.0" encoding="UTF-8"?>
<ConformanceResults>
    <startDocument/>
    <startElement>
        <namespaceURI/>
        <localName>attributes</localName>
        <qualifiedName>attributes</qualifiedName>
        <attributes>
            <attribute>
                <namespaceURI/>
                <localName>cdata</localName>
                <qualifiedName>cdata</qualifiedName>
                <value>nothing\shappens\sto\sthis\sone!</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>entities</localName>
                <qualifiedName>entities</qualifiedName>
                <value>unparsed-1\s\s\s\s\sunparsed-2\s\s\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>entity</localName>
                <qualifiedName>entity</qualifiedName>
                <value>\sunparsed-1\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>id</localName>
                <qualifiedName>id</qualifiedName>
                <value>\s\snumber99\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>idref</localName>
                <qualifiedName>idref</qualifiedName>
                <value>\s\snumber99\s\s\s\s\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>idrefs</localName>
                <qualifiedName>idrefs</qualifiedName>
                <value>\s\snumber99\s\s\snumber99\s\s\s\s\snumber99</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>nmtoken</localName>
                <qualifiedName>nmtoken</qualifiedName>
                <value>\sthis-gets-normalized\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>nmtokens</localName>
                <qualifiedName>nmtokens</qualifiedName>
                <value>\sthis\r\n\salso\s\sgets\s\snormalized\s</value>
                <type>CDATA</type>
            </attribute>
            <attribute>
                <namespaceURI/>
                <localName>notation</localName>
                <qualifiedName>notation</qualifiedName>
                <value>\snonce\s</value>
                <type>CDATA</type>
            </attribute>
        </attributes>
    </startElement>
    <endElement>
        <namespaceURI/>
        <localName>attributes</localName>
        <qualifiedName>attributes</qualifiedName>
    </endElement>
    <endDocument/>
</ConformanceResults>