Just extracting text from the story is not enough. The way text is placed is controlled by TextFrames in Spread documents. Each TextFrame has a ParentStory attribute showing which story it loads the text with, and each frame has dimensions that define the layout. For unused text frames (i.e. One story <> one frame) is all you need.
For flow frames, you need to use the PreviousTextFrame and NextTextFrame to create the chain. There is nothing in IDML to tell you how much text fits into each frame in a chain with a chain, you need to do the calculation yourself based on the calculated text sizes (or using a trial version and brute force error).
You can find the spreads in the main designmap.xml file:
<idPkg:Spread src="Spreads/Spread_udd.xml" />
And the spread will contain one or more TextFrame nodes:
<Spread Self="udd" ...> <TextFrame Self="uf7" ParentStory="ue5" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType">...</> ... </Spread>
Which, in turn, will contact a specific story:
<Story Self="ue5" AppliedTOCStyle="n" TrackChanges="false" StoryTitle="$ID/" AppliedNamedGrid="n">...</>
(In this example, frames are not streaming, so the values ββare 'n' .
All this in the IDML documentation, which you can find in other InDesign developer docs: http://www.adobe.com/devnet/indesign/documentation.html
source share