-
Notifications
You must be signed in to change notification settings - Fork 9
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
Remove unused templates in converter generators #77
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am guessing that 'make-step' is a relic of an earlier stage of development in which logic for the path-matching was not encapsulated as well in that wonderful function ... so 'make-step' did something similar to 'make-match` (only at the XPath step level not the match pattern level) and was overridden similarly at the level of the step, not of the match - only now not needed.
It's a theory!
In the src/testing folder there are XProcs for interactive testing of both converter pipelines and round-tripping those. Would those be a good thing to warm up, as an additional check against unintended regressions?
Also for consideration: maybe we should now be using xsl:mode
declarations for all modes? (That was a new feature or didn't exist when the code was written.) This would help to document intent, as well as harden the runtime - for example if the mode were made to fail on no match.
Indeed replacing the moded template(s) with a mode declaration that produces a hard fail on-no-match
could be another way to confirm the mode is never used by this or an importing/imported XSLT?
I'm less worried about removing an unused named template since that will produce the hard fail wanted if it's ever called, and it's even a no-op template.
Maybe. I don't think I need them just yet, so don't treat it as high priority on my account.
Yes, that is a great idea for the reasons you mentioned.
I can make that change locally and see if any failures come up as I work. Do you want me to push that change to this PR, too? |
Sure. sounds great, thanks! |
Added (Adding |
There doesn't seem to be any code that applies templates with mode="make-step" or calls a template named "cast-prose-template".
f7ef8e8
to
36fb443
Compare
I rebased my commit off the develop branch and force-pushed, to refresh this pull request. The checks ran and all passed. |
Committer Notes
There doesn't seem to be any code anywhere in this repo or the original metaschema repo that applies templates with mode="make-step" or calls a template named "cast-prose-template". If these templates are holdovers from an earlier development phase, they can be deleted.
On the other hand, if they are part of a planned new development and will be in use eventually, then deletion is not the right action (in which case, close this PR without merging). @wendellpiez , do you know the status of these templates?
This PR is not urgent. I'm working on testing the converter generators, but I'll skip over these templates for now.
All Submissions:
Changes to Core Features: