3 Replies Latest reply on Nov 4, 2015 10:46 AM by federico platon

    How to tag an inDesign document so that some tagged elements are exported in between other tags?

    grantspilsbury

      It is easy to tag a single piece of content and then export it as xml in inDesign. If I add a text block and then export I get the following:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <Root>

      <content>Simple text block</content>

      </Root>

      What I'm struggling to do is to get it to export tags / content within another set of tags. Example: I want to tag my document so that it exports as so:

      <?xml version='1.0' encoding='UTF-8'?>

      <article>

      <id>123</id>

      <content>

      <body>Some text</body>

      <headline>Some other text</headline>

      </content>

      </article>

      Here is what I tried:

      Screen Shot 2015-11-04 at 10.16.58 AM.png

      When I exported the xml I got the following:

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>

      <article>

      <content>Simple text block</content>

      <id>123</id>

      <content></content>

      <body>Some text</body>

      <headline>Some other text</headline>

      </article>

      The body and headline tags are not within the content tags.

      How do I tag the elements so that it export tags / content within another set of tags?

        • 1. Re: How to tag an inDesign document so that some tagged elements are exported in between other tags?
          federico platon Adobe Community Professional & MVP

          Just use a text frame and tag it as content.

          Place both texts inside a tag each paragraph or block with their corresponding headline and body tags.

          Tags on text should match or be assigned to paragraph (character) styles.

          • 2. Re: How to tag an inDesign document so that some tagged elements are exported in between other tags?
            grantspilsbury Level 1

            Thanks for the reply. Can you clarify a few things?

             

            I create the content text frame and tag it as content.

            I then create the headline text frame, outside of the content text frame, and tag it as headline.

            I then drag / move the headline text frame on top of the context text frame.

            I do the same with the body text frame.

             

            It still exports the elements separately and not within the content tags.

             

            My questions:

            I create the text frames using the 'T' icon in the side menu. Correct?

            I can't create the headline text frame on top of the content text frame as it is expecting me to type text (shown by the cursor).

            How do I place the texts inside a tag?

            What does this mean: "Tags on text should match or be assigned to paragraph (character) styles."

            • 3. Re: How to tag an inDesign document so that some tagged elements are exported in between other tags?
              federico platon Adobe Community Professional & MVP

              Could not access to the Forum before.

               

              What I see working is use just one text frame for both blocks of text.

               

              That's a text frame where the first paragraph uses a tag of Headline

              and all the other text is tagged as body.

              Then tag the text frame as Content.

               

              See the structure tree panel (Ctrl+Alt+1)  where the it shows Root >Content>Headline, Body.

              When exporting to XML you will get <Content> </Content> tags around both couples of tags for Headline and Body as you need.

               

              If you wish to apply text styles to tagged text it is convenient you create a relationship, mapping, assigning those styles to tags.

              Also if you wish to apply tags to text based on the text styles applied (Headline, Body,...) just assign tags to styles.

              It's convenient to use same wording for both (take care of using Capitals)

              How to apply and create the mapping?:

              In the side menu of Tags panel you have commands for accessing to panels for those tasks:

              tags.png