How can I set different output file name and namespace for the generated code?
How it works now:
xscgen ./myXsd.xsd -n MyNameSpace -t --output=./
Creates a file named MyNamespace and contain MyNamespace namespace
How it can be work:
xscgen ./myXsd.xsd -n MyNameSpace -t --output=./ --filename=myFileName
Creates a file named myFileName and contain MyNamespace namespace
I'm hesitant to consider this as it would mean you would have to be able to provide a mapping from C# namespace names to file names. It's complicated enough already with the mappings from XML namespaces to C# namespaces.
If you want to customize further, you can always use the library and create your custom OutputWriter implementation.
Thank you for your response . I understand that I can override many things in the code, I just wanted to clarify if there is no way to get a specific name for the output file, and a different value for the namespace of that file out of the box.
If this would be useful functionality for the project, I could try to expand the functionality and send a PR
Keep in mind that if there's more than one C# namespace there would have to be a way to configure the mapping between C# namespaces and files. I doubt that this feature will be useful for many users.
Thank you very much for offering to contribute, though. I think your effort would be better spent in fixing other open issues labeled "help wanted".