• Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • 2.2.2, 2.3.0
    • 2.2.1
    • None
    • None

      When you export CDM, table are well present on infoBlockType.

      However, when you import this infoBlock, table are ignored.
      It will be best to support table import.

          [ODF-932] Import CDM : Add table

          Laurence Aumeunier added a comment - - edited

          Do not work if table has no header

          Laurence Aumeunier added a comment - - edited Do not work if table has no header

          Je ne reproduit pas. Le rendu est identique pour moi coté saisie et portail (cf. Import-Export.png)

          Laurence Aumeunier added a comment - Je ne reproduit pas. Le rendu est identique pour moi coté saisie et portail (cf. Import-Export.png)

          Olivier Gehin added a comment -

          A l'import je n'ai que la table, pas les cellules.

          Olivier Gehin added a comment - A l'import je n'ai que la table, pas les cellules.

          Olivier Gehin added a comment -

          Done for a project to adapt :

           <xsl:template match="xhtml:table">
                  <docbook:table>
                      <xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
                      <xsl:if test="$width = '100%'">
                          <xsl:attribute name="width">100%</xsl:attribute>
                      </xsl:if>
                      
                      <xsl:if test="caption/text()">
                          <xsl:attribute name="title"><xsl:value-of select="caption/text()"/></xsl:attribute>
                          
                          <xsl:variable name="captionTextAlign" select="editor:getStyleValue(caption/@style, 'text-align')"/>
                          <xsl:if test="$captionTextAlign != ''">
                              <xsl:attribute name="titleAlign"><xsl:value-of select="$captionTextAlign"/></xsl:attribute>
                          </xsl:if>
                      </xsl:if>
                      
                      <xsl:copy-of select="@class"/>
                      <xsl:copy-of select="@summary"/>
                      <xsl:copy-of select="@align"/>
                      <xsl:copy-of select="@marker"/>
                      
                      <xsl:apply-templates select="xhtml:tbody"/>
                  </docbook:table>
              </xsl:template>
              
              <xsl:template match="xhtml:tbody">
                  <docbook:tbody>
                  	<xsl:copy-of select="@class"/>
                      <xsl:apply-templates select="xhtml:tr"/>
                  </docbook:tbody>
              </xsl:template>
              
              <xsl:template match="xhtml:tr">
                  <docbook:tr>
                  	<xsl:copy-of select="@class"/>
                      <xsl:apply-templates select="xhtml:td|xhtml:th"/>
                  </docbook:tr>
              </xsl:template>
              <xsl:template match="xhtml:th">
              	<docbook:th>
              		<xsl:copy-of select="@class"/>
                      <xsl:copy-of select="@colspan"/>
                      <xsl:copy-of select="@rowspan"/>
                      
                      <xsl:variable name="valign" select="editor:getStyleValue(@style, 'vertical-align')"/>
                      <xsl:if test="$valign != ''">
                          <xsl:attribute name="valign"><xsl:value-of select="$valign"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="align" select="editor:getStyleValue(@style, 'text-align')"/>
                      <xsl:if test="$align != ''">
                          <xsl:attribute name="align"><xsl:value-of select="$align"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="height" select="editor:getStyleValue(@style, 'height')"/>
                      <xsl:if test="$height != ''">
                          <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
                      <xsl:if test="$width != ''">
                          <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:apply-templates/>
                  </docbook:th>
              </xsl:template>    
              <xsl:template match="xhtml:td">
                  <docbook:td>
                  	<xsl:copy-of select="@class"/>
                      <xsl:copy-of select="@colspan"/>
                      <xsl:copy-of select="@rowspan"/>
                      
                      <xsl:variable name="valign" select="editor:getStyleValue(@style, 'vertical-align')"/>
                      <xsl:if test="$valign != ''">
                          <xsl:attribute name="valign"><xsl:value-of select="$valign"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="align" select="editor:getStyleValue(@style, 'text-align')"/>
                      <xsl:if test="$align != ''">
                          <xsl:attribute name="align"><xsl:value-of select="$align"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="height" select="editor:getStyleValue(@style, 'height')"/>
                      <xsl:if test="$height != ''">
                          <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:variable name="width" select="editor:getStyleValue(@style, 'width')"/>
                      <xsl:if test="$width != ''">
                          <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute>
                      </xsl:if>
                      
                      <xsl:apply-templates/>
                  </docbook:td>
              </xsl:template>
          
          

          Olivier Gehin added a comment - Done for a project to adapt : <xsl:template match= "xhtml:table" > <docbook:table> <xsl:variable name= "width" select= "editor:getStyleValue(@style, 'width' )" /> <xsl: if test= "$width = '100%' " > <xsl:attribute name= "width" >100%</xsl:attribute> </xsl: if > <xsl: if test= "caption/text()" > <xsl:attribute name= "title" ><xsl:value-of select= "caption/text()" /></xsl:attribute> <xsl:variable name= "captionTextAlign" select= "editor:getStyleValue(caption/@style, 'text-align' )" /> <xsl: if test= "$captionTextAlign != ''" > <xsl:attribute name= "titleAlign" ><xsl:value-of select= "$captionTextAlign" /></xsl:attribute> </xsl: if > </xsl: if > <xsl:copy-of select= "@class" /> <xsl:copy-of select= "@summary" /> <xsl:copy-of select= "@align" /> <xsl:copy-of select= "@marker" /> <xsl:apply-templates select= "xhtml:tbody" /> </docbook:table> </xsl:template> <xsl:template match= "xhtml:tbody" > <docbook:tbody> <xsl:copy-of select= "@class" /> <xsl:apply-templates select= "xhtml:tr" /> </docbook:tbody> </xsl:template> <xsl:template match= "xhtml:tr" > <docbook:tr> <xsl:copy-of select= "@class" /> <xsl:apply-templates select= "xhtml:td|xhtml:th" /> </docbook:tr> </xsl:template> <xsl:template match= "xhtml:th" > <docbook:th> <xsl:copy-of select= "@class" /> <xsl:copy-of select= "@colspan" /> <xsl:copy-of select= "@rowspan" /> <xsl:variable name= "valign" select= "editor:getStyleValue(@style, 'vertical-align' )" /> <xsl: if test= "$valign != ''" > <xsl:attribute name= "valign" ><xsl:value-of select= "$valign" /></xsl:attribute> </xsl: if > <xsl:variable name= "align" select= "editor:getStyleValue(@style, 'text-align' )" /> <xsl: if test= "$align != ''" > <xsl:attribute name= "align" ><xsl:value-of select= "$align" /></xsl:attribute> </xsl: if > <xsl:variable name= "height" select= "editor:getStyleValue(@style, 'height' )" /> <xsl: if test= "$height != ''" > <xsl:attribute name= "height" ><xsl:value-of select= "$height" /></xsl:attribute> </xsl: if > <xsl:variable name= "width" select= "editor:getStyleValue(@style, 'width' )" /> <xsl: if test= "$width != ''" > <xsl:attribute name= "width" ><xsl:value-of select= "$width" /></xsl:attribute> </xsl: if > <xsl:apply-templates/> </docbook:th> </xsl:template> <xsl:template match= "xhtml:td" > <docbook:td> <xsl:copy-of select= "@class" /> <xsl:copy-of select= "@colspan" /> <xsl:copy-of select= "@rowspan" /> <xsl:variable name= "valign" select= "editor:getStyleValue(@style, 'vertical-align' )" /> <xsl: if test= "$valign != ''" > <xsl:attribute name= "valign" ><xsl:value-of select= "$valign" /></xsl:attribute> </xsl: if > <xsl:variable name= "align" select= "editor:getStyleValue(@style, 'text-align' )" /> <xsl: if test= "$align != ''" > <xsl:attribute name= "align" ><xsl:value-of select= "$align" /></xsl:attribute> </xsl: if > <xsl:variable name= "height" select= "editor:getStyleValue(@style, 'height' )" /> <xsl: if test= "$height != ''" > <xsl:attribute name= "height" ><xsl:value-of select= "$height" /></xsl:attribute> </xsl: if > <xsl:variable name= "width" select= "editor:getStyleValue(@style, 'width' )" /> <xsl: if test= "$width != ''" > <xsl:attribute name= "width" ><xsl:value-of select= "$width" /></xsl:attribute> </xsl: if > <xsl:apply-templates/> </docbook:td> </xsl:template>

            Unassigned Unassigned
            ogehin Olivier Gehin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: