|Atomik Xport SE: Tutorials > Chapter 4 Tutorial 2: Creating Rulesets||<< >>|
The objective of this section of the Tutorial is to enable you to set up the mappings between typographical styles on the InDesign page and the XML elements defined by the DTD. These mappings enable the Atomik Xport Automated Matching System (AMS) to automate the extraction of XML from the InDesign document.
The AMS and the mappings from styles in InDesign to the XML elements in the DTD are the central features of Atomik Xport that make it such a powerful and flexible solution.
Once you have successfully loaded a DTD into Atomik Xport and named your Ruleset (as described above), you are ready to create the mappings that define the Ruleset.
You will see there are three main sections within the Ruleset Editor, two of which contain lists of names. The left-hand list has the title “Document Styles” – this is a list of the paragraph and character sheets used in the currently open InDesign document. Paragraph styles are listed first, followed by character styles. You will see style names such as ‘Bonus Box Text’, ‘Caption’, ‘Display Box Head’ and so on.
The list to the right of the ‘Document Styles’ list has the title ‘DTD Elements’. This list contains the elements defined in the Easy_Magazine.DTD file that you specified. You will see element names such as ‘Accomodation’, ‘Body”, “Brochure” and so on.
There are two possible ways to create a mapping rule
(i) By dragging and dropping the style name, for which you wish to create a mapping rule, from the Document Styles list onto an element.
(ii) By dragging and dropping a sample of the text, for which you wish to create a mapping rule, directly from the InDesign page onto a DTD element.
New rule created for the ‘Body’ element
You will see that you have created a rule for the ‘Body’ element as illustrated above. The new rule you just created should look as follows:
¶ Hotel Text
You have now created a rule using an InDesign style. You now need to repeat this process to create mapping rules for the other styles in the InDesign document.
Ignore the mapping of ‘Hotel Text’ to Body as you have already created rules for this style and element. Take care when creating the rules that you associate the styles with the correct DTD element.
|Document Style||DTD Element|
|Bonus Box Head||HotelHead|
|Bonus Box Text||HotelText|
|Running Header left||LocationName|
|Running Header right|
|Bonus Box Italic||OffersText|
|Display Box Head||FacilitiesHead|
|Display Box Text||FacilitiesBody|
Note: you do not need to create rules for the three ‘Running Footer’ styles.
|Document Style:||DTD Element:|
There is no need to create any rules for the Normal character style sheet.
Once you have created a rule for each style you wish to extract to XML, the basic ruleset creation process is complete. In the next section you will learn how to create mappings directly from the page.
Note: In order to create mappings direct from the page you will need to have ‘Drag and Drop Text Editing’ enabled in InDesign. In Preferences > Type select the two checkboxes in the ‘Drag and Drop Text Editing’ section.
If you are displaying Paragraph Styles InDesign, you will see that the hotel name ‘GOLDEN GATE BAY HOTEL’ has ‘[Basic Paragraph]’ associated with it, rather than the style ‘Hotel Name’. Without a mapped style, this text will not be extracted.
Dragging and dropping text onto the ‘HotelName’ element
Ruleset Editor with the ‘HotelName’ element mapped
On the right hand side of the Ruleset Editor, there is a box that displays the mapping rules for whichever DTD element is selected. As you have just created a mapping to the ‘HotelName’ DTD element, the rule you just created will be displayed in this box as follows:
¶ [Basic Paragraph]
Myriad Pro 10.0pt [USA blue] All Caps
You have now created a rule directly from the page.