Skip to content

Fix XPath boolean result output#196

Open
sjh9714 wants to merge 1 commit into
sibprogrammer:masterfrom
sjh9714:fix-xpath-boolean-results
Open

Fix XPath boolean result output#196
sjh9714 wants to merge 1 commit into
sibprogrammer:masterfrom
sjh9714:fix-xpath-boolean-results

Conversation

@sjh9714
Copy link
Copy Markdown

@sjh9714 sjh9714 commented May 19, 2026

Summary

Fixes XPath boolean query results.

What changed

  • Added regression coverage for boolean(...) XPath results.
  • Updated XPathQuery to print boolean values instead of treating them as unknown result types.
  • Preserved existing number, string, and node iterator output handling.

Why

Issue #188 reports that xq -x 'boolean(//root)' fails with unknown type error: true instead of printing true.\n\n## Testing\n\n- go test ./internal/utils -run TestXPathQueryBoolean\n- go test ./internal/utils\n- go test ./...\n\nFixes #188

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant