Test demonstrates that the content of an element can be empty. In this case the external entity is an empty file.
<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA)> <!ENTITY e SYSTEM "003.ent"> ]> <doc>&e;</doc>
Expected result | Actual result for org.dom4j.io.aelfred.SAXDriver |
---|---|
<?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/ext-sa/003.ent</systemID> </resolveEntity> <endElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> | <?xml version="1.0" encoding="UTF-8"?> <ConformanceResults> <startDocument/> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/ext-sa/003.xml</systemID> </resolveEntity> <startElement> <namespaceURI/> <localName>doc</localName> <qualifiedName>doc</qualifiedName> <attributes/> </startElement> <resolveEntity> <systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/ext-sa/003.ent</systemID> </resolveEntity> <endElement> <namespaceURI/> <localName/> <qualifiedName>doc</qualifiedName> </endElement> <endDocument/> </ConformanceResults> |