-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support XQuery in Run XSpec Test transformation scenario #739
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.
Except for tests in this project itself, I would expect the majority of XSpec tests to be for only one kind of code. I agree with you that some users may find this feature annoying. The prompt is especially annoying if the user selects multiple tests from the Project pane and wants to walk away while Oxygen runs all of them. I think it's important to find out if conditionally suppressing the prompt is possible. I made some naive attempts but was not successful.
If suppressing the prompt isn't feasible, an alternative could be to extend the existing non-interactive logic to add XQuery to the Run XSpec Test scenario, and then do one of the following to handle tests that cover multiple kinds of code:
A) Create separate XSLT-specific, XQuery-specific, and Schematron-specific scenarios for the (assumed uncommon) case where a test covers multiple types. A disadvantage is having a total of four scenarios instead of one. An advantage is that you can select multiple check boxes in the Transformation Scenarios pane, and then a single Ctrl+Shift+t keystroke runs all the transformations.
B) Use your dialog in a new scenario (like Run XSpec Test for User-Selectable Language, but hopefully with a better name than that). There would be a total of two scenarios, not one or four.
The dialog worked fine for me in v21.0, but v21.1 build 2019061404 had an error at char 48 of the test.type expression. You used 21.1, too; do you have a different build code? Or maybe I have some preference setting that is interfering.
Thank you for pointing out the critical things! So this initial pr is not viable because it
I pushed a commit 4b531df to just extend the existing non-interactive logic to add XQuery. I guess this covers most of the use cases at this moment.
|
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 exercised this scenario again in Oxygen after your "Do not make test.type interactive" commit. Thanks for that update. It works as expected for single-language tests. For multiple-language tests, it works by picking one of the languages (happens to be alphabetical order among the x:description
attributes, which is fine).
Right now, Run XSpec Test transformation scenario
test/xspec-uri.xspec
, for example, though I don't think there are many use cases like itThis pull request includes XQuery in the candidates of
test.type
of Run XSpec Test transformation scenario.Initial comment (abandoned)
With this change, Run XSpec Test transformation scenario interactively asks which test type (XSLT, XQuery, or Schematron) the user wants to run.
Some users may find this feature annoying, because it's likely that most people write XSpec only for either XSLT or Schematron.
I wanted to make Oxygen run XSpec silently if
x:description
has only one test type (@query
,@schematron
or@stylesheet
). But I don't know how to write Oxygen editor variables to realize it. Feedback is welcome.I tested this transformation scenario on Oxygen 21.1 on Windows and Linux.