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

Import XQuery module without prefix if not required #442

Merged
merged 748 commits into from
Apr 25, 2019

Conversation

AirQuick
Copy link
Member

This pull request derives from #439. So needs to be handled after that.


This pull request addresses a TODO:

<xsl:template match="x:description" mode="x:generate-tests">
<xsl:variable name="this" select="."/>
<!-- A prefix has to be defined for the target namespace on x:description. -->
<!-- TODO: If not, we should generate one. -->

…nto rm-pkg-ns-from-xquery-xml

# Conflicts:
#	bin/xspec.bat
#	build.xml
#	test/ant/common/generate-build-worker.xsl
#	test/end-to-end/generate-expected.cmd
#	test/end-to-end/generate-expected.sh
#	test/end-to-end/processor/base/compare.xsl
#	test/end-to-end/processor/base/normalize.xsl
#	test/end-to-end/run-e2e-tests.cmd
#	test/end-to-end/run-e2e-tests.sh
#	test/xspec.bats
…result-naming-collision_e2e

# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
…b.com/AirQuick/xspec into fix_issue-355-357-358-360-361

# Conflicts:
#	test/end-to-end/processor/base/_normalizer.xsl
# Conflicts:
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	test/xspec-308.xspec
#	test/xspec-node-selection.xspec
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.class
#	java/com/jenitennison/xslt/tests/XSLTCoverageTraceListener.java
#	src/common/xspec-utils.xsl
#	src/compiler/generate-common-tests.xsl
#	src/compiler/generate-query-tests.xsl
#	src/compiler/generate-tests-utils.xsl
#	src/compiler/generate-xspec-tests.xsl
#	src/reporter/format-xspec-report.xsl
#	src/reporter/junit-report.xsl
#	src/schematron/schut-to-xspec.xsl
#	test/end-to-end/cases/expected/query/xspec-focus-1-result.html
#	test/end-to-end/cases/expected/query/xspec-function-result.html
#	test/end-to-end/cases/expected/query/xspec-import-result.html
#	test/end-to-end/cases/expected/query/xspec-imported-result.html
#	test/end-to-end/cases/expected/query/xspec-pending-result.html
#	test/end-to-end/cases/expected/schematron/schematron-01-result.xml
#	test/end-to-end/cases/expected/stylesheet/coverage-tutorial-coverage.html
#	test/end-to-end/cases/expected/stylesheet/coverage-tutorial-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-153-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-177-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-177-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-177-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-214-coverage.html
#	test/end-to-end/cases/expected/stylesheet/xspec-214-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-214-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-23_2-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-23_2-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-23_2-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-50-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-55-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-67-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-67-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-ambiguous-expect-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-ambiguous-expect-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-focus-1-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-function-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-import-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-imported-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-pending-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-rule-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-rule-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-three-dots-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-three-dots-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-xslt2-result.xml
#	test/end-to-end/processor/base/_normalizer.xsl
#	test/end-to-end/processor/coverage/_serializer.xsl
#	test/end-to-end/processor/junit/_normalizer.xsl
#	test/end-to-end/processor/xml/_normalizer.xsl
#	test/schematron-param-001.xspec
#	test/win-bats/collection.xml
#	test/xspec-space_stylesheet.xspec
#	test/xspec-utils.xspec
#	test/xspec.bats
…test-params

# Conflicts:
#	src/compiler/generate-query-utils.xql
#	src/compiler/generate-tests-utils.xsl
#	test/end-to-end/cases/expected/query/xspec-346-result.html
#	test/end-to-end/cases/expected/query/xspec-346-result.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-346-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-346-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-346-result.xml
#	test/end-to-end/cases/xspec-346.xspec
@AirQuick AirQuick added this to the v1.3.0 milestone Mar 30, 2019
…mod-wo-prefix

# Conflicts:
#	src/compiler/generate-query-tests.xsl
#	test/end-to-end/cases/expected/stylesheet/xspec-346-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-346-result.xml
#	test/xspec-308.xspec
#	test/xspec-412.xspec
#	test/xspec-423/test.xspec
#	test/xspec-438.xspec
#	test/xspec-node-selection.xspec
#	test/xspec-uri.xspec
@AirQuick AirQuick merged commit dd82b64 into xspec:master Apr 25, 2019
@AirQuick AirQuick deleted the import-xq-mod-wo-prefix branch April 25, 2019 06:31
@AirQuick
Copy link
Member Author

@cirulls
Merged this enhancement.

@galtm
#475 conflicts with this change. (very trivial)
This change makes it possible to remove xml:prefix from XQuery /x:description when prefix is not used in the .xspec file. Previously, you always had to declare namespace prefix of the XQuery module being tested.
In consequence, this change has removed some unnecessary xmlns:prefix from test/*.xspec files. The conflict with #475 is very trivial. When resolving the conflict, just make sure the following two removals:

  • test/xml-base.xspec

    • Remove xmlns:xml-base="x-urn:test:xml-base" from /x:description
  • test/xspec-node-selection.xspec

    • Remove xmlns:do-nothing="x-urn:test:do-nothing" from /x:description

@galtm
Copy link
Member

galtm commented Apr 25, 2019

@AirQuick
I uploaded 63f7ba3 to #475, changing those two files as you suggested.

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.

None yet

2 participants