Dear XFC support,

we're currently trying to generate lists in Word documents which should behave 
as such in MS Word, e.g. with the attached fo.xsl file. Unfortunately Word only 
detects some of the items as list items (normally at least the first one), but 
not all of them and for nested list items (e.g. 3.1, 3.2, ...) this seems to 
behave even worse. According to the XMLmind XSL-FO Converter conformance 
statement lists should basically be supported (at least list-items and 
list-item-bodies). So we'd like to know if this is already the best output we 
can get, or if we could improve that somehow. I've also attached one of our 
generated docx files with the current output.
Additionally we'd like to know if it's possible to generate nested linked 
lists. So when the user e.g. removes one item, the following ones, including 
their children, should be updated accordingly.




Involved program: XMLmind XSL-FO Converter Engine



XFC-Version: 4.7



OS: Windows 8.1



MS-Word: 2010 & 2013



Java Version: 1.7

Thank you and best regards,
Matthias Schwarz


--
Matthias Schwarz
Software Development Tester

[Description: Description: Description: Description: Description: Description: 
cid:[email protected]]

INFINICA GmbH
Leonard-Bernstein-Straße 10
A-1220 Wien
Österreich
Tel +43 1 26 31 296
Fax +43 1 4095987-11

www.infinica.com<http://www.infinica.com/>
[email protected]<mailto:[email protected]>

P Please consider the environment before printing this email

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"; xmlns:inf-el="http://www.infinica.com/elements";
                xmlns:inf-fn="http://www.infinica.com/functions"; xmlns:svg="http://www.w3.org/2000/svg";
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
  <xsl:import href="infinica://resources/xsl/list-transformations.xsl"/>
  <xsl:variable name="_infinica_metadata" select="."/>
  <xsl:template match="/" priority="10">
    <fo:root>
      <fo:layout-master-set>
        <fo:simple-page-master margin-bottom="20.4mm" margin-left="31.75mm" margin-right="31.75mm"
                               margin-top="20.4mm" master-name="A4" page-height="297.0mm"
                               page-width="210.0mm">
          <fo:region-body margin-bottom="5.0mm" margin-left="0.0" margin-right="0.0"
                          margin-top="5.0mm" region-name="body"/>
          <fo:region-before extent="5.0mm" precedence="false" region-name="header"/>
          <fo:region-after extent="5.0mm" precedence="false" region-name="footer"/>
          <fo:region-start extent="0.0" region-name="left"/>
          <fo:region-end extent="0.0" region-name="right"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="A4">
        <fo:flow flow-name="body">
          <fo:block linefeed-treatment="preserve" white-space-collapse="false" white-space-treatment="inherit">
            <xsl:variable name="contents_List-d48f243a-5e82-44d8-8739-cd2e00682c9e">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 1</xsl:text>
                </fo:inline>
              </fo:block>
            </xsl:variable>
            <xsl:variable name="transformed_List-d48f243a-5e82-44d8-8739-cd2e00682c9e">
              <xsl:call-template name="list-transformation">
                <xsl:with-param name="contents" select="$contents_List-d48f243a-5e82-44d8-8739-cd2e00682c9e"/>
                <xsl:with-param name="style" select="'decimal'"/>
              </xsl:call-template>
            </xsl:variable>
            <xsl:if test="$transformed_List-d48f243a-5e82-44d8-8739-cd2e00682c9e/*">
              <fo:list-block>
                <xsl:copy-of select="$transformed_List-d48f243a-5e82-44d8-8739-cd2e00682c9e/*"/>
              </fo:list-block>
            </xsl:if>
          </fo:block>
          <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                    white-space-treatment="inherit">
            <fo:inline>
              <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
            </fo:inline>
          </fo:block>
          <fo:block linefeed-treatment="preserve" white-space-collapse="false" white-space-treatment="inherit">
            <xsl:variable name="contents_List-e17f1ebe-4bfc-48e5-808b-ee96faa2cf7d">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 2</xsl:text>
                </fo:inline>
              </fo:block>
            </xsl:variable>
            <xsl:variable name="transformed_List-e17f1ebe-4bfc-48e5-808b-ee96faa2cf7d">
              <xsl:call-template name="list-transformation">
                <xsl:with-param name="contents" select="$contents_List-e17f1ebe-4bfc-48e5-808b-ee96faa2cf7d"/>
                <xsl:with-param name="style" select="'decimal'"/>
                <xsl:with-param name="startValue" select="2"/>
              </xsl:call-template>
            </xsl:variable>
            <xsl:if test="$transformed_List-e17f1ebe-4bfc-48e5-808b-ee96faa2cf7d/*">
              <fo:list-block>
                <xsl:copy-of select="$transformed_List-e17f1ebe-4bfc-48e5-808b-ee96faa2cf7d/*"/>
              </fo:list-block>
            </xsl:if>
          </fo:block>
          <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                    white-space-treatment="inherit">
            <fo:inline>
              <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
            </fo:inline>
          </fo:block>
          <fo:block linefeed-treatment="preserve" white-space-collapse="false" white-space-treatment="inherit">
            <xsl:variable name="contents_List-690495f9-b3e9-4004-a9c5-44f256680767">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 3</xsl:text>
                </fo:inline>
              </fo:block>
            </xsl:variable>
            <xsl:variable name="transformed_List-690495f9-b3e9-4004-a9c5-44f256680767">
              <xsl:call-template name="list-transformation">
                <xsl:with-param name="contents" select="$contents_List-690495f9-b3e9-4004-a9c5-44f256680767"/>
                <xsl:with-param name="style" select="'decimal'"/>
                <xsl:with-param name="startValue" select="3"/>
              </xsl:call-template>
            </xsl:variable>
            <xsl:if test="$transformed_List-690495f9-b3e9-4004-a9c5-44f256680767/*">
              <fo:list-block>
                <xsl:copy-of select="$transformed_List-690495f9-b3e9-4004-a9c5-44f256680767/*"/>
              </fo:list-block>
            </xsl:if>
          </fo:block>
          <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                    white-space-treatment="inherit">
            <fo:inline>
              <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
            </fo:inline>
          </fo:block>
          <xsl:variable name="contents_List-5bc47238-86cb-407b-a120-bd251ec228b8">
            <fo:block linefeed-treatment="preserve" margin-left="4.0mm" white-space-collapse="false"
                      white-space-treatment="inherit">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 3.1</xsl:text>
                </fo:inline>
              </fo:block>
              <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
                </fo:inline>
              </fo:block>
            </fo:block>
            <fo:block linefeed-treatment="preserve" margin-left="4.0mm" white-space-collapse="false"
                      white-space-treatment="inherit">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 3.2</xsl:text>
                </fo:inline>
              </fo:block>
              <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
                </fo:inline>
              </fo:block>
            </fo:block>
            <fo:block linefeed-treatment="preserve" margin-left="4.0mm" white-space-collapse="false"
                      white-space-treatment="inherit">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 3.3</xsl:text>
                </fo:inline>
              </fo:block>
              <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
                </fo:inline>
              </fo:block>
            </fo:block>
          </xsl:variable>
          <xsl:variable name="transformed_List-5bc47238-86cb-407b-a120-bd251ec228b8">
            <xsl:call-template name="list-transformation">
              <xsl:with-param name="contents" select="$contents_List-5bc47238-86cb-407b-a120-bd251ec228b8"/>
              <xsl:with-param name="style" select="'decimal'"/>
              <xsl:with-param name="numberPrefix" select="'3.'"/>
            </xsl:call-template>
          </xsl:variable>
          <xsl:if test="$transformed_List-5bc47238-86cb-407b-a120-bd251ec228b8/*">
            <fo:list-block>
              <xsl:copy-of select="$transformed_List-5bc47238-86cb-407b-a120-bd251ec228b8/*"/>
            </fo:list-block>
          </xsl:if>
          <fo:block linefeed-treatment="preserve" white-space-collapse="false" white-space-treatment="inherit">
            <xsl:variable name="contents_List-9a362d87-492a-4eab-b7a9-76b48534c764">
              <fo:block linefeed-treatment="preserve" white-space-collapse="false"
                        white-space-treatment="inherit">
                <fo:inline>
                  <xsl:text>Heading 4</xsl:text>
                </fo:inline>
              </fo:block>
            </xsl:variable>
            <xsl:variable name="transformed_List-9a362d87-492a-4eab-b7a9-76b48534c764">
              <xsl:call-template name="list-transformation">
                <xsl:with-param name="contents" select="$contents_List-9a362d87-492a-4eab-b7a9-76b48534c764"/>
                <xsl:with-param name="style" select="'decimal'"/>
                <xsl:with-param name="startValue" select="4"/>
              </xsl:call-template>
            </xsl:variable>
            <xsl:if test="$transformed_List-9a362d87-492a-4eab-b7a9-76b48534c764/*">
              <fo:list-block>
                <xsl:copy-of select="$transformed_List-9a362d87-492a-4eab-b7a9-76b48534c764/*"/>
              </fo:list-block>
            </xsl:if>
          </fo:block>
          <fo:block linefeed-treatment="preserve" margin-bottom="4.0mm" white-space-collapse="false"
                    white-space-treatment="inherit">
            <fo:inline>
              <xsl:text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.</xsl:text>
            </fo:inline>
          </fo:block>
          <fo:block id="_last-block"/>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>
</xsl:stylesheet>

Attachment: list_example.docx
Description: list_example.docx

--
XMLmind FO Converter Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xfc-support

Reply via email to