Reference implementation of package dom