1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
libxml2/result/undeclared-entity.xml.sax2
Nick Wellnhofer 45fe9924f0 parser: Don't create reference in xmlLookupGeneralEntity
This should only be done in xmlParseReference.

The handling of undeclared entities is still somewhat inconsistent. In
element content we create references even if entity substitution is
enabled. In attribute values undeclared entities are always ignored.
2024-04-23 18:36:15 +02:00

25 lines
699 B
Plaintext

SAX.setDocumentLocator()
SAX.startDocument()
SAX.comment( Having an external DTD makes undeclared entities a warning. )
SAX.internalSubset(doc, , foo)
SAX.externalSubset(doc, , foo)
SAX.startElementNs(doc, NULL, NULL, 0, 0, 0)
SAX.characters(
, 5)
SAX.getEntity(undeclared)
SAX.warning: Entity 'undeclared' not defined
SAX.startElementNs(elem, NULL, NULL, 0, 1, 0, attr='"/>
...', 0)
SAX.endElementNs(elem, NULL, NULL)
SAX.characters(
, 5)
SAX.startElementNs(elem, NULL, NULL, 0, 0, 0)
SAX.getEntity(undeclared)
SAX.warning: Entity 'undeclared' not defined
SAX.reference(undeclared)
SAX.endElementNs(elem, NULL, NULL)
SAX.characters(
, 1)
SAX.endElementNs(doc, NULL, NULL)
SAX.endDocument()