Can XHTML fragments be specified directly in a template *.opt file?
Posted: Tue Jun 14, 2022 3:19 am
When I set an XHTML fragment parameter in a DITA-OT project file:
it works as expected. But when I set it in a template *.opt file:
then I get an error that the fragment is not well-formed:
Is this expected?
Testcase:
Code: Select all
<publication transtype="webhelp-responsive">
<param name="webhelp.fragment.head" value="<p>HELLO<p>"/>
</publication>
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<publishing-template>
<name>Synopsys WebHelp</name>
<webhelp>
<parameters>
<parameter name="webhelp.fragment.head" value="<p>HELLO<p>"/>
</parameters>
<resources>
<css file="empty.css"/>
</resources>
</webhelp>
</publishing-template>
Code: Select all
$ dita -i map.ditamap -f webhelp-responsive -Dwebhelp.publishing.template="template"
[echo] Oxygen XML WebHelp 25.0 build 2022060718
[templatetask] [Fatal Error] :1:12: XML document structures must start and end within the same entity.
[templatetask] HTML Fragment with ID 'webhelp.fragment.head' is not XML well-formed.
[templatetask] Reason: XML document structures must start and end within the same entity.
[echo] Load file from temp: /tmp/temp20220613200458916
[echo] Indexer language=en
[echo] Copying custom template resources. Ant file: /tmp/temp20220613200458916/wh-template-copy-resources.xml
[echo] Indexing html files in /mnt/c/nobackup/webhelp_fragment_in_template/./out, indexer language is: en
Testcase: