Closed m-k-r closed 7 years ago
@m-k-r I spoke this morning with @hcayless and @ryanfb. They had a couple of suggestions for making sure that the correct version of the XSLTs is being deployed for use with litpap.info. Specifically:
DCLP:sosol/config/externals.yml needs to be modified so that lines 6-9 read as follows:
data/xslt/epidoc:
:type: git
:repository: https://github.com/DCLP/epidoc-xslt.git
:revision: 3e2f2acb259c4d00dcacb089e3dca1ef324084ba
The revision specified above corresponds to the current release candidate.
DCLP:navigator/pn-xslt/Rakefile needs to be modified so that it uses git pull
to update (line 3) and does a git clone
from https://github.com/DCLP/epidoc-xslt.git
instead an svn checkout
on line 5.
You will want to make a couple of changes to ensure that the "example-p5-stylesheets" folder does not get cloned where you don't want it and to use the same revision number that we are using for the editor, above.
I don't think that the above is going to fix everything, but it's absolutely necessary before we do further troubleshooting. Please let us know (append to this ticket) when you've implemented and what the results are. These changes should be committed and pushed back to the appropriate DCLP repositories thereafter.
cc @rla2118 @jcowey @rogerbagnall @Edelweiss @HolgerEssler
The files are updated for the navigator in the master branch and for sosol in the development branch. So far, nothing has changed.
@m-k-r thanks for the update. I will undertake to try to test again the XSLT locally today so we can try to get to a resolution of this issue.
I narrowed down the error to the following files:
the error is in htm-teisupplied.xsl teisupplied.xsl
the variable $collection is not defined.
@wsalesky do you have any bandwidth to look into this and see if you can adjust the stylesheets not to depend on the $collection variable at this level (i.e. in the epidoc-xslt)? We'd really like to have this working by Monday of next week (sorry!).
IIRC, MakeHTML.xsl looks at the $collection variable and does things in such a way as to not propagate that variable down to the templates defined in the epidoc-xslt stuff. I think this is a change that @leoba and I made where we overlooked that compartmentalization. It's now causing trouble when the stylesheets are run (without MakeHTML.xsl) from the editor preview tab.
cc @hcayless @ryanfb (any help you can provide would be appreciated)
I will take a look tonight.
Sent from my iPhone
On Aug 3, 2017, at 11:24 AM, Tom Elliott notifications@github.com wrote:
@wsalesky do you have any bandwidth to look into this and see if you can adjust the stylesheets not to depend on the $collection variable at this level (i.e. in the epidoc-xslt)? We'd really like to have this working by Monday of next week (sorry!).
IIRC, MakeHTML.xsl looks at the $collection variable and does things in such a way as to not propagate that variable down to the templates defined in the epidoc-xslt stuff. I think this is a change that @leoba and I made where we overlooked that compartmentalization. It's now causing trouble when the stylesheets are run (without MakeHTML.xsl) from the editor preview tab.
cc @hcayless @ryanfb (any help you can provide would be appreciated)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
@paregorios Relevant commit: https://github.com/DCLP/epidoc-xslt/commit/d2a9190ce546cb2d2ab5afd4567378375ef7f58f.
Linked issue: https://github.com/DCLP/dclpxsltbox/issues/120
Key point, the issue does specify that this should not effect any collections other then DCLP.
The options as I see it are:
I prefer option #1, if it is possible. Where does the CSS used by the editor preview tab come from?
cc @hcayless @ryanfb for illumination on the inner workings of the editor preview tab.
I think there's a third option, already used where necessary in the EpiDoc stylesheets: the "leiden-style" parameter.
There is at present a "ddbdp" value used in some places for this variable when practice in rendering editorial sigla differs between the "Duke Databank of Documentary Papyri" (i.e., DDbDP == papyri.info). See the global-parameters.xml file for other values. For a behavior that is unique to DCLP, one would need to implement a new "dclp" value for the "leiden-style" parameter.
Unfortunately, we can't just drop this in for only this issue though, because right now we'd break a bunch of other behaviors that we like that are happening because they are triggered by conditionals that look for $leiden-style="ddbdp"
. Nor can we change the conditional to depend on $leiden-style="ddbdp"
because DDbDP wants to see underlining for <supplied evidence="parallel"
.
A quick-and-dirty, temporary workaround would be to eliminate the code that was added at DCLP/epidoc-xslt@d2a9190 (i.e., go back to just using underline like DDbDP). That would stop the editor preview from crashing. Then we could take a studious approach to implementing the change I outline above.
@wsalesky how much effort do you think would be involved in actually implementing this "for real" as I have described (assuming you agree that's the right way to do it)?
@rla2118 do you want us to implement the quick-and-dirty work-around I described above so we can stop the editor preview crashing?
cc @jcowey @HolgerEssler @rogerbagnall @hcayless @ryanfb
@paregorios I like the third option. I was not entirely sure what the $leiden-style
parameter was used for, but it does seem to be the most appropriate option.
I do not think adding the new value to the$leiden-style
parameter would be that much work, we would just need to add a $leiden-style=("ddbdp","dclp")
to all current calls to $leiden-style="ddbdp"
and then add the $leiden-style="dclp"
to the supplied-parallel
template. I can do this tonight, and push a branch for testing by the end of the night.
Great! Please proceed!
On Fri, Aug 4, 2017 at 6:15 PM Winona Salesky notifications@github.com wrote:
@paregorios https://github.com/paregorios I like the third option. I was not entirely sure what the $leiden-style parameter was used for, but it does seem to be the most appropriate option.
I do not think adding the new value to the$leiden-style parameter would be that much work, we would just need to add a $leiden-style=("ddbdp","dclp") to all current calls to $leiden-style="ddbdp" and then add the $leiden-style="dclp" to the supplied-parallel template. I can do this tonight, and push a branch for testing by the end of the night.
— You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/DCLP/dclpxsltbox/issues/283#issuecomment-320372667, or mute the thread https://github.com/notifications/unsubscribe-auth/AAQEdegTZ4d114Q-QGnuW3P7JGIQpw0Aks5sU6YrgaJpZM4OFRDJ .
-- -- Tom Elliott, Ph.D. Associate Director for Digital Programs and Senior Research Scholar Institute for the Study of the Ancient World (NYU) http://isaw.nyu.edu/people/staff/tom-elliott
Humanities Commons: @paregorios https://hcommons.org/members/paregorios/ OrcID: 0000-0002-4114-6677 http://orcid.org/0000-0002-4114-6677
I'm sorry but I'm not sure what this issue is about. Text preview looks ugly, we know that, but I can't reproduce the error. If, however, there's an effective work around, then please go ahead.
@rla2118 I imagine you're not seeing the error because @m-k-r is running a much earlier version of the XSLT transform on production (or so I understand him to indicate in his initial comment on this ticket). That's because the version we use in the navigator crashes in the editor (due, as @wsalesky has discovered, to some logic infelicities in the way we coded some unrelated changes).
That's correct. At the moment it is:
editor: sosol development branch from july 31st. navigator: dclp-navigator master branch with the copied dclp-epidoc-xslt epidoc-xslt: papyri-epidoc with revision 1755
As long as dclp-epidoc only shows blank pages I think it is better to keep the papyri-epidoc
@paregorios New branches ready for review:
navigator/pn-xslt
Branch: https://github.com/DCLP/navigator/tree/issue283
Changes: added the new dclp
option to the leiden-style parameter in navigator/pn-xslt/pi-global-parameters.xml
epidoc-xslt
Branch: https://github.com/DCLP/epidoc-xslt/tree/issue283
Changes:
Added the new dclp
option to the leiden-style parameter
Added dclp
to all locations where $parm-leiden-style = 'ddbdp'
Changed $collection = 'dclp'
to $parm-leiden-style = 'dclp'
in teisupplied.xsl
and htm-teisupplied.xsl
Changes to HTML (running: ./dclpxsltbox/bin/2html.sh): None
Works on testserver. Should I deploy it on production?
I've merged the new code for epidoc-xslt and navigator to the master branch on both repositories; however, we still need to change the parameter value that the editor preview is using when it invokes the stylesheets. @m-k-r you can go ahead and update production with those branches, which will stop things crashing, but that still won't make editor preview match navigator HTML.
I don't know where that code is in the editor codebase. @hcayless @ryanfb or @m-k-r do you know where the "leiden-style" parameter gets set for purposes of the editor preview? If so, would you please intervene in the code at your earliest opportunity to make a change that invokes it with the value "dclp" so that we can take advantage of the code changes @wsalesky has made (and described above)?
Thanks,
These are the results for "leiden-style": https://github.com/DCLP/sosol/blob/development/app/models/dclp_text_identifier.rb https://github.com/DCLP/sosol/blob/development/app/models/publication.rb https://github.com/DCLP/sosol/blob/development/app/models/hgv_meta_identifier.rb https://github.com/DCLP/sosol/blob/development/app/models/ddb_identifier.rb https://github.com/DCLP/sosol/blob/development/data/xslt/pn/epifacs-display.xsl https://github.com/DCLP/sosol/blob/development/data/xslt/pn/start-div-portlet_perseus.xsl https://github.com/DCLP/sosol/blob/development/data/xslt/biblio/global-parameters.xml https://github.com/DCLP/sosol/blob/development/data/xslt/perseus/commentary.xsl https://github.com/DCLP/sosol/blob/development/data/xslt/ddb/commentary.xsl
I already had build the editor with the issue283-branches. The old editor is backed up so we could roll back if necessary.
No rolling back or experiments while the workshop is ongoing. I scarcely need to say this but could not stop myself from doing so!
I've made a PR (above) against the DCLP development
branch for this that just sets leiden-style
. Do we also need to set any of the apparatus-style
, edn-structure
, or css-loc
parameters as in DDB? See: https://github.com/DCLP/sosol/blob/development/app/models/ddb_identifier.rb#L358-L363
As the workshop is now over, I'd like to see us get this editor preview problem resolved as soon as possible.
@m-k-r are you able to review and accept @ryanfb's pull request, noted above?
@ryanfb to answer your question, we need the same parameter settings that are used for DDB processing in the editor, with the exception of leiden-style
, which you have already addressed.
It looks like @m-k-r has merged the pull request!
I have accepted the pull request and tested it on our testserver. Seems fine so far.
@m-k-r Marcel please deploy as soon as possible.
@jcowey and @m-k-r when this has been deployed and checked on production, please close this ticket. Thanks.
using epidoc-xslt from the dclp github repository causes error 500 on text-preview and text-translation in the editor. After switching back to the epidoc-xslt from the editor (papyri.info version 1755) both pages work as expected.
In webrick the error message is:
Java::JavaxXmlTransform::TransformerConfigurationException (net.sf.saxon.s9api.SaxonApiException: Errors were reported during stylesheet compilation): net.sf.saxon.jaxp.SaxonTransformerFactory.newTemplates(net/sf/saxon/jaxp/SaxonTransformerFactory.java:157) net.sf.saxon.jaxp.SaxonTransformerFactory.newTransformer(net/sf/saxon/jaxp/SaxonTransformerFactory.java:110) java.lang.reflect.Method.invoke(java/lang/reflect/Method.java:498) RUBY.get_transformer(lib/jruby_xml.rb:407) RUBY.apply_xsl_transform(lib/jruby_xml.rb:288) RUBY.preview(app/models/dclp_text_identifier.rb:31) RUBY.preview(app/controllers/ddb_identifiers_controller.rb:267) RUBY.send_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/implicit_render.rb:4) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:167) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/rendering.rb:10) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:18) RUBY._run642974964process_action1749694472callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:461) ActiveSupport::Callbacks::ClassMethods.run_callback(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405) ActiveSupport::Callbacks::ClassMethods.run_callback(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405) RUBY._run_process_action_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390) ActiveSupport::Callbacks.run_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81) ActiveSupport::Callbacks.run_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/abstract_controller/callbacks.rb:17) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/rescue.rb:29) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:30) Module.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123) Module.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123) ActiveSupport::Notifications::Instrumenter.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20) ActiveSupport::Notifications::Instrumenter.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:20) ActiveSupport::Notifications::Instrumenter.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19) ActiveSupport::Notifications::Instrumenter.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications/instrumenter.rb:19) Module.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123) Module.instrument(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/notifications.rb:123) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/instrumentation.rb:29) RUBY.process_action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/params_wrapper.rb:207) RUBY.process_action(vendor/cache/jruby/1.9/gems/activerecord-3.2.22.5/lib/active_record/railties/controller_runtime.rb:18) RUBY.process(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/abstract_controller/base.rb:121) RUBY.process(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/abstract_controller/rendering.rb:46) RUBY.dispatch(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:203) RUBY.dispatch(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal/rack_delegation.rb:14) RUBY.action(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_controller/metal.rb:246) org.jruby.RubyProc.call(org/jruby/RubyProc.java:281) RUBY.dispatch(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:73) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:36) RUBY.call(vendor/cache/jruby/1.9/gems/journey-1.0.4/lib/journey/router.rb:68) org.jruby.RubyArray.each(org/jruby/RubyArray.java:1613) RUBY.call(vendor/cache/jruby/1.9/gems/journey-1.0.4/lib/journey/router.rb:56) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/routing/route_set.rb:608) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/best_standards_support.rb:17) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/etag.rb:23) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/conditionalget.rb:25) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/head.rb:14) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/params_parser.rb:21) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/flash.rb:242) RUBY.context(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:210) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/session/abstract/id.rb:205) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/cookies.rb:341) RUBY.call(vendor/cache/jruby/1.9/gems/activerecord-3.2.22.5/lib/active_record/query_cache.rb:64) RUBY.call(vendor/cache/jruby/1.9/gems/activerecord-3.2.22.5/lib/active_record/connection_adapters/abstract/connection_pool.rb:479) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:28) RUBY._run251346559call664740647callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:408) ActiveSupport::Callbacks::ClassMethods.run_callback(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405) ActiveSupport::Callbacks::ClassMethods.run_callback(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:405) RUBY._run_call_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:390) ActiveSupport::Callbacks.run_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81) ActiveSupport::Callbacks.run_callbacks(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/callbacks.rb:81) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/callbacks.rb:27) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/reloader.rb:65) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/remote_ip.rb:31) RUBY.call(vendor/cache/jruby/1.9/gems/airbrake-4.3.0/lib/airbrake/rails/middleware.rb:13) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/debug_exceptions.rb:16) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/show_exceptions.rb:56) RUBY.call_app(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:32) RUBY.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:16) RUBY.tagged(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/tagged_logging.rb:22) RUBY.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/rack/logger.rb:16) RUBY.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/request_id.rb:22) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/methodoverride.rb:21) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/runtime.rb:17) RUBY.call(vendor/cache/jruby/1.9/gems/activesupport-3.2.22.5/lib/active_support/cache/strategy/local_cache.rb:72) RUBY.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/lock.rb:15) ActionDispatch::Static.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/static.rb:83) ActionDispatch::Static.call(vendor/cache/jruby/1.9/gems/actionpack-3.2.22.5/lib/action_dispatch/middleware/static.rb:83) Airbrake::UserInformer._call(vendor/cache/jruby/1.9/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:16) Airbrake::UserInformer._call(vendor/cache/jruby/1.9/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:16) Airbrake::UserInformer.call(vendor/cache/jruby/1.9/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:12) Airbrake::UserInformer.call(vendor/cache/jruby/1.9/gems/airbrake-4.3.0/lib/airbrake/user_informer.rb:12) Rails::Engine.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/engine.rb:484) Rails::Engine.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/engine.rb:484) Rails::Application.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/application.rb:231) Rails::Application.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/application.rb:231) Rack::ContentLength.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/content_length.rb:14) Rack::ContentLength.call(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/content_length.rb:14) Rails::Rack::LogTailer.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/rack/log_tailer.rb:17) Rails::Rack::LogTailer.call(vendor/cache/jruby/1.9/gems/railties-3.2.22.5/lib/rails/rack/log_tailer.rb:17) Rack::Handler::WEBrick.service(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/handler/webrick.rb:59) Rack::Handler::WEBrick.service(vendor/cache/jruby/1.9/gems/rack-1.4.7/lib/rack/handler/webrick.rb:59) WEBrick::HTTPServer.service(/usr/local/rbenv/versions/jruby-1.7.26/lib/ruby/1.9/webrick/httpserver.rb:138) WEBrick::HTTPServer.service(/usr/local/rbenv/versions/jruby-1.7.26/lib/ruby/1.9/webrick/httpserver.rb:138) RUBY.run(/usr/local/rbenv/versions/jruby-1.7.26/lib/ruby/1.9/webrick/httpserver.rb:94) RUBY.start_thread(/usr/local/rbenv/versions/jruby-1.7.26/lib/ruby/1.9/webrick/server.rb:191) java.lang.Thread.run(java/lang/Thread.java:745)
Next step is testing the current papyri.info epidoc-xslt version to check if the changes for dclp are causing the error and checking when the editor got incompatible to dclp-epidoc.