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

ML8 compatibility #40

Closed
mblakele opened this issue Feb 6, 2015 · 0 comments · Fixed by #41
Closed

ML8 compatibility #40

mblakele opened this issue Feb 6, 2015 · 0 comments · Fixed by #41

Comments

@mblakele
Copy link

mblakele commented Feb 6, 2015

With format=json this error is thrown:

XDMP-AS: (err:XPTY0004) xray-json:to-json(.) -- Invalid coercion: json:object(<json:object xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:json="http://marklogic.com/xdmp/json"><json:entry key="tests"><json:value><json:object><json:entry key...</json:object>) as xs:string
in /xray/src/output/json.xqy, at 11:5,
in xray-json:to-json(<tests dir="test" module-pattern="" test-pattern="" xray-version="2.0" xmlns="http://github.com/robwhitby/xray"><module path="/test/apidoc-model.xqm" total="20" passed="20" ign...</tests>) [1.0-ml]
in /xray/src/output/json.xsl, at 9:0 [XSLT]
    fn:context-item() = /xray:tests
    fn:position() = 1
in /xray/src/output/json.xsl, at 8:0,
in xdmp:xslt-invoke("output/json.xsl", <tests dir="test" module-pattern="" test-pattern="" xray-version="2.0" xmlns="http://github.com/robwhitby/xray"><module path="/test/apidoc-model.xqm" total="20" passed="20" ign...</tests>, map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"><map:entry key="module-pattern"><map:value xsi:type="xs:string"/...</map:map>)) [XSLT]
in /xray/src/xray.xqy, at 209:11,
in xray:transform(<tests dir="test" module-pattern="" test-pattern="" xray-version="2.0" xmlns="http://github.com/robwhitby/xray"><module path="/test/apidoc-model.xqm" total="20" passed="20" ign...</tests>, "test", "", "", "json") [1.0-ml]
    $el = <tests dir="test" module-pattern="" test-pattern="" xray-version="2.0" xmlns="http://github.com/robwhitby/xray"><module path="/test/apidoc-model.xqm" total="20" passed="20" ign...</tests>
    $test-dir = "test"
    $module-pattern = ""
    $test-pattern = ""
    $format = "json"
    $params = map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"><map:entry key="module-pattern"><map:value xsi:type="xs:string"/...</map:map>)
    $_ = ()
    $_ = ()
    $_ = ()
in /xray/src/xray.xqy, at 49:4,
in xray:run-tests("test", "", "", "json") [1.0-ml]
in /xray/index.xqy, at 18:0 [1.0-ml]

I think that's fixable with code from http://stackoverflow.com/questions/28373325 — I'll try to create a pull request.

mblakele added a commit to mblakele/xray that referenced this issue Feb 6, 2015
robwhitby added a commit that referenced this issue Feb 7, 2015
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 a pull request may close this issue.

1 participant