Logical order of Story XML in IDML

2.4k views Asked by At

I am new to IDML and I am trying to understand this.

I have figured out that IDML is zip file containing multiple XML files. I have opened the designmap.xml and saw the StoryLine attribute in Document element. However, this order in the StoryLine atribute does not necessary agree with logical order of the text displayed on actual content.

For example the BusinessCardTemplate inside the IDML SDK has the following logical order:

John Doe
Software Developer
InDesign
Adobe Systems Incorporated
801 North 34th Street
Seattle, WA 98103
Phone: 206.675.7000
[email protected]
www.adobe.com

However according to the StoryList attribute the following is the order that it refers as following:

Software Developer
InDesign
John Doe
[email protected]
www.adobe.com
Phone: 206.675.7000
801 North 34th Street
Seattle, WA 98103
Adobe Systems Incorporated

Is there any way to figure out from the content of IDML to know the logical order (preferably from top left to bottom left) of those stories?

Thanks in advance

2

There are 2 answers

0
Dave Anderson On

Working directly with the Stories is quite difficult. It is easier if you use the Tagging features. Open your InDesign file and import an XML file with the correct structure for your data. You can then Tag the parts of the document to map to the XML nodes.

Once that is done export the document to IDML and then look in the XML directory at the file BackingStory.xml where you will find nodes like this:

<XMLElement Self="di3i29" MarkupTag="XMLTag/Instructions" XMLContent="u16a" />

This defines the mapping for the Instructions XML node into the Story_u16a.xml file. However you no longer need to worry about the Story because you now already have access to the node value that will be injected into the Story.

This tutorial explains the InDesign XML tagging.

0
Jude Fisher On

The story is just the text content, abstracted from its use in the document. If you want to get stories in the right order, you need to:

1) Find designmap.xml in the root of your unpacked IDML file (unzip the whole thing first - I think you know this already)

2) Get the order of Spreads from it by finding the spread elements:

<idPkg:Spread src="Spreads/Spread_uc6.xml" />

3) Within each spread document, get the order of TextFrames:

<TextFrame Self="uec" ParentStory="uda" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" ... (many more parameters) ... />

4) Check the ParentStory reference of each text frame:

<TextFrame Self="uec" ParentStory="uda" ... />

5) Find the related story: in this case it will be Stories/Story_uda.xml.

In a simple document, where each TextFrame is matched to one story, this will give you the order in which your stories appear in the document.

There are, however, some circumstances - such as multiple frames linked to a single story, or threaded frames, where one story is split over a number of TextFrames - where this mapping will not be so straightforward. Look out also for complexity introduced by MasterSpreads.

You will find the Adobe IDML documentation useful: http://www.adobe.com/devnet/indesign/documentation.html#idml