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

Accept x:description without XSpec namespace prefix #586

Merged
merged 1 commit into from Aug 20, 2019

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Jul 31, 2019

Closes #572

This pull request

  • sets a fallback prefix (XsPeC:) when the test author does not provide a prefix to the XSpec namespace (http://www.jenitennison.com/xslt/xspec) in x:description.
  • also modifies a namespace declaration on XQuery so that it works without a prefix.

Tests

As far as I know, most test authors provide a prefix (x: in most cases) to the XSpec namespace. SchXslt is the only use case I've ever found. So I didn't write the test for this pull request extensively.

  • xspec-no-prefix.xspec tests both XQuery and XSLT.
  • For Schematron (xspec-no-prefix_schematron.xspec) and XSLT-only (xspec-no-prefix_stylesheet.xspec), I just copied some of the existing test files and removed the x: prefix.

Note for the test result

I found weird behaviors in xspec-no-prefix_stylesheet.xspec with some Saxon versions:

9.7.0.21-EE

  • The tests are reported as Failure. (not expected)
  • The report XML (created as test/xspec/xspec-no-prefix_stylesheet-result.xml) omits xmlns="" from elements in x:result and x:expect. (not expected)

9.7.0.21-HE, 9.8.0.12-EE/HE, 9.8.0.14-EE/HE

  • The tests are reported as Success. (as expected)
  • The report XML omits xmlns="" from elements in x:result and x:expect. (not expected)

9.8.0.15-EE/HE, 9.9.1.4-EE/HE

  • The tests are reported as Success. (as expected)
  • The report XML has xmlns="". (as expected)

Because the latest Saxon versions are working as expected, I haven't investigated the problem further.
Probably it's related to Saxon bug 3889 which was fixed on 9.9.0.1 and 9.8.0.15.

@AirQuick AirQuick added this to the v1.4.0 milestone Jul 31, 2019
@AirQuick AirQuick requested a review from galtm July 31, 2019 23:08
@galtm
Copy link
Collaborator

galtm commented Aug 1, 2019

@AirQuick : I should have a code review by Monday. (Will be away from computers tomorrow, FYI.)

Copy link
Collaborator

@galtm galtm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine.

@AirQuick AirQuick merged commit d488094 into xspec:master Aug 20, 2019
@AirQuick AirQuick deleted the issue-572 branch August 20, 2019 15:54
@AirQuick
Copy link
Member Author

@cirulls
Merged this enhancement.

Thanks @galtm for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow default namespace for XSpec
2 participants