4 Replies Latest reply on Jul 13, 2011 11:14 AM by ShibuGeorge

    importing a XML file in my INDD template. I get lots of unwanted paragraph breaks

    ShibuGeorge

      Hi,

       

      I am importing a XML file in my INDD template. I get lots of unwanted paragraph breaks where the closing xml tags for elements appear.

       

      Can someone guide me please to rectify the problem?

       

      Regards,

      ~shibu

        • 1. Re: importing a XML file in my INDD template. I get lots of unwanted paragraph breaks
          John Hawkinson Level 5

          Can you please post a screenshot of the problem along with an excerptof the XML file? Please use >> Syntax Higlighting > XML in the web interface so the XML does not get corrupted.

          • 2. Re: importing a XML file in my INDD template. I get lots of unwanted paragraph breaks
            ShibuGeorge Level 1

            Here is the screen shot from INDD: Though I manage to get rid 0f them when i close up the XML tag manually, I want a sure-shot solution. Thanks for helping me out.

             

            indd-output.JPG

             

            and here is the screen shot of the XML coding:

             

            <para aid:pstyle="4 body text">Another common alkali is potassium hydroxide, KOH.</para>
            <equation><mathphrase>KOH(aq) &#x2192; K<superscript>+</superscript>(aq) + OH<superscript>&#x2013;</superscript>(aq)</mathphrase></equation>
            <qandaset>
            <title aid:pstyle="7 Questions heading"><emphasis role="underline">Questions A</emphasis></title><qandadiv><qandaentry><question><orderedlist numeration="arabic" startingnumber="1">
            <listitem><para aid:pstyle="7 Question text">Two solutions are tested with universal indicator paper. Solution A has a pH of 8 and solution B has a pH of 14. What does this tell you about the two solutions?</para></listitem>
            <listitem><para aid:pstyle="7 Question text">Methyl orange is added to a solution and the solution turns pink. What does this tell you about the solution?</para></listitem><listitem><para aid:pstyle="7 Question text">What does the &#x2018;basicity&#x2019; of an acid refer to?</para></listitem>
            <listitem><para aid:pstyle="7 Question text">Calcium oxide is an example of a base. How do you know this?</para></listitem>
            </orderedlist>
            </question>
            </qandaentry>
            </qandadiv>
            </qandaset>
            </sect1>
            <sect1>
            <title aid:pstyle="3 Heading">What are salts?</title>
            <para aid:pstyle="4 body text">Previously, it was explained that acids contain <emphasis role="bold" aid:cstyle="4 body bold">replaceable hydrogen atoms</emphasis>, and that when <emphasis role="bold" aid:cstyle="4 body bold">metal atoms</emphasis> take their place, a compound called a salt is formed. The names of salts have two parts, as shown:</para>
            <!-- <equation><mediaobject><textobject><figure href="file:///D:/images/reaction2.tif"><title/><para/></figure></textobject></mediaobject></equation> -->
            <para aid:pstyle="4 body text">The table shows the four most common acids and their salt names.</para>
            
            

            • 3. Re: importing a XML file in my INDD template. I get lots of unwanted paragraph breaks
              John Hawkinson Level 5
              Though I manage to get rid 0f them when i close up the XML tag manually, I want a sure-shot solution.

               

              I don't understand what you mean.

               

              But your problem is clear enough:

               

              <listitem><para aid:pstyle="7 Question text">Calcium oxide is an example of a base. How do you know this?</para></listitem>
              </orderedlist>
              </question>
              </qandaentry>
              </qandadiv>
              </qandaset>
              </sect1>

               

              You can't have those blank lines before tag closures if you want them to not show up. So close the tags on the same line, i.e.

               

              </para></listitem></orderedlist></question></qandaentry></qandadiv></qandaset></sect1>
              

               

              If that's not to your liking, there is an XML Import Options checkbox, "Do not import contents of whitespace only elements."

              But it might have undesirable side-effects.

              • 4. Re: importing a XML file in my INDD template. I get lots of unwanted paragraph breaks
                ShibuGeorge Level 1

                yeah, that is the solution so far I see. My XML guy put those blank lines....Thanks a lot for trying to help me.