fix DTD-API iteration of attributes in internal/external subset DTDs