pub fn parse_external_subset(input: &[u8], opts: &ParseOptions) -> Result<Dtd>Expand description
Parse a standalone external DTD subset into a Dtd.
input is the raw bytes of a DTD — the markup declarations a .dtd
file (or an etree.DTD(...) source) contains, with no surrounding
document or <!DOCTYPE> wrapper. Conditional sections and
top-level parameter-entity references are permitted, per the XML 1.0
§ 2.8 external-subset grammar (the internal subset forbids both).
Returns the captured declarations. A fatal malformation returns
Err; recoverable issues are tolerated (a non-validating DTD parse
is best-effort, matching libxml2’s xmlParseDTD).