• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 13. Using XML > Importing and applying XML tags

Importing and applying XML tags

You can create XML tags within your InDesign CS2 layout, or you can import them from another InDesign CS2 document or a Document Type Definition (DTD). In this exercise, you will import several new tags, and then apply the tags to objects in the layout.

1.
Select the Type tool () and click anywhere in the text of the sidebar titled “Super Skiing” along the right side of the document. No tags in the Tags palette are highlighted, as tags have not been applied to this text.

When the cursor is placed within tagged text, or when a tagged object is selected, the tag applied to the text or object is highlighted in the Tags palette. Because this text is not yet tagged, no tag name is highlighted. You will import several new tags, and then apply them.

2.
Choose Edit > Deselect All.

3.
In the Tags palette, choose Load Tags from the palette menu. Navigate to the Lesson_13 folder and choose the tags.xml file, then click Open. InDesign adds two new tags into the Tags palette: Head1 and Image. You will apply these tags to objects and text in your layout.

Note

The names of the tags must exactly match those used in your XML workflow. XML is very precise, causing head1 and Head1 to be considered different tags.

4.
In the tools palette, choose the Selection tool (), click the text frame containing the headline text “Family Fun,” and click the Head1 tag in the Tags palette. The Head1 tag is now applied to this text frame and all its contents. The frame containing the Family Fun text becomes blue, reflecting the tag that has been applied to it.

5.
In the Tools palette, select the Type tool (). Click and drag to select the headline “Good Snow” in the second column. Click the Head2 tag in the Tags palette. The tag is applied to the selected text. Brackets appear at the start and end of the selected text, identifying that the text is tagged. The color of the brackets corresponds to the color of the tag. If necessary, choose View > Structure > Show Tag Markers to display the text tags.

Note

You may need to deselect the text to clearly see the tag markers that are applied to it. Choose Edit > Deselect All to deselect the text.

6.
Click and drag to select the body text that follows the “Good Snow” headline. Be sure to select the text in the final two paragraphs of this story, at the bottom of the second column. While the text is selected, click the Body tag in the Tags palette.

7.
If necessary, scroll to view the sidebar in the far right column of the page. Continuing to work with the Type tool, click and drag to select the “Super Skiing” headline, and then click the Head2 tag to apply the tag to this text.

As the Head2 tag is applied, tag markers are displayed at the start and end of the tagged text. The frame also changes colors, as a tag was applied to it at the same time you applied a tag to the headline. This is because a frame must have a tag if any of the contents are also tagged. The tag applied to the frame may be different from the tag applied to the text.

8.
Continuing to work in the sidebar, click and drag to select the remaining text in the third column. Be sure to select all the text that follows the “Super Skiing” headline, without selecting the headline itself. With the text selected, click the Body tag in the Tags palette.

You have completed tagging all the text in the layout.

9.
Choose Edit > Deselect All.

10.
Choose File > Save.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint