Syntax for InsertFragmentOperation
Posted: Tue Dec 07, 2021 6:45 am
Hello!
I'm trying to create an action that will insert an XML fragment into a document, and some of the fragment's element content must be selected by the user.
This version of my fragment works:
However, this version does not:
The file which is the parameter of the 'doc' function looks like this:
What am I doing wrong?
I'm trying to create an action that will insert an XML fragment into a document, and some of the fragment's element content must be selected by the user.
This version of my fragment works:
Code: Select all
<article-categories>
<subj-group subj-group-type="badges">
<compound-subject>
<compound-subject-part content-type="code">${ask('Choose badge:',
combobox, ('001':'Badge 001'; '002':'Badge 002'), '001', @code)}</compound-subject-part>
<compound-subject-part content-type="label">You chose: ${answer(@code)}</compound-subject-part>
</compound-subject>
</subj-group>
</article-categories>
Code: Select all
<article-categories>
<subj-group subj-group-type="badges">
<compound-subject>
<compound-subject-part content-type="code">${ask('Choose badge:',
combobox, (string(doc('${framework}/resources/badges.xml'))), '001', @code)}</compound-subject-part>
<compound-subject-part content-type="label">You chose: ${answer(@code)}</compound-subject-part>
</compound-subject>
</subj-group>
</article-categories>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<badges>
'001':'Badge 1';
'002':'Badge 2'
</badges>