IMPORTANT ANNOUNCEMENT

These forums were permanently set to read-only mode on July 20, 2022. From that day onwards, no new posting or comment is allowed on the site, but the historical content remains intact and searchable.

A new location for posting questions about PlanetPress Suite is now available:

OL Learn - PlanetPress Classic (opens in new tab)

Topic Options
#20790 - 10/16/07 04:02 PM Help with XML structure
Olivier Offline
Junior Member

Registered: 10/23/06
Posts: 11
Hi,

I'm new with XML Data and I try to put on a form some data which are on the XML File. This part is ok. But I have some trouble when I have more than 1 page.

My XML structure looks like this :

Pages
PageSize
Info
Page -> 1st page
Page -> 2nd page

In fact I try to put on a second page, data which are on the Page #2 in my structure.

Thank you for your help.

Top
#20791 - 10/17/07 06:08 PM Re: Help with XML structure
Anonymous
Unregistered


Hello,

If I understand correctly, you want to generate as many pages as there are 'Pages' element.
You can set one layout page with all the data mapping objects in a group having a 'Line repeat' repeat mode(see the Repeat interface of any object or group) on the 'Page' element from iteration 1 to iteration 0(convention for the total number of Page elements). In order for this structure to generate as many pages as there are 'Page' elements, you must set the 'Condition to exit and overflow' so that the ¤t.overflowCount system variable is lower than the XMLCount() function call of the 'Page' element. ¤t.overflowCount has a default value set to 0 which is incremented every time a page overflows(it is also reset to 0 when the page stops overflowing).
The data objects in the group map the children and subchildren of every 'Page' element.

Thanks.

Pierre P

Top
#20792 - 10/18/07 09:03 AM Re: Help with XML structure
Olivier Offline
Junior Member

Registered: 10/23/06
Posts: 11
Thank you very much. I'm going to try this.

Top
#20793 - 10/18/07 03:27 PM Re: Help with XML structure
RobertE Offline
Member

Registered: 06/14/07
Posts: 32
Are you saying your xml file looks like:

Code:
<Pages>
   <PageSize></PageSize>
   <Info></Info>
   <Page> (1st page) data for one form</Page>
   <Page> (2nd page) data for second form</Page>
</Pages>
you may need to look at the data format in Planet Press to see how you are viewing the xml. We found that when we put all of the data for one form inside the second element tags (as in the Page tag above) below the root, we had to change the xml emulation to look at the "second elemnet". Otherwise the xPath and Planet press seemed to loose its place.

Top
#20794 - 10/22/07 10:53 AM Re: Help with XML structure
Olivier Offline
Junior Member

Registered: 10/23/06
Posts: 11
The emulation I use is Second Element and it's look like what you indicate.

I managed to have all my data printed.

The only "weird" thing now is that I have an extra page now : I'm going to try to figure out why.

Thank you for your help.

Top


Moderator:  cosimo, OL Newsgroup Support