Test demonstrates the use of the conditonal section IGNORE the will ignore its content from being part of the DTD. The keyword is a parameter-entity reference.
<!DOCTYPE doc SYSTEM "015.ent" [ <!ENTITY % e "IGNORE"> ]> <doc></doc>
| Expected result | Actual result for net.sf.saxon.aelfred.SAXDriver |
|---|---|
<?xml version="1.0" encoding="UTF-8"?>
<ConformanceResults>
<startDocument/>
<resolveEntity>
<systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/not-sa/015.ent</systemID>
</resolveEntity>
<startElement>
<namespaceURI/>
<localName>doc</localName>
<qualifiedName>doc</qualifiedName>
<attributes>
<attribute>
<namespaceURI/>
<localName>a2</localName>
<qualifiedName>a2</qualifiedName>
<value>v2</value>
<type>CDATA</type>
</attribute>
</attributes>
</startElement>
<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/not-sa/015.xml</systemID>
</resolveEntity>
<resolveEntity>
<systemID>file:/home/elharo/SAXTest/xmlconf/xmltest/valid/not-sa/015.ent</systemID>
</resolveEntity>
<startElement>
<namespaceURI/>
<localName>doc</localName>
<qualifiedName>doc</qualifiedName>
<attributes>
<attribute>
<namespaceURI/>
<localName>a2</localName>
<qualifiedName>a2</qualifiedName>
<value>v2</value>
<type>CDATA</type>
</attribute>
</attributes>
</startElement>
<endElement>
<namespaceURI/>
<localName>doc</localName>
<qualifiedName>doc</qualifiedName>
</endElement>
<endDocument/>
</ConformanceResults>
|