I did an initial look at fixing. It is not quite trivial. However my first thought it is to use the RetypingDataStore which already does this sort of transformation. We could add another delegate method called "transformFeatureTypeAttributes()" which mirrors "transformFeatureTypeName()". Then we override and check against the existence of schema.xml or schema.xsd file. If exists, parse it and pull the attributes out, and filter the original feature type attributes.
What are your thoughts on this approach Andrea?