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

Breaking changes in v2.0 #1121

Open
AirQuick opened this issue Jul 30, 2020 · 4 comments
Open

Breaking changes in v2.0 #1121

AirQuick opened this issue Jul 30, 2020 · 4 comments
Labels

Comments

@AirQuick
Copy link
Member

AirQuick commented Jul 30, 2020

I'll keep this list updated. Please let us know if something is missing or if you find something bad.

For end users

  • Saxon 9.7 is no longer supported
    • 9.8 or later is required
    • 9.9 is recommended
  • Oxygen 19.x or older is no longer supported (due to its outdated built-in Saxon version)
  • Namespaces require explicit declaration
    • On older versions of XSpec, some namespaces took effect by accident in your test descriptions. You might have been relying on such accidental namespaces without knowing it. On v2.0, you can't rely on such accidental behavior anymore. You need to declare namespaces in your test descriptions as you use them.
    • Example
      • On v1.6.0, this test description without xs declaration works by accident:

        <x:description stylesheet="test-target.xsl"
                       xmlns:x="http://www.jenitennison.com/xslt/xspec">
          <x:scenario label="Test">
            <x:call function="sum">
              <!-- Use `xs` without declaring it -->
              <x:param select="xs:integer('1')" />
            </x:call>
            <x:expect label="Expect" select="1" />
          </x:scenario>
        </x:description>
      • On v2.0, the same test fails:

        C:\xspec>bin\xspec.bat test.xspec
        ...
        Running Tests...
        ...
          XPST0081: Namespace prefix 'xs' has not been declared
        ...
        *** Error running the test suite

        You need to declare xs:

        <x:description stylesheet="test-target.xsl"
                       xmlns:x="http://www.jenitennison.com/xslt/xspec">
          <x:scenario label="Test">
            <x:call function="sum">
              <!-- Declare `xs`. The declaration can be placed in one of the ancestors instead
                (x:call, x:scenario or x:description) -->
              <x:param select="xs:integer('1')"
                       xmlns:xs="http://www.w3.org/2001/XMLSchema" />
            </x:call>
            <x:expect label="Expect" select="1" />
          </x:scenario>
        </x:description>
  • x:expect[@test] is interpreted more strictly. (feat: reject suspicious x:expect[attribute(test)] #1245)
    @test @as | @href | @select | child::node() v1.6.0 v2.0
    Exists. An instance of xs:boolean. Exists @as | @href | @select | child::node() is ignored. Fatal error
    Exists. Not an instance of xs:boolean. Not exists x:expect is considered to expect an empty sequence Fatal error
  • x:param[@position] is designed more clearly. (attribute(position) works too differently from attribute(name) #1267)
  • utils-library-at parameter for XQuery recognizes only #none. (refactor: split src/compiler/generate-*-utils.* #1149)

For those who access XSpec internals

(cc'ing @xspec/xspec, @xspec/maven-plugin, @xspec/oxygen-xml-editor-xspec-support, @vincentml)

Only for those who might be interested

  • Some files are no longer maintained
@AirQuick
Copy link
Member Author

No more breaking changes are in sight.

As for the Oxygen XSpec Helper View, I've already made necessary changes in my local fork. I'll submit a pull request to https://github.com/xspec/oXygen-XML-editor-xspec-support/pulls as soon as we release XSpec v2.0. So I hope you won't have to do many things, @xspec/oxygen-xml-editor-xspec-support :)

@AirQuick
Copy link
Member Author

Added #1245.

@AirQuick
Copy link
Member Author

AirQuick commented Oct 6, 2020

Added #1267.

@AirQuick
Copy link
Member Author

As for the Oxygen XSpec Helper View, I've already made necessary changes in my local fork. I'll submit a pull request to https://github.com/xspec/oXygen-XML-editor-xspec-support/pulls as soon as we release XSpec v2.0. So I hope you won't have to do many things, @xspec/oxygen-xml-editor-xspec-support :)

Done: xspec/oXygen-XML-editor-xspec-support#44

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

No branches or pull requests

1 participant