Discussion:
[Exist-open] json serialize problem
Grant MacKenzie
2017-04-25 21:18:26 UTC
Permalink
Check your dataset instance with 'instance of'
I think you will find you want a 'instance of element()'
not 'instance of document-node()' for your result dataset
try to get the root element with '/*'
eg. /db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"]/*

http://www.xqueryfunctions.com/xq/functx_node-kind.html
http://stackoverflow.com/questions/8554543/element-vs-node-in-xquery
--
Take Care
Grant Mackenzie
林晓东
2017-04-27 06:53:27 UTC
Permalink
this maybe better:
<root>{ collection('/db/ehr/v2')//DataSet[HDSN00.01.013/@value="a894317f-53da-486f-a1df-cea23200273d"]}</root>




--

ŽËÖÂ

easy

Ī³îǰ·ÎÞÖªŒº£¬ÌìÏÂË­È˲»Ê¶Ÿý¡£
Post by Grant MacKenzie
Check your dataset instance with 'instance of'
I think you will find you want a 'instance of element()'
not 'instance of document-node()' for your result dataset
try to get the root element with '/*'
http://www.xqueryfunctions.com/xq/functx_node-kind.html
http://stackoverflow.com/questions/8554543/element-vs-node-in-xquery
--
Take Care
Grant Mackenzie
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Exist-open mailing list
https://lists.sourceforge.net/lists/listinfo/exist-open
Loading...