Open djbpitt opened 5 years ago
Testing map (or array or a derivation of function(*)) was fixed in XSpec v1.3.0 for XSLT and in v1.4.0 for XQuery. (xspec/xspec#355)
@AlexJitianu You may possibly want to update XSpec Framework for XSpec Helper view. Also, looking at this repository, I noticed you needed to patch XSpec compiler. Would it be worth integrating some of the patches into the main repository?
As a side note, I have submitted a pull request to integrate xspec.framework
into the XSpec repository (xspec/xspec#713).
@AirQuick Thank you for the quick response. Am I correct in thinking that you're advising me to wait until SyncroSoft pushes new versions of the two XSpec add-ins?
Yes, at least XSpec Framework for XSpec Helper view needs to be updated. Looks like it's still based on v1.2.0.
@AirQuick Thanks again. I'll make do with command-line testing for now.
The following test succeeds when run from the command line using XSpec pulled from the master branch of the GitHub repo (Latest commit 4c50caa; SAXON HE 9.9.1.4), but fails in <oXygen/> 21.1, build 2019101513 with version XSpec 1.2.1 of the add-on (both Framework and Helper view). The error message, from Ant, reads "FOTY0013: Maps cannot be atomized". The test is:
and the function is:
Synopsis: The point of the function is to accept either two one-word inputs or two multi-word inputs (both as single strings; the multi-word ones are identified by internal whitespace). With one-word inputs, it should split the string into single-character strings. With multi-word inputs, it should word-tokenize the inputs on white space. It returns a map with three items: the sequences for each of the two inputs and a report on whether it split into characters or words. It should trap any input that isn't two single words or two multi-word strings, either as a type error on the parameter or by checking performed inside the function.