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

Get annotation for a single document #391

Merged
merged 2 commits into from
Sep 22, 2023
Merged

Conversation

dragon-dxw
Copy link
Collaborator

No description provided.

@dragon-dxw
Copy link
Collaborator Author

Alternatively we could go down a route like:

xquery version "1.0-ml";

import module namespace dls="http://marklogic.com/xdmp/dls" at "/MarkLogic/dls.xqy";

let $uri := "/eat/2022/1.xml"
let $versions := ($uri, dls:document-version-uris($uri))

for $version in $versions
    return <version><uri>{$version}</uri><annotation>{xdmp:document-properties($version)//dls:annotation/text()}</annotation></version>

which returns a list of versions (including the current judgment) and their annotations.

@dragon-dxw dragon-dxw force-pushed the FCL-105-read-annotations branch from 6a42ecc to 27fc3a1 Compare September 18, 2023 16:07
Copy link
Contributor

@anthonyhashemi anthonyhashemi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of minor tidy up comments in the tests but looks good 👍

@dragon-dxw dragon-dxw force-pushed the FCL-105-read-annotations branch from 27fc3a1 to 3b6e1a3 Compare September 22, 2023 11:57
@dragon-dxw dragon-dxw merged commit d10401d into main Sep 22, 2023
7 checks passed
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.

2 participants