Orion,
There has been basically no work done on this file in ages. I would consider it more a 'proof of concept' than a finished product. However, changing it to scrub names should not be overly difficult if you need a schema file generated.
-
Look for the {@name} uses in the transform file. They will all be in xsOut: tags. There may be a couple of other names used other ways (parentName), but they all come from @name attributes.
-
Decorate these with a function. The easiest call is to simply remove the spaces, giving you {translate(@name,' ', '')}
-
If you want to get more robust, try using an extension function like the following to allow {fn:EncodeLocalName(@name)}, or a combination like {fn:EncodeLocalName(translate(@name,' ', '_'))}
<msxsl:script implements-prefix="fn" language="CSharp">
<![CDATA[
public static string EncodeLocalName(string value)
{
return System.Xml.XmlConvert.EncodeLocalName(value);
}
]]>
</msxsl:script>
The 'fn' prefix can be bound to any namespace you like on the root element (xmlns:fn="local:functions"), and should be listed in the extension-element-prefixes list on the first element.
Let me know if you can get it working.
-Matt