You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The "curiosum" (where I had to omit the colon in attribute xml:id) shows that in the anno:modify function (annotations.xql) the $key is taken from the name of the text-input field in annotate.html (see above), but not from the hard coded tag in annotation-config.xqm (and yes, I use term as a simple tag, not with the register):
annotation-config.xqm
case "term" return
<term xmlns="http://www.tei-c.org/ns/1.0" xml:id="{$properties?xmlid}">{$content()}</term>
annotations.xql
case element() return
if ($node is $target) then
element { node-name($node) } {
map:for-each($annotation?properties, function($key, $value) {
if ($value != '') then
attribute { $key } { $value }
else
()
}),
anno:modify($node/node(), $target, $annotation)
}
else
element { node-name($node) } {
$node/@*,
anno:modify($node/node(), $target, $annotation)
}
I hope, I could explain it well. If not, feel free to ask.
Please, could anyone help here to get this right? I made my first steps in xQuery only last year in October, and I do not have the experience to change the lib code (and do not want to change it, since it is a library that gets updated with new versions).
Many thanks in advance!!!
The text was updated successfully, but these errors were encountered:
What works:
Multiple unique attributes
annotate.html
annotation-config.xqm
One attribute, even if its key is a key to attributes in other tags as well ("target" is used as attribute in other tags as well)
annotate.html
annotation-config.xqm
What does not work:
With only the "expan" attribute or two attributes (like "expan" and "type") - it does not matter, it does not work at all
annotate.html
annotation-config.xqm
With two attributes AND attributes where the key name is used elsewhere as well (like the "type" or "target" attribute)
annotate.html
annotation-config.xqm
annotate.html
annotation-config.xqm
Curiosum:
The "curiosum" (where I had to omit the colon in attribute xml:id) shows that in the anno:modify function (annotations.xql) the $key is taken from the name of the text-input field in annotate.html (see above), but not from the hard coded tag in annotation-config.xqm (and yes, I use term as a simple tag, not with the register):
annotation-config.xqm
annotations.xql
I hope, I could explain it well. If not, feel free to ask.
Please, could anyone help here to get this right? I made my first steps in xQuery only last year in October, and I do not have the experience to change the lib code (and do not want to change it, since it is a library that gets updated with new versions).
Many thanks in advance!!!
The text was updated successfully, but these errors were encountered: