{"id":1705,"date":"2016-02-19T17:33:51","date_gmt":"2016-02-19T15:33:51","guid":{"rendered":"http:\/\/www.ozalto.com\/en\/?p=1705"},"modified":"2016-02-19T17:33:42","modified_gmt":"2016-02-19T15:33:42","slug":"5-errors-you-will-do-with-indesign-xml","status":"publish","type":"post","link":"https:\/\/www.ozalto.com\/en\/5-errors-you-will-do-with-indesign-xml\/","title":{"rendered":"5 errors you will do with InDesign XML"},"content":{"rendered":"<p><strong>XML Import within Adobe InDesign is tricky\u00a0for rookies.<\/strong> It&#8217;s likely you will fall into one of its\u00a0many pitfalls. <strong>You have to follow some rules if you want to get your catalog, directory or book project perfectly populated<\/strong>!<\/p>\n<p><strong>Here are 5 errors you will probably do<\/strong> unless you read carefully\u00a0this article.<\/p>\n<h3>1)\u00a0Ignore the true nature of XML<\/h3>\n<p>Importing a XML file within InDesign is a piece of cake. But <strong>once loaded, you may think you have a nice and layout free database.<\/strong> So <strong>eventually InDesign will pick whatever data it needs<\/strong> within that structure.<\/p>\n<p><strong>Well\u2026not really.<\/strong><\/p>\n<blockquote><p>InDesign XML is nothing but tagged text !<\/p><\/blockquote>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1707\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow.png\" alt=\"En important du contenu XML dans le document, on obtient un article !\" width=\"451\" height=\"323\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow.png 1300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-300x215.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-768x551.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-1024x734.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-800x574.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-516x370.png 516w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-84x60.png 84w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlflow-439x315.png 439w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><\/p>\n<p>In above figure, dropping a XML Element within the document will place all the nodes as a continuous tagged texts article.<\/p>\n<p>Once you got that,\u00a0next points will be easier to understand.<\/p>\n<h3>2) Import different structures<\/h3>\n<p><strong>One of the hardest rule is that incoming structure MUST match the existing structure.<\/strong><br \/>\nNot something you care on the original importation. However once a layout is set with all tags needed, it becomes dramatically important.<\/p>\n<p>If you do import mismatching structures and think InDesign will dela with it\u2026<\/p>\n<blockquote><p>You may\u00a0suffer,\u00a0a lot!<\/p><\/blockquote>\n<p><strong>Imagine that basic\u00a0structure:<\/strong><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1709\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc.png\" alt=\"Structure de base dans InDesign\" width=\"450\" height=\"277\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc.png 1102w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-300x185.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-768x473.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-1024x630.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-800x492.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-530x326.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-98x60.png 98w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_basique_abc-512x315.png 512w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>And <strong>this existing structure.<\/strong><\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">&lt;Root&gt;\r\n &lt;a&gt;A&lt;\/a&gt;\r\n &lt;c&gt;C&lt;\/c&gt;\r\n &lt;b&gt;B&lt;\/b&gt;\r\n&lt;\/Root&gt;\r\n<\/pre>\n<p><strong>And you think InDesign will deal with\u00a0your\u00a0mess\u2026?<\/strong><\/p>\n<p>Here is what you will get eventually:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1708\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch.png\" alt=\"Problemes d'import XML\" width=\"450\" height=\"284\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch.png 1082w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-300x189.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-768x484.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-1024x645.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-800x504.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-530x334.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-95x60.png 95w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/structure_import_mismatch-500x315.png 500w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p style=\"text-align: left;\">When\u00a0the incoming &lt;a&gt; tag found an appropriate &lt;a&gt; tag within InDesign (same index) and the content was placed within that node. Then a &lt;c&gt; comes in and found\u00a0a &lt;b&gt; at its index. &lt;c&gt; says : &#8220;Hey, I am not a &lt;b&gt;, looking forward\u2026&#8221;. Then &lt;c&gt; found\u00a0a &lt;c&gt; and the content was\u00a0placed.Then entered &lt;b&gt; after &lt;c&gt; but &lt;b&gt; couldn&#8217;t find any following &lt;b&gt; tag, so it\u00a0was\u00a0added as it.<\/p>\n<p style=\"text-align: left;\"><strong>Nothing close to what we could expect, right ?<\/strong><\/p>\n<p>At no point, InDesign is going to look backwards to deal with the incoming tags!<\/p>\n<h3>3) Overuse frames<\/h3>\n<p>Quite logically, <strong>rookies tend to\u00a0use and abuse of frames.<\/strong> Once for the price, one for the description, etc. Eventually a &#8220;nature morte&#8221; of frames. <strong>Charming yet inefficient.<\/strong><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1710\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame.png\" alt=\"module_frame\" width=\"450\" height=\"349\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame.png 1908w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-300x233.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-768x596.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-1024x794.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-774x600.png 774w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-477x370.png 477w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-77x60.png 77w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/module_frame-406x315.png 406w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>Remember that your structure is text made. So keep in mind <strong>your fundamental brick is a story within a text frame.<\/strong> Whatever the nature of your project, it will starts with an unique text frame.<\/p>\n<blockquote><p>use boxes as few as possible<\/p><\/blockquote>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1711\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules.png\" alt=\"textRules\" width=\"450\" height=\"339\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules.png 1454w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-300x226.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-768x579.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-1024x772.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-796x600.png 796w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-491x370.png 491w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-80x60.png 80w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/textrules-418x315.png 418w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>So <strong>try to mimick frames, position and spacings with texts attributes.<\/strong> A paragraph rule can simulate a frame. Leading, spaces after\/before, indents and tabs can dispatch items like you would it would be isolated frames.<\/p>\n<p>You tried that but <strong>you really need a floating frame for the pictures ?<\/strong> Well <strong>use anchored frames<\/strong>\u00a0in combination of\u00a0<strong>objet styles<\/strong> to layout control.<\/p>\n<h3>4) Forget\u00a0styles<\/h3>\n<p>A few of you may already know that you can map tags to styles.<strong> It&#8217;s always good practice to use\u00a0styles<\/strong> so <strong>any tags you try to add will be linked to the appropriate style.<\/strong><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1714\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles.png\" alt=\"association_styles\" width=\"450\" height=\"169\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles.png 1178w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-300x113.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-768x288.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-1024x384.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-800x300.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-530x199.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-120x45.png 120w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/association_styles-840x315.png 840w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1713\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix.png\" alt=\"tarif_prix\" width=\"449\" height=\"225\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix.png 994w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-300x150.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-768x385.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-800x401.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-530x266.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-120x60.png 120w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/tarif_prix-629x315.png 629w\" sizes=\"(max-width: 449px) 100vw, 449px\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1712\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique.png\" alt=\"style_applique\" width=\"451\" height=\"146\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique.png 1230w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-300x97.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-768x249.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-1024x331.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-800x259.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-530x171.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-120x39.png 120w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/style_applique-950x307.png 950w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><\/p>\n<p style=\"text-align: center;\">The &#8220;price&#8221; styles is automatically applied to the associated tag.<\/p>\n<p>However <strong>one hiccup<\/strong> is that <strong>you can&#8217;t apply different styles to tags regarding to their\u00a0location.<\/strong> For ex. you would like p tags to be in arial in text\/p but in Times in headline\/p. No way with mapping.\u00a0You would have to <strong>set styles<\/strong> within the xml file thanks to <strong>aid namespaces<\/strong> and aid:pstyle and aid:cstyle to call styles more smoothely. <strong>An alternative is to use scripting.<\/strong><\/p>\n<h3>5) Lack of abstraction<\/h3>\n<p><strong>Catalog or directories projects tend to offer a repetitive pattern.<\/strong>\u00a0A bad approach would be to set a really descriptive structure like below\u00a0:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1718\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout.png\" alt=\"What you shouldn't do with XML\" width=\"450\" height=\"277\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout-300x184.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout-530x326.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout-98x60.png 98w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/badxmllayout-513x315.png 513w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p>That could work somehow. However\u00a0that would lead to a lot tagging within InDesign and <strong>would definitively lack of scalability.<\/strong> If you have two or three players, well why not but what if you have to work with hundreds ?<\/p>\n<blockquote><p>There is so much better to do !<\/p><\/blockquote>\n<p><strong>Thanks to abstraction<\/strong> and some options, <strong>InDesign is going to work for us.<\/strong> Let&#8217;s consider that structure:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1717\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout.png\" alt=\"goodXMLLayout\" width=\"451\" height=\"127\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout.png 816w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout-300x85.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout-768x216.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout-800x225.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout-530x149.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/goodxmllayout-120x34.png 120w\" sizes=\"(max-width: 451px) 100vw, 451px\" \/><\/p>\n<p><strong>We only have one player module.<\/strong>\u00a0Thanks to the &#8220;Clone the repeated text elements&#8221; you will find in the XML Import Options, InDesign is going to duplicate our module as many times as needed:<\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1716\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions.png\" alt=\"xmlImportOptions\" width=\"450\" height=\"231\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions.png 1670w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-300x154.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-768x395.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-1024x526.png 1024w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-800x411.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-530x272.png 530w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-117x60.png 117w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlimportoptions-613x315.png 613w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p style=\"text-align: center;\"><img decoding=\"async\" class=\"aligncenter wp-image-1715\" src=\"http:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult.png\" alt=\"xmlResult\" width=\"450\" height=\"329\" srcset=\"https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult.png 814w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-300x220.png 300w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-768x562.png 768w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-800x586.png 800w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-505x370.png 505w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-82x60.png 82w, https:\/\/www.ozalto.com\/wp-content\/uploads\/2016\/02\/xmlresult-430x315.png 430w\" sizes=\"(max-width: 450px) 100vw, 450px\" \/><\/p>\n<p style=\"text-align: center;\"><strong>Et voil\u00e0 !<\/strong><\/p>\n<p><strong>I hope this article will help you avoiding common mistakes<\/strong> and get faster results. If you want to share other typical errors, feel free to do so into the comments.<\/p>\n<p><strong>If you want a XML Import training or consulting services for your publishing projects, <a href=\"http:\/\/www.ozalto.com\/en\/about\/contact-2\/\" target=\"_blank\">contact us !<\/a><\/strong><\/p>\n<p>See you soon !<\/p>\n","protected":false},"excerpt":{"rendered":"<p>XML Import within Adobe InDesign is tricky\u00a0for rookies. It&#8217;s likely you will fall into one of its\u00a0many pitfalls. You have to follow some rules if you want to get your catalog, directory or book project perfectly populated! Here are 5 errors you will probably do unless you read carefully\u00a0this article. 1)\u00a0Ignore the true nature of [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1719,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[43,5,15],"tags":[82,76,81,75],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/1705\/"}],"collection":[{"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/"}],"about":[{"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/types\/post\/"}],"author":[{"embeddable":true,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/users\/2\/"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/comments\/?post=1705"}],"version-history":[{"count":0,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/posts\/1705\/revisions\/"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/media\/1719\/"}],"wp:attachment":[{"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/media\/?parent=1705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/categories\/?post=1705"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ozalto.com\/en\/wp-json\/wp\/v2\/tags\/?post=1705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}