eerohele / eerohele/sigel

XdmValue for vectors

Open Beginner friendly
#11 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Clojure
Stars
31
Forks
3
PR merge metrics
No merged PRs in 30d

Description

At the moment (sp/->xdmvalue [1 2 3]) throws

Execution error (IllegalArgumentException) at sigel.protocols/eval10142$fn (protocols.clj:64). No matching ctor found for class net.sf.saxon.s9api.XdmAtomicValue

which is weird.

But if I do

(extend-protocol sp/XMLValue
  PersistentVector
  (->xdmvalue [xdmvalue]
    (XdmValue/makeSequence xdmvalue)))

(sp/->xdmvalue [1 2 3]) works fine

=> #object [net.sf.saxon.s9api.XdmValue 0x30e4991a "1\n2\n3"]

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at protocols.clj:64, where (sp/->xdmvalue [1 2 3]) currently fails, and compare it with the shown XdmValue/makeSequence workaround. Done means the vector expression no longer throws and produces the demonstrated XdmValue sequence; verify it in a Clojure REPL.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.