-
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
Schematron checks on XSpec files to help with development #1654
Comments
This could be an extension of the work for #742 .
I'm not sure if warning about non-external transformations is a good idea, though. External transformations are an experimental feature and are not suitable for all situations. |
As @galtm suggested, we already have a Schematron + SQF which is integrated into Oxygen via a framework file. So any suggestions or pull requests for that file are welcome.
4 years ago, I tried this <sch:rule context="/x:description[@schematron]">
<sch:let name="uri" value="resolve-uri(@schematron, base-uri())" />
<sch:assert id="schematron-attribute-must-specify-schematron-file"
test="
if (doc-available($uri)) then
doc($uri)/sch:schema
else
false()"
><sch:name />/@schematron must specify Schematron file: <sch:value-of select="$uri"
/></sch:assert>
</sch:rule> Maybe it was related to the document cache.
Those checks can be difficult when taking |
|
One of our common users (Oxygen + XSpec) developed Schematron/SQF rules to aid its XSpec authoring efforts. Unfortunately, he cannot provide the Schematron, but gave some details on the the things he validate and in most cases provide fixes for:
@id
values reference valid@id
values from the Schematron file assert/report elements (QF allows selection from those ids)@id
values not covered by an expect and the same for those not covered by a expect-not.It's really easy to get some of things wrong by mistake and it can be really difficult for someone new to (or even experienced with) Xspec to catch them as in some cases you think tests are working but are not - unlike when the Xspec just doesn't run (which can be difficult to troubleshoot as you need to read/understand the stack trace - particularly the
@run-as
thing).Those working extensively with XSpec or those actively involved in XSpec development have probably discovered other similar situations.
The text was updated successfully, but these errors were encountered: