fixes master schema building

Pulls the xml "define" name straight from the actual rng file - how it should have been done before. fixes #560.