Hello,

We are using Version 4.3.2 of XFC.

I got a problem concerning Line Breaks when using Dynamic Value. As you can see 
in my attached XSL I set a margin-bottom on every block, which is working fine. 
But for the Dynamic Value 
"$xml1/DocumentData/CAF_Output/Empfaenger/Profil/Gender" the line break is cut 
off in the output RTF, meaning that there is no margin set anymore (only on 
this certain line!). All other line breaks are printed, except for that certain 
block containing the value.

The value "gender" itself is empty in the XML Document in my Test Cases. When 
deleting this value and only using the value "Ansprechpartner", which has 
content in my XML-Document, the line break is there.

When adding a value before the actual "gender"  value with just a space 
character in it, the line break is also visible. When filling in content for 
the value "gender" in the XML the line break is also there.

When rendering the file with FOP, everything is correct.

It seems that empty nodes in an XML are leading to problems when rendering with 
XFC. This problem is also occurring when a certain node just is not there in 
the XML.

Do you have any ideas how to prevent running into these kind of problems?


<?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:param name="xml1" select="/"/>
  <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.0pt" 
margin-right="0.0pt"
                          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.0pt" region-name="left"/>
          <fo:region-end extent="0.0pt" region-name="right"/>
        </fo:simple-page-master>
      </fo:layout-master-set>
      <fo:page-sequence master-reference="A4">
        <fo:flow flow-name="body">
          <fo:block margin-bottom="12.0pt">
            <fo:inline>
              <xsl:text>test</xsl:text>
            </fo:inline>
          </fo:block>
          <fo:block margin-bottom="12.0pt">
            <fo:inline>
              <xsl:value-of 
select="$xml1/DocumentData/CAF_Output/Empfaenger/Profil/Gender"/>
            </fo:inline>
            <fo:inline>
              <xsl:value-of 
select="$xml1/DocumentData/CAF_Output/Empfaenger/Profil/Ansprechpartner"/>
            </fo:inline>
          </fo:block>
          <fo:block id="_last-block"/>
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template>
</xsl:stylesheet>


Kind regards and thanks in advance,

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

Reply via email to