Create TOC and Auto Tag to XML

Community Beginner ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

Hi All... My Doubt is to "Create TOC from Part or Chapter and auto Tag with XML".

Any Idea or suggestion, It will be helpful..

 

Thanks in Advance....... 

TOPICS
Scripting

Views

88

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 23, 2021 Dec 23, 2021

Copy link to clipboard

Copied

Can you maybe tell us a few more details? We can tell you all about how to make a TOC in InDesign, it's pretty easy & pretty powerful. We can also tell you all about how to autotag for XML in InDesign.  However, I can't guess how those two things would be releated, in your request, unless you tell us how they are related in your project. 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Dec 26, 2021 Dec 26, 2021

Copy link to clipboard

Copied

LATEST

Hai Joel,

    Thank you for your reply. I have completed make TOC through script. Can you help me to create Autotag for XML through JS.

 

Thanks in Advance....... 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Dec 24, 2021 Dec 24, 2021

Copy link to clipboard

Copied

As Joel's offered, it's not like you can do both functions in one fell swoop. Not that I suspect you'd particularly want to, because it'd be hard to get well-formed XML from your Table of Contents setup anyway.

 

If you're looking for suggestions for a workflow, I can help there.

 

  • First you want to develop a comprehensive and all-encompassing set of paragraph styles to incorporate all the text in your target document. Keep in mind that you want a style/tag for everything in the document to ensured your well formed XML document.
  • Apply the styles to everything in the InDesign document. The best way to do that is to select all the text and apply the most common text style/XML tag to everything in the document. Then apply your other styles/tags as exceptions where appropriate. You'll have to manually tag graphics later, and may/should have to apply them manually to tables, but this at least ensures that all your text has styles/XML tags fodder applied up front.
  • Since styles are now applied everywhere in your document, generating your ToC should be easy. Use the appropriate styles you want to break out to generate your ToC, considering whether you want to incorporate the same styles for tagging your ToC content to coincide with your text style/tags. When you create a ToC it essentially creates a separate "story"/text thread you can either label it as such later as a separate article/story, or select all the text and cut/paste it into the start of the main document thread to incorporate it all in the same article/story, as you prefer.
  • With all the text formatting/threading done, it's time to turn the document into XML structure. Map your styles to tags, manually tag your graphics/tables. Toss your story/article tags into the top/bottom of the thread(s) and be done with it.

 

Hope this helps,

 

Randy

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines