Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

s1kd-newdm --dump-templates #9

Open
enigtique opened this issue Dec 22, 2020 · 3 comments
Open

s1kd-newdm --dump-templates #9

enigtique opened this issue Dec 22, 2020 · 3 comments

Comments

@enigtique
Copy link

When I use this command with -$ 2.3, the generated models do not contain a version number of S1000D and do not match to 2.3 schema.

@kibook
Copy link
Owner

kibook commented Dec 22, 2020

The templates for the s1kd-new* tools work a bit strangely right now. The documentation for s1kd-newdm says:

The templates must be written to conform to the default S1000D issue of this tool (currently 5.0). They will be automatically transformed when another issue is specified with the -$ option.

I can see how the wording here might be confusing. The -$ or --issue argument only affects the final output. The templates must always conform to the default S1000D issue, which at this time is the latest issue, 5.0. So even if you're using Issue 2.3, when you customize the s1kd-newdm templates, they must use Issue 5.0 element names. When you create a DM and specify --issue 2.3, internally everything is filled in according to the Issue 5.0 schema, and the final output is transformed to conform to Issue 2.3.

This was mainly done to avoid having to include tons of different templates for every issue of S1000D in the tool and to simplify the code that fills in the templates, by designating one particular issue (the latest) as the template format and transforming the output for all other issues. However, in the future I'd like to at least allow projects to write custom templates with the element names and structure from the issue of S1000D they are actually using.

@kibook
Copy link
Owner

kibook commented Dec 22, 2020

862b01c updates the wording in the documentation to hopefully make it more clear that the templates must conform to 5.0 regardless of the issue you are using.

@enigtique
Copy link
Author

Thank you for this explanation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants