/// The state accumulated while flattening one unit: its queued /// declarations, the import-precedence counter, and the included /// documents' roots. Tree nodes hold their parents weakly, so the /// roots must stay retained until the declarations are parsed or the /// ancestor chain (xmlns declarations, exclusions, aliases in scope) /// silently disappears. struct XSLTUnitCollector { var counter: Int var declarations: [(XSLTTree, String)] = [] var retainedRoots: [XSLTTree] = [] }