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

TEST-XSPEC.xpl raises error in XML Calabash #22

Closed
galtm opened this issue Jan 3, 2025 · 8 comments
Closed

TEST-XSPEC.xpl raises error in XML Calabash #22

galtm opened this issue Jan 3, 2025 · 8 comments

Comments

@galtm
Copy link
Collaborator

galtm commented Jan 3, 2025

The TEST-XSPEC.xpl pipeline works under Morgana, but raises an error under XML Calabash 3 alpha 9.

Fatal err:XS0006: No connection for primary output port ?xspec-html-report?.
   at file:/C:/.../oscal-xproc3/xspec/xspec-execute.xpl:170:23

Side question about TEST-XSPEC.xpl and XML Calabash 3: Would having XML Calabash handle the .xspec file name extension similar to .fo as in this table be a reasonable enhancement request for XML Calabash? The first bullet of https://github.com/usnistgov/oscal-xproc3/blob/main/tutorial/sequence/Lesson02/walkthrough_102.md#test-xspec explains the workaround you had to do, and it seems that the default mappings in XML Calabash are trying to smooth that out. (Maybe you'd still need your workaround for Morgana, though.)

@xml-project
Copy link

There is a bug in MorganaXProc's static analysis: A missing connection for a (primary) output port is not correctly identified during static analysis. There should be an XS006, as correctly raised by XML Calabash 3.
MorganaXProc-III currently raises dynamic error XD0007 if the respective subpipeline is executed. This might not always be the case, e.g. in a p:choose where the defective alternative is not executed.
Hope that helps,
Achim

@wendellpiez
Copy link
Collaborator

wendellpiez commented Jan 6, 2025

@xml-project yes it helps! thanks very much. In a rewrite we'll try to find a solution that works in both processors, or a stopgap which we can roll back when the Morgana bug fix is in. 🥬

@xml-project
Copy link

@wendellpiez Any correct pipeline (accepted by XML Calabash) will also work with MorganaXProc-III (present and future).

@wendellpiez
Copy link
Collaborator

@xml-project thanks, that is helpful to know.

@galtm
Copy link
Collaborator Author

galtm commented Jan 6, 2025

Thanks, @xml-project and @wendellpiez !

@wendellpiez
Copy link
Collaborator

wendellpiez commented Jan 6, 2025

Where the XProc has

<p:output port="xspec-html-report" primary="true"/>

making it

<p:output port="xspec-html-report" primary="true">
  <p:empty/>
</p:output>

Appears to satisfy XML Calabash.

I.e. it is just a bit more scrupulous than Morgana. (Good lesson.)

An alternative design could use p:error instead of failing silently, as only a non-functional XSpec will hit the p:otherwise (tmk).

wendellpiez added a commit to wendellpiez/oscal-xproc3 that referenced this issue Jan 6, 2025
wendellpiez added a commit that referenced this issue Jan 31, 2025
* Many improvements responding to @galtm feedback among others
* Addresses #22
* Now accommodates XML Calabash
* Several new oscal-import examples
* New tutorial writeup in progress
@galtm
Copy link
Collaborator Author

galtm commented Jan 31, 2025

An alternative design could use p:error instead of failing silently, as only a non-functional XSpec will hit the p:otherwise (tmk).

You're right, only a non-functional XSpec would hit that. The XSpec compiler would raise an error if <x:description> did not have any of the attributes stylesheet, query, or schematron (link to 3 XSpec compiler files, one per language).

@wendellpiez
Copy link
Collaborator

Let's close the Issue as Done For Now (we can revisit later if we like).

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

No branches or pull requests

3 participants