1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2024-10-26 12:25:09 +03:00
libxml2/result/issue655.xml.sax2
Nick Wellnhofer 37c6618be5 parser: Rework parsing of attribute and entity values
Don't use a separate function to handle "complex" attributes. Validate
UTF-8 byte sequences without decoding. This should improve performance
considerably when parsing multi-byte UTF-8 sequences.

Use a string buffer to avoid unnecessary allocations and copying when
expanding entities.

Normalize attribute values in a single pass while expanding entities.

Be more lenient in recovery mode.

If no entity substitution was requested, validate entities without
expanding. Fixes #596.

Also fixes #655.
2024-01-02 15:42:03 +01:00

11 lines
320 B
Plaintext

SAX.setDocumentLocator()
SAX.startDocument()
SAX.internalSubset(test, , )
SAX.entityDecl(newline, 1, (null), (null), 
)
SAX.getEntity(newline)
SAX.externalSubset(test, , )
SAX.getEntity(newline)
SAX.startElementNs(test, NULL, NULL, 0, 1, 0, newline='&new...', 9)
SAX.endElementNs(test, NULL, NULL)
SAX.endDocument()