What stops you from passing the attributes straight to the filter raw document function here?