XPathSequence constructor
Creates a sequence from an iterable of items.
Implementation
factory([Iterable<XPathItem>? items]) {
if (items == null) return empty;
final list = items is List<XPathItem> ? items : items.toList();
if (list.isEmpty) return empty;
if (list.length == 1) return _XPathSingleSequence(list.first);
return _XPathListSequence(list);
}