Page 1 of 1

Nested list - CustomXML HowTo

PostPosted: Fri Jan 24, 2014 10:31 pm
by marcel_cap
Hello,

I have made a .docx template by binding a CustomXML. It works well.
Now I want to diplay a nested list :

As for example a library contains books that can have one or more authors

XML :
Code: Select all
<library>
    <book>
        <name>book ONE</name>
        <authors>
            <author>author 1</author>
            <author>author 2</author>
        </authors>
    </book>
    <book>
        <name>book TWO</name>
        <authors>
            <author>author X</author>
        </authors>
    </book>
    <book>
        <name>book THREE</name>
        <authors>
            <author>author First</author>
            <author>author Second</author>
            <author>author Third</author>
        </authors>
    </book>
</library>


I would like to display for each books the author(s)

What I've done :
- create a bind text with /library/book[1]/authors/authors[1]
- make repeat on : /library/book[1]/authors/authors
- make repeat on : /library/book

It displays well my authors list.

But I'm wonder if there is not an easy way to do this ? (for instance with one repeat ... ?)

PS : sorry for my english, I'm not english :)

thanks,

Re: Nested list - CustomXML HowTo

PostPosted: Thu Jan 30, 2014 10:06 am
by jason
You are doing it the right way.

I guess whether you consider it easy or not depends on whether the authoring tool did it all for you or not.