usnistgov / metaschema-xslt

An implementation of the Metaschema information modeling language, in XSLT and XProc
https://pages.nist.gov/metaschema/
Other
3 stars 9 forks source link

Remove unused templates in converter generators #77

Closed galtm closed 6 months ago

galtm commented 1 year ago

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:

galtm commented 1 year ago

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?

Maybe. I don't think I need them just yet, so don't treat it as high priority on my account.

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.

Yes, that is a great idea for the reasons you mentioned.

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 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?

wendellpiez commented 1 year ago

Sure. sounds great, thanks!

galtm commented 1 year ago

Added <xsl:mode> for the obsolete mode with this commit: f7ef8e87c9b5463c67b862213cd28d7497dc2390

(Adding <xsl:mode> for all the non-obsolete modes can be some other PR from whoever gets to it first.)

github-actions[bot] commented 8 months ago

XSpec Test Results

  2 files  ±0  40 suites  ±0   0s :stopwatch: ±0s 105 tests ±0  90 :white_check_mark: ±0  15 :zzz: ±0  0 :x: ±0  114 runs  ±0  99 :white_check_mark: ±0  15 :zzz: ±0  0 :x: ±0 

Results for commit 36fb4438. ± Comparison against base commit 0010340e.

galtm commented 8 months ago

I rebased my commit off the develop branch and force-pushed, to refresh this pull request. The checks ran and all passed.