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

Adds support for versioned XSLT files #1326

Merged
merged 2 commits into from
Nov 5, 2019
Merged

Adds support for versioned XSLT files #1326

merged 2 commits into from
Nov 5, 2019

Conversation

mauromsl
Copy link
Member

@mauromsl mauromsl commented Nov 4, 2019

  • Adds a new model for XSL files to core
  • Installs the default.xsl file as the first XSLFile object.
  • Sets the default.xsl as the default for all journals via migration
  • Sets the default.xsl as the preferred XSL for all Galleys via migration
  • Adds interface for uploading new XSL, choosing the journal default and changing galley XSL
  • Adds a json dump of the default XSLFile object to be loaded at install time

Considerations:

  • I tried to make XSLFile a wrapper around core.File similar to how SupplementaryFile was implemented. The problem with this approach is that the File model is too coupled with the Article model, making it messy to save files under that model when they are not related to an article.
  • At first I linked the XSLFile to articles, but I think it makes more sense to link them to the Galleys themselves, when these are XML (galley.label == 'XML').
  • Changes to the default.xsl file should not be allowed and should instead generate a new file + a data migration whenever changes are required)

@mauromsl mauromsl requested a review from ajrbyers November 4, 2019 12:55
@ajrbyers ajrbyers merged commit 0e41c43 into master Nov 5, 2019
@ajrbyers ajrbyers deleted the xslt-versions branch November 5, 2019 10:03
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

Successfully merging this pull request may close these issues.

2 participants