1. String interning is a bad idea in most cases. QName calls intern on constants (what is a no-op), namespace URIs, local parts and prefixes This can easily eat up VM memory in sever applications.
2. As long as QName is not a class that is responsible to clean up program input there should probably be no trim(). This holds even more since trim() will only clean up leading and trailing withespace bot neither non-URIc input nor input that does not conform to the NCName production.
3. Please consider to remove prefix and it's semantics from groovy.xml.QName. Prefixes in QName classes have a long history of pain