We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The raipi:prepare-record function contains typeswitch with identical code in two case clauses, maybe we can simplify it:
case
let $elements-to-change := ("person", "place") (: note: read names from the configuration, perhaps $config:register-map? :) let $element-name := if($node instance of element()) then local-name($node) else () return if($element-name = $elements-to-change) then element {node-name($node)} { (: copy attributes :) for $att in $node/@* except ($node/@xml:id, $node/@resp, $node/@when) return $att , attribute xml:id {$id} , attribute when {format-date(current-date(), '[Y]-[M,2]-[D,2]')} , attribute resp {$resp} , for $child in $node/node() return $child } else $node
Or you can keep typeswitch expression and modify case clauses like this (see here):
typeswitch
case element(tei:person) | element(tei:place)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The raipi:prepare-record function contains typeswitch with identical code in two
case
clauses, maybe we can simplify it:Or you can keep
typeswitch
expression and modifycase
clauses like this (see here):The text was updated successfully, but these errors were encountered: