18.4 Populating Repeating Attributes using Automatic Property Extraction
Let us create a template file that allows content creators to enter names of multiple books as well as the names of their authors in a repeating block.
We will develop a custom XML Application that will populate the authors multi-valued repeating property of a document with the names of authors entered in the Template file.
1. Create and import a template in Web Publisher (say
Second_XMLApp_Template.xml)
and attach it todm_document
object type with Default Lifecycle. The Template fileSecond_XMLApp_Template.xml
follows:<?xml version="1.0" encoding="UTF-8"?> <BOOK> <REPEATBLOCK> <BOOKNAME/> <AUTHORNAME/> </REPEATBLOCK> </BOOK>
Create a Rules file (say
Second_XMLApp_TemplateRule.xml
) for the above template and associate the Template file with this Rules file. The Rules fileSecond_XMLApp_TemplateRule.xml
follows:<?xml version="1.0" encoding="UTF-8"?> <rules> <...