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

Xquery Sets unsupported #26

Open
koehn opened this issue Feb 17, 2023 · 0 comments
Open

Xquery Sets unsupported #26

koehn opened this issue Feb 17, 2023 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@koehn
Copy link

koehn commented Feb 17, 2023

Problem Statement

Xquery Sets are unsupported.

Steps to Reproduce

Given this input:

<bunch>
  <foo>
    <bar>abc</bar>
    <bar>def</bar>
  </foo>
  <foo>
    <bar>ghi</bar>
    <bar>jkl</bar>
  </foo>
</bunch>

This query should be valid: bunch/foo[(bar)=("abc","ghi”)]

Actual Result

panic: bunch/foo[(bar)=("abc","ghi")] has an invalid token

goroutine 18 [running]:
github.com/antchfx/xmlquery.Find(...)
        github.com/antchfx/[email protected]/query.go:76
github.com/sibprogrammer/xq/internal/utils.XPathQuery({0x1031981b8?, 0x14000120000?}, {0x103198038, 0x14000120098}, {0x16d0af916, 0x1e}, 0x0)
        github.com/sibprogrammer/xq/internal/utils/utils.go:179 +0x178
github.com/sibprogrammer/xq/cmd.NewRootCmd.func1.1()
        github.com/sibprogrammer/xq/cmd/root.go:59 +0x210
created by github.com/sibprogrammer/xq/cmd.NewRootCmd.func1
        github.com/sibprogrammer/xq/cmd/root.go:55 +0x410

Expected Result

<foo>
    <bar>abc</bar>
    <bar>def</bar>
  </foo><foo>
    <bar>ghi</bar>
    <bar>jkl</bar>
  </foo>

See https://xqueryfiddle.liberty-development.net/eiZQFph

@koehn koehn added the bug Something isn't working label Feb 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants