Closed wolfgangmm closed 1 year ago
This can be done by using the 'context' attribute pointing to the parent and the 'ref' pointing to the child.
Example: https://jinntec.github.io/Fore/demo/insert2.html
to test:
For your example try this:
<fx-insert event="value-changed" if="context()/text()='true'" context="instance()//textClass/keywords[@scheme='https://edh.ub.uni-heidelberg.de/edep/terms']" ref="term" origin="instance('templates')/term[@ref='#geography']"
Wolfgang Meier @.***> schrieb am Do., 10. Aug. 2023, 13:07:
The way fx-insert seems to be defined now, it is not possible to insert a first child element into an empty parent, e.g.:
only works if @ref points to an existing term, so we need at least one as placeholder. However, the list of terms in keywords will initially be empty.
— Reply to this email directly, view it on GitHub https://github.com/Jinntec/Fore/issues/226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADWFW3JIQFZ3DHFKXNBEF3XUS6GRANCNFSM6AAAAAA3LKPYIU . You are receiving this because you are subscribed to this thread.Message ID: @.***>
The way
fx-insert
seems to be defined now, it is not possible to insert a first child element into an empty parent, e.g.:only works if
@ref
points to an existing term, so we need at least one as placeholder. However, the list of terms inkeywords
will initially be empty.