2 Replies Latest reply on Aug 1, 2011 1:38 PM by Stefan Gentz (tracom.de)

    Don't get aid5:tablestyle working on xml import

    Stefan Gentz (tracom.de)

      Hi,

       

      I'm trying to import the following (dita) xml to InDesign CS5.5:

       

      <?xml version="1.0" encoding="utf-8"?>
      
      
      <topic id="installing" xmlns:aid="http://ns.adobe.com/AdobeInDesign/4.0/" xmlns:aid5="http://ns.adobe.com/AdobeInDesign/5.0/">
      
      <title>Troubleshooting</title>
      <shortdesc>Explains how to ...</shortdesc>
      <body>
      <p>Try the following:</p>
      <table id="table_gyf_iuw_dd" aid5:tablestyle="NameOfMyInDesignTableStyle">
      <tgroup cols="2">
      <colspec colname="c1" colnum="1"/>
      <colspec colname="c2" colnum="2"/>
      <thead>
      <row>
      <entry>Problem</entry>
      <entry>Solution</entry>
      </row>
      </thead>
      <tbody>
      <row>
      <entry>My XML is not valid.</entry>
      <entry>Fix any structure problems in your xml.</entry>
      </row>
      <row>
      <entry>XML import still fails.</entry>
      <entry>Try a professional XML tool.</entry>
      </row>
      </tbody>
      </tgroup>
      </table>
      </body>
      </topic>
      

       

      The import of the dita xml works fine and my CALS tables also import properly. However, InDesign does not apply the table style (here: "NameOfMyInDesignTableStyle") as expected. I have created table and cell styles in the InDesign document/template and refer to them with the aid5:tablestyle attribute. It doesn't make a difference, by the way, if I declare the namespace in root element <topic> or in <table>.

       

      Anyone any ideas?

       

      Kind regards,

      Stefan Gentz

        • 1. Re: Don't get aid5:tablestyle working on xml import
          John Hawkinson Level 5

          I don't think that aid5:tablestyle works on CALS tables.

          Have you tried applying it to the enclosing <body/> tag?

          If that doesn't work, I think you'll have to apply your table style some other way, such as a script.

          Or convert to not using CALS tables.

          • 2. Re: Don't get aid5:tablestyle working on xml import
            Stefan Gentz (tracom.de) Level 1

            Hi John,

             

            I cannot find any adobe documentation confirming that aid5:tablestyle does not work on CALS tables. However, it seems that it works on any fancy construction but CALS. Even this converts to a table fine:

             


            <list aid:table="table" aid:trows="3" aid:tcols="2" aid5:tablestyle="MyInDesignTableStyle">
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100" aid:theader="">Problem</listitem>
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1" aid:ccolwidth="100" aid:theader="">Solution</listitem>
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1">My XML is not valid.</listitem>
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1">Fix any structure problems in your xml.</listitem>
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1">XML import still fails.</listitem>
            <listitem aid:table="cell" aid:crows="1" aid:ccols="1">Try a professional XML tool.</listitem>
            </list>

             

            Cheers,

            *Stefan.