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

Fix issue 412 (select with href or child node always sorts nodes and eliminates duplicates) #413

Merged
merged 623 commits into from
Mar 28, 2019

Conversation

AirQuick
Copy link
Member

@AirQuick AirQuick commented Oct 29, 2018

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


Fixes #412 for XSLT. (Unfortunately I don't know how to fix it for XQuery.)

The problem is that mode="test:generate-variable-declarations" template generates variable declarations using / operator like this:

<xsl:variable name="d29e1" select="$d29e1-doc/(//e2, //e1, //e1)"/>

With this pull request, the variable is declared like this

<xsl:variable name="d29e1" as="item()*">
   <xsl:for-each select="$d29e1-doc">
      <xsl:sequence select="//e2, //e1, //e1"/>
   </xsl:for-each>
</xsl:variable>

without using /.

Commits

  • b7bed17 reproduces the problem (Travis, AppVeyor)
  • f1cfe09 fixes XSLT
  • 92db219 simplifies an expression in one of the tests. The expression had to be weird, before fixing this problem.

@AirQuick AirQuick added the bug label Oct 29, 2018
…talog

# Conflicts:
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…from-xquery-xml

# Conflicts:
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…result-naming-collision_label

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…-output-escaping

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…-folding-img-src

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…lize

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…ormat-xslt

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…erialize

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…359-367

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…-flags

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…diff

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…ort-value

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…355-357-358-360-361

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…sequence

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…-151

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…nt-family

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…ments-in-xslt

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…erwise

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…rom-del-cmd

# Conflicts:
#	bin/xspec.bat
#	bin/xspec.sh
#	build.xml
#	test/saxon-custom-options/config.xml
#	test/saxon-custom-options/test.xspec
#	test/xspec-bat.cmd
#	test/xspec.bats
…k/xspec into fix_issue-412

# Conflicts:
#	appveyor.yml
#	build.xml
#	test/xspec-bat.cmd
#	test/xspec.bats
…k/xspec into resolve-catalog

# Conflicts:
#	appveyor.yml
#	test/xspec-bat.cmd
#	test/xspec.bats
# Conflicts:
#	test/end-to-end/cases/expected/stylesheet/xspec-result-naming-collision-junit.xml
#	test/end-to-end/cases/expected/stylesheet/xspec-result-naming-collision-result.html
#	test/end-to-end/cases/expected/stylesheet/xspec-result-naming-collision-result.xml
#	test/end-to-end/cases/xspec-result-naming-collision.xspec
@AirQuick AirQuick merged commit a61b3ed into xspec:master Mar 28, 2019
@AirQuick AirQuick deleted the fix_issue-412 branch March 28, 2019 08:26
@AirQuick
Copy link
Member Author

@cirulls
Merged this bug fix.

@galtm
#475 has a small conflict with this change in generate-tests-helper.xsl. I think it's easy to resolve.
As written in the initial comment here, the goal of the change is replacing this pattern of variable declaration

<xsl:variable name="d29e1" select="$d29e1-doc/(//e2, //e1, //e1)"/>

with this pattern

<xsl:variable name="d29e1" as="item()*">
   <xsl:for-each select="$d29e1-doc">
      <xsl:sequence select="//e2, //e1, //e1"/>
   </xsl:for-each>
</xsl:variable>

@galtm
Copy link
Member

galtm commented Mar 28, 2019

#475 has a small conflict

@AirQuick
OK, I will take a look in the next few days.

@galtm
Copy link
Member

galtm commented Mar 29, 2019

#475 has a small conflict with this change in generate-tests-helper.xsl.

@AirQuick
I pushed commit 09219e7 to PR #475. It should be basically a reinsertion of my change into the latest master revision of the file. I had to insert part of my code in a different spot to adapt to your changes.

@AirQuick
Copy link
Member Author

@galtm
I should have mentioned that xsl:element had been consolidated and thus you would need a tweak after reinsertion. 😎

@galtm
Copy link
Member

galtm commented Apr 1, 2019

xsl:element had been consolidated

I should have noticed in any case. I uploaded to #475 a better adaptation to your changes: 428a711.

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

Successfully merging this pull request may close these issues.

select with href or child node always sorts nodes and eliminates duplicates
2 participants