Skip to content

Instantly share code, notes, and snippets.

@dragon-dxw
Created October 16, 2023 13:05
Show Gist options
  • Save dragon-dxw/be645e180c25d8e7c07caf1a1c431443 to your computer and use it in GitHub Desktop.
Save dragon-dxw/be645e180c25d8e7c07caf1a1c431443 to your computer and use it in GitHub Desktop.
List of existing features
xquery version "1.0-ml";
declare namespace uk="https://caselaw.nationalarchives.gov.uk/akn";
declare namespace akn="http://docs.oasis-open.org/legaldocml/ns/akn/3.0";
let $uri := "/eat/2023/1.xml"
let $doc := fn:doc($uri)
return (
<root>
<tdr-ref>
{xdmp:document-get-properties($uri, xs:QName("transfer-consignment-reference"))//text()}
</tdr-ref>
<handed-down>
{data($doc//akn:FRBRWork/akn:FRBRdate/@date)}
</handed-down>
<tdr-time>
{xdmp:document-get-properties($uri, xs:QName("transfer-received-at"))//text()}
</tdr-time>
<published>
{xdmp:document-get-properties($uri, xs:QName("published"))//text()}
</published>
<held>
{xdmp:document-get-properties($uri, xs:QName("editor-hold"))//text()}
</held>
<publish-time>
{xdmp:document-get-properties($uri, xs:QName("published-at"))//text()}
</publish-time>
<ncn>
{$doc//uk:cite//text()}
</ncn>
<title>
{data($doc//akn:FRBRname/@value)}
</title>
<uri>
{$uri}
</uri>
<court>
{$doc//uk:court//text()}
</court>
</root>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment