How do I prevent creation of the "Story" tag during mapping of styles to tags?
I need to achieve the following using a script:
I have two XMElements in the structure view, say Title and Body as follows:
<Root>
<Title/>
<Body/>
</Root>
Also, I have two text frames in a document. The first text frame has text with parastyle named "titlestyle".
And the second text frame has text with parastyle named "bodystyle".
What I need is when I do mapping of styles to tags (mapStylesToXMLTags) then the text with "titlestyle" should be placed as contents of title tag and the text with "bodystyle" should be placed as contents in body tag.
The problem is that when I map styles to text a Story tag is created for each text frame and the original Title and Body tags remain as it is, i.e, empty.
I get:
<Title></Title>
<Body></Body>
<Story><Title>here are the contents</Title></Story>
<Story><Body>here are the conents</Body></Story>
NOTE: If you select the text in text frame and then click the tag in structure view, then the contents are placed correctly. This is what I need as follows:
<Title>here are the contents</Title>
<Body>here are the contents</Body>
Regards,
Vinoth