Apache FOP image not hide - image

I set margin-right:1.0in.
The last column show the image but hide the text. I know the last column is overflow, but why the the image is showing but the text not?
How to hide all of the content include the image?
The file content is like below:
<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master page-height="8.5in" page-width="14.0in" margin-left="0.1in" margin-right="1.0in" margin-bottom="0.2in" margin-top="0.2in" master-name="all-pages">
<fo:region-body region-name="xsl-region-body" margin-bottom="0.1in" margin-top="0.1in"/>
<fo:region-before extent="0.1in" region-name="xsl-region-header"/>
<fo:region-after extent="0.1in" region-name="xsl-region-footer"/>
</fo:simple-page-master>
<fo:page-sequence-master master-name="reportSeqn1PageMasterParametersSet">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
<fo:page-sequence-master master-name="reportSeqn1PageMasterColumnSet1">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
<fo:page-sequence-master master-name="reportSeqn1PageMasterColumnSet2">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
<fo:page-sequence-master master-name="reportSeqn1PageMasterImageSet">
<fo:repeatable-page-master-reference master-reference="all-pages"/>
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence force-page-count="no-force" master-reference="reportSeqn1PageMasterColumnSet1" initial-page-number="1">
<fo:static-content flow-name="xsl-region-header">
<fo:block font-family="Arial" font-size="8pt" text-align="end">Dec 07, 2016</fo:block>
<fo:block font-family="Arial" font-size="8pt" text-align="end">05:55 PM</fo:block>
<fo:block font-weight="normal" font-family="Arial" font-size="12pt" text-align="center" text-decoration="none">Finance Integration Tasks</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-footer">
<fo:block font-family="Arial" font-size="8pt" text-align="end">
Page <fo:page-number/> Column set 1 of 2</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block-container width="1653.2640000000001pt">
<fo:block font-family="Arial" font-size="8pt" margin-top="5pt">
<fo:table table-layout="fixed" width="1653.2640000000001pt">
<fo:table-column column-number="1" column-width="84.43636363636364pt"/>
<fo:table-column column-number="2" column-width="84.43636363636364pt"/>
<fo:table-column column-number="3" column-width="84.43636363636364pt"/>
<fo:table-column column-number="4" column-width="84.43636363636364pt"/>
<fo:table-column column-number="5" column-width="84.43636363636364pt"/>
<fo:table-column column-number="6" column-width="84.43636363636364pt"/>
<fo:table-column column-number="7" column-width="84.43636363636364pt"/>
<fo:table-column column-number="8" column-width="84.43636363636364pt"/>
<fo:table-column column-number="9" column-width="84.43636363636364pt"/>
<fo:table-column column-number="10" column-width="84.43636363636364pt"/>
<fo:table-column column-number="11" column-width="84.43636363636364pt"/>
<fo:table-column column-number="12" column-width="724.464pt"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)"># of Critical Issues</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Description</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)"># of Other Issues</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test1</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test2</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test3</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test4</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test5</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test6</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(51,102,153)">
<fo:block text-align="start" color="rgb(255,255,255)">Test7</fo:block>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(255,255,255)" border-top-color="rgb(255,255,255)" border-right-color="rgb(255,255,255)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block text-align="start" color="rgb(255,255,255)">title</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="#ffff00">
<fo:block-container >
<fo:block font-family="Arial" color="Black" text-align="left">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Black" font-weight="normal" font-style="normal" text-decoration="none">Tin
Can</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="Red" text-align="left" font-weight="bold">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Red" font-weight="bold" font-style="normal" text-decoration="none">ABCD</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="Black" text-align="center">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Black" font-weight="normal" font-style="normal" text-decoration="none">4</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="Black" text-align="right">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Black" font-weight="normal" font-style="normal" text-decoration="none">19</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="Black" text-align="left">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Black" font-weight="normal" font-style="normal" text-decoration="none">Tin
Can</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="#000000" text-align="left">ABCD</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="#000000" text-align="left">Tin Can</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="#000000" text-align="left">ABCD</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="#000000" text-align="left">Tin Can</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="#000000" text-align="left">ABCD</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(200,215,227)" border-top-color="rgb(200,215,227)" border-right-color="rgb(200,215,227)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="Black" text-align="right">
<fo:inline xmlns:exslt="http://exslt.org/common" color="Black" font-weight="normal" font-style="normal" text-decoration="none">Tin
Can</fo:inline>
</fo:block>
</fo:block-container>
</fo:table-cell>
<fo:table-cell padding="2pt" border-bottom-color="rgb(255,255,255)" border-top-color="rgb(255,255,255)" border-right-color="rgb(255,255,255)" border-left-color="rgb(200,215,227)" border-style="solid" border-width="0.25pt" background-color="rgb(255,255,255)">
<fo:block-container >
<fo:block font-family="Arial" color="rgb(255,255,255)" text-align="left">
<fo:inline xmlns:exslt="http://exslt.org/common" font-weight="normal" font-style="normal">ABCD</fo:inline> <fo:external-graphic src="url('file:///C:/Users/sujianrong/Desktop/fop-2.1-bin.tar/fop-2.1-bin/fop-2.1/examples/fo/graphics/fop.jpg')" content-width="10pt" /> </fo:block>
</fo:block-container>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:block-container>
<fo:block id="reportSeqn1last-pageColumnSet2"/>
</fo:flow>
</fo:page-sequence>
</fo:root>

Add overflow="hidden" to the fo:region-body.
See https://www.w3.org/TR/xsl11/#overflow

Related

XSLT scheme for create a table whose header and rows are separate and hierarchical

I have a problem in order to convert a file that looks like this into a "flat" table
These files are uploaded during the exchange. There are many of them, but they have one template. First a description of the headers, then only the values.
<?xml version="1.0" encoding="UTF-8"?>
<extdata user="test">
<scheme name="CRMOrder" request="get" success="true">
<data>
<s>
<d name="CRMOrder">
<f name="ActionDate" type="Date" />
<f name="CRMClientId" type="String" />
<f name="CreateId" type="Date" />
<f name="StatusId" type="String" />
<f name="Summa" type="Decimal" />
<f name="WareHouseId" type="String" />
<d name="CRMOrderLine">
<f name="Price" type="Decimal" />
<f name="LineNumber" type="Integer" />
<f name="Quantity" type="Decimal" />
<f name="Discount" type="Integer" />
</d>
<d name="CRMOrderOption">
<f name="OptionTypeId" type="String" />
<f name="Value" type="String" />
<f name="OptionTypeName" type="String" />
</d>
</d>
</s>
<o>
<d name="CRMOrder">
<r>
<f>2022-01-11T00:00:00</f>
<f>69244</f>
<f>2142256774</f>
<f>Accepted</f>
<f>2318.0600</f>
<f>62</f>
<d name="CRMOrderLine">
<r>
<f>64.7800</f>
<f>1</f>
<f>18.0000</f>
<f>62</f>
</r>
<d name="CRMOrderOption">
<r>
<f>2022-01-10T00:00:00</f>
<f>Comment</f>
<f>1</f>
</r>
</d>
</d>
</r>
</d>
</o>
</data>
</scheme>
</extdata>
XSLT
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes" />
<xsl:template match="/extdata/scheme/data">
<ValueTable xmlns="http://v8.1c.ru/8.1/data/core" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<-- get the total number of columns -->
<xsl:variable name="recordColumn" select="count(s/d/f/#name) + count(s/d/d/f/#name)" />
<-- I didn’t understand how to create headers in one cycle, so there are two cycles with the same content -->
<xsl:for-each select="s/d/f">
<column>
<Name xsi:type="xs:string">
<xsl:value-of select="#name" />
</Name>
<ValueType>
<xsl:if test="#type= 'String'">
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</xsl:if>
<xsl:if test="#type= 'Date'">
<Type>xs:dateTime</Type>
<DateQualifiers>
<DateFractions>DateTime</DateFractions>
</DateQualifiers>
</xsl:if>
<xsl:if test="#type= 'Decimal' or #type= 'Currency'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:if>
<xsl:if test="#type= 'Integer'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>0</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:if>
</ValueType>
</column>
</xsl:for-each>
<xsl:for-each select="s/d/d/f">
<column>
<Name xsi:type="xs:string">
<xsl:value-of select="#name" />
</Name>
<ValueType>
<xsl:if test="#type= 'String'">
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</xsl:if>
<xsl:if test="#type= 'Date'">
<Type>xs:dateTime</Type>
<DateQualifiers>
<DateFractions>DateTime</DateFractions>
</DateQualifiers>
</xsl:if>
<xsl:if test="#type= 'Decimal' or #type= 'Currency'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:if>
<xsl:if test="#type= 'Integer'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>0</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:if>
</ValueType>
</column>
</xsl:for-each>
<xsl:for-each select="o/d/r/f">
<-- Problem is here -->
<xsl:variable name="counter" select="position()" />
<xsl:if test="$counter = 1">
<xsl:text disable-output-escaping="yes"><row></xsl:text>
</xsl:if>
<xsl:if test="$counter mod $recordColumn = 0">
<xsl:text disable-output-escaping="yes"></row></xsl:text>
<xsl:if test="$counter != last() ">
<xsl:text disable-output-escaping="yes"><row></xsl:text>
</xsl:if>
</xsl:if>
<xsl:if test="$counter mod $recordColumn != 0">
<Value>
<xsl:value-of select="." />
</Value>
</xsl:if>
</xsl:for-each>
</ValueTable>
</xsl:template>
</xsl:stylesheet>
How do i get the table from this file. The beginning and end of the row about the string and value probably did not look very beautiful, but it works. There are now 12 columns, as a result, my table row contains only 6 first values.
Expected result
<ValueTable xmlns="http://v8.1c.ru/8.1/data/core"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<column>
<Name xsi:type="xs:string">ActionDate</Name>
<ValueType>
<Type>xs:dateTime</Type>
<DateQualifiers>
<DateFractions>DateTime</DateFractions>
</DateQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">CRMClientId</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">CreateId</Name>
<ValueType>
<Type>xs:dateTime</Type>
<DateQualifiers>
<DateFractions>DateTime</DateFractions>
</DateQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">StatusId</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">Summa</Name>
<ValueType>
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">WareHouseId</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">Price</Name>
<ValueType>
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">LineNumber</Name>
<ValueType>
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>0</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">Quantity</Name>
<ValueType>
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">Discount</Name>
<ValueType>
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>0</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</ValueType>
</column>
<Name xsi:type="xs:string">OptionTypeId</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">Value</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<column>
<Name xsi:type="xs:string">OptionTypeName</Name>
<ValueType>
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</ValueType>
</column>
<row>
<Value>2022-01-11T00:00:00</Value>
<Value>69244</Value>
<Value>2142256774</Value>
<Value>Accepted</Value>
<Value>2318.0600</Value>
<Value>62</Value>
<Value>64.7800</Value>
<Value>1</Value>
<Value>18.0000</Value>
<Value>62</Value>
<Value>2022-01-10T00:00:00</Value>
<Value>Comment</Value>
<Value>1</Value>
</row>
</ValueTable>
The given example is somewhat ambiguous. Assuming that s is the header row, and that o is a data row containing exactly one value for each column in the header row, and in the same order (IOW, that the input is already a "flat" table), the result shown could be produced using:
XSLT 1.0
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://v8.1c.ru/8.1/data/core"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="/extdata">
<ValueTable>
<!-- header -->
<xsl:for-each select="scheme/data/s//f">
<column>
<Name xsi:type="xs:string">
<xsl:value-of select="#name"/>
</Name>
<ValueType>
<xsl:choose>
<xsl:when test="#type= 'String'">
<Type>xs:string</Type>
<StringQualifiers>
<Length>150</Length>
<AllowedLength>Variable</AllowedLength>
</StringQualifiers>
</xsl:when>
<xsl:when test="#type='Date'">
<Type>xs:dateTime</Type>
<DateQualifiers>
<DateFractions>DateTime</DateFractions>
</DateQualifiers>
</xsl:when>
<xsl:when test="#type='Decimal' or #type='Currency'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>4</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:when>
<xsl:when test="#type='Integer'">
<Type>xs:decimal</Type>
<NumberQualifiers>
<Digits>20</Digits>
<FractionDigits>0</FractionDigits>
<AllowedSign>Any</AllowedSign>
</NumberQualifiers>
</xsl:when>
</xsl:choose>
</ValueType>
</column>
</xsl:for-each>
<!-- data -->
<xsl:for-each select="scheme/data/o">
<row>
<xsl:for-each select=".//f">
<Value>
<xsl:value-of select="."/>
</Value>
</xsl:for-each>
</row>
</xsl:for-each>
</ValueTable>
</xsl:template>
</xsl:stylesheet>
Unfortunately your provided XML is invalid. And you don't provide an example how the output should look like.
But however, just a quick, hopefully helpful answer to your main problem. How to avoid repeating the whole header definition or other stylesheet parts.
You can OR multiple paths in XPath
<xsl:for-each select="s/d/f | s/d/d/f">

Apache FOP Displaying ### instead of Arabic

I am new to Apache-FOP.
I use this to generate PDF documet from a XML input. I have created XSL for my input XML and getting ### values instead of Arabic text. Can any one please point out the mistake? I have set of fonts but still I cannot get the right result.
XML Input:
<TestData>
<TestXML>
<Name>Sathish நன்றி</Name>
<Dept>Channels</Dept>
<Year>2016</Year>
</TestXML>
<TestXML>
<Name>Sathish dėkoju</Name>
<Dept>Channels</Dept>
<Year>2016</Year>
</TestXML>
<TestXML>
<Name>Sathish благодаря</Name>
<Dept>Channels</Dept>
<Year>2016</Year>
</TestXML>
<TestXML>
<Name>Sathish شكر</Name>
<Dept>Channels</Dept>
<Year>2016</Year>
</TestXML>
</TestData>
XSL:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="A4-portrait" page-height="29.7cm" page-width="21.0cm" margin="2cm">
<fo:region-body />
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="A4-portrait">
<fo:flow flow-name="xsl-region-body">
<fo:block>
<fo:table table-layout="fixed" width="100%">
<fo:table-header>
<fo:table-row background-color="#c0c0c0" height="0.59cm">
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.0cm" margin-right="0.14cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">Name</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.51cm" margin-right="0.16cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">Department</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.0cm" margin-right="2.65cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">Year</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body>
<xsl:for-each select="TestData/TestXML">
<fo:table-row background-color="#ffffff" height="0.57cm">
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.0cm" margin-right="0.14cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">
<xsl:value-of select="Name" />
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.0cm" margin-right="0.14cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">
<xsl:value-of select="Dept" />
</fo:block>
</fo:table-cell>
<fo:table-cell number-columns-spanned="1">
<fo:block margin-left="0.0cm" margin-right="0.14cm" margin-top="0.0cm" font-size="10pt" color="#000000" text-align="left">
<xsl:value-of select="Year" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</xsl:for-each>
</fo:table-body>
</fo:table>
</fo:block>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
myConf.xconf:
<fop>
<renderers>
<renderer mime="application/pdf">
<fonts>
<auto-detect/>
</fonts>
</renderer>
</renderers>
</fop>
WARNINGS:
12 Aug, 2016 4:47:31 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xba8) not available in font "Helvetica".
12 Aug, 2016 4:47:31 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xba9) not available in font "Helvetica".
12 Aug, 2016 4:47:31 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xbcd) not available in font "Helvetica".
12 Aug, 2016 4:47:31 PM org.apache.fop.events.LoggingEventListener processEvent
WARNING: Glyph "?" (0xbb1) not available in font "Helvetica".
Result:
Sathish ##### Channels 2016
Sathish d#koju Channels 2016
Sathish ######### Channels 2016
Result Image

Background-image not displays in xsl fo with Relative Path URL

I am trying to create a pdf using xsl-fo where the background image is being used. I have set up the relative path as follows:
background-image = "url('../themes/images/logo.gif')"
When I give absolute path like background-image="C://Images/logo.gif", it worked.
but when I use url to take it relatively in the server, it is not working.
Below is my scenario.
XML:
<?xml version="1.0" encoding="iso-8859-1"?>
<form-data>
<field>
<name>txtFirstName</name>
<value>ABC</value>
</field>
<field>
<name>txtLastName</name>
<value>XYZ</value>
</field>
</form-data>
XSL-FO ( to get the Pdf )
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="SPM_Name" page-height="29.7cm" page-width="21cm" margin-top="1.2cm" margin-bottom="1.2cm" margin-left="1.75cm" margin-right="1.75cm">
<fo:region-body margin-top="0.5cm" />
<fo:region-before extent="0.5cm" />
<fo:region-after extent="1cm" />
</fo:simple-page-master>
<fo:page-sequence-master master-name="PSM_Name">
<fo:single-page-master-reference master-reference="SPM_Name" />
</fo:page-sequence-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="PSM_Name" initial-page-number="1">
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="end" font-size="10pt" font-family="serif" line-height="14pt">
Page
<fo:page-number />
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<fo:block background-image="url('http://localhost:9081/resources/themes/images/Logo1.gif')" background-position="right" background-color="transparent" >
</fo:block>
<fo:block font-size="20pt" text-align="center" font-family="sans-serif" line-height="20pt" space-after.optimum="15pt" padding-top="18pt">Income Tax Form</fo:block>
<fo:table table-layout="fixed" width="100%" border-collapse="separate">
<fo:table-column column-width="50%" />
<fo:table-column column-width="50%" />
<fo:table-header text-align="center">
<fo:table-row>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block font-weight="solid">Questions</fo:block>
</fo:table-cell>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block font-weight="solid">Form Inputs</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-header>
<fo:table-body text-align="center">
<fo:table-row>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block>Your First Name</fo:block>
</fo:table-cell>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block>
<xsl:value-of select="//field/value[../name/text() = 'txtFirstName']" />
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block>Your Last Name</fo:block>
</fo:table-cell>
<fo:table-cell padding="6pt" border="0.5pt solid black" wrap-option="wrap" keep-together.within-column="always">
<fo:block>
<xsl:value-of select="//field/value[../name/text() = 'txtLastName']" />
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>
As you say in the comments that you don't get any "Image not found" warning, I think there is nothing wrong with the image URL.
Your stylesheet puts the image as background of an empty fo:block:
<fo:block background-image="url('http://localhost:9081/resources/themes/images/Logo1.gif')"
background-position="right" background-color="transparent" >
</fo:block>
An empty fo:block produces a single block area whose height is 0pt, so its background is not visible.
If your image must be the background for the whole page, use an absolute positioned fo:block-container instead:
<fo:block-container position="absolute" height="25cm"
background-image="url('http://localhost:9081/resources/themes/images/Logo1.gif')"
background-position="right" background-color="transparent" >
<fo:block/>
</fo:block-container>
the height attribute sets the height of the generated area, i.e. the area which will have the desired background (use the height you want)
you can also use the properties background-repeat and background-position-horizontal to control repetion and position of the image
the empty fo:block inside the container is needed if your FO processor is strict about validation (Apache FOP is, and it would give a validation exception if the block-container were empty)

XPath Expression to select an specific node

I'm having an issue trying to build an Xpath expression to select all the "field" nodes "name" value attribute.
I already tried: //field[#name] but it returns no matches.
The sample results I need from the XML document are: currentDate, trulyYours, claimant, dateOfLoss etc...
Thank you for your help.
<?xml version="1.0" encoding="UTF-8"?>
<?xfa generator="AdobeLiveCycleDesignerES_V9.0.0.2.20101008.1.734229" APIVersion="3.1.20001.0"?>
<xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" timeStamp="2012-01-23T17:23:59Z" uuid="594e6d9b-2319-4fdb-b490-4d7655e56aa0">
<template xmlns="http://www.xfa.org/schema/xfa-template/2.4/">
<?formServer defaultPDFRenderFormat acrobat7.0.5static?>
<subform name="form1" locale="en_US" layout="tb">
<pageSet>
<pageArea>
<contentArea name="ContentArea1" x="0pt" y="0pt" w="612pt" h="792pt"/>
<medium short="612pt" long="792pt" stock="custom"/>
</pageArea>
</pageSet>
<subform name="DynamicFragment">
<bind match="none"/>
<field name="currentDate" y="0mm" x="0.86mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_OBJR TextField1[3]?>
<bind match="global"/>
</field>
<field name="trulyYours" y="129.578mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_FIELD_ID 30003?>
<?PDF_OBJR TextField1[3]?>
<bind match="global"/>
</field>
<field name="claimant" y="47.624mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_FIELD_ID 30003?>
<?PDF_OBJR TextField1[3]?>
<bind match="global"/>
</field>
<field name="ourInsured" y="42.618mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_FIELD_ID 30002?>
<?PDF_OBJR TextField1[2]?>
<bind match="global"/>
</field>
<field name="dateOfLoss" y="37.127mm" x="46.135mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_FIELD_ID 30001?>
<?PDF_OBJR TextField1[1]?>
<bind match="global"/>
</field>
<field name="ourClaimNumber" y="32.132mm" x="46.153mm" w="62mm" h="0.229167in" access="readOnly">
<ui>
<textEdit>
<border hand="right" presence="hidden">
<?templateDesigner StyleID aped0?></border>
<margin/>
</textEdit>
</ui>
<font typeface="Myriad Pro"/>
<para vAlign="middle"/>
<?PDF_FIELD_ID 30001?>
<?PDF_OBJR TextField1[0]?>
<bind match="global"/>
</field>
<traversal>
<traverse operation="first" ref="currentDate[0]"/>
</traversal>
<?templateDesigner isFragment yes?>
<?templateDesigner fragmentTitle 3016DynamicFragment?></subform>
</subform>
<?templateDesigner FormTargetVersion 24?>
<?templateDesigner Zoom 89?>
<?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?></template>
<config xmlns="http://www.xfa.org/schema/xci/1.0/">
<agent name="designer">
<!-- [0..n] -->
<destination>pdf</destination>
<pdf>
<!-- [0..n] -->
<fontInfo/>
</pdf>
</agent>
<present>
<!-- [0..n] -->
<destination>pdf</destination>
<pdf>
<!-- [0..n] -->
<fontInfo/>
<version>1.65</version>
</pdf>
<xdp>
<packets>*</packets>
</xdp>
</present>
</config>
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 4.2.1-c043 52.437709, 2010/08/04-17:30:07 ">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" rdf:about="">
<xmp:MetadataDate>2012-01-23T17:23:59Z</xmp:MetadataDate>
<xmp:CreatorTool>Adobe LiveCycle Designer ES 9.0</xmp:CreatorTool>
</rdf:Description>
<rdf:Description xmlns:pdf="http://ns.adobe.com/pdf/1.3/" rdf:about="">
<pdf:Producer>Adobe LiveCycle Designer ES 9.0</pdf:Producer>
</rdf:Description>
<rdf:Description xmlns:xmpMM="http://ns.adobe.com/xap/1.0/mm/" rdf:about="">
<xmpMM:DocumentID>uuid:594e6d9b-2319-4fdb-b490-4d7655e56aa0</xmpMM:DocumentID>
</rdf:Description>
<rdf:Description xmlns:lcd="http://ns.adobe.com/livecycle/designer/" xmlns:dc="http://purl.org/dc/elements/1.1/" rdf:about="">
<lcd:fragmentCatalog>
<rdf:Seq>
<rdf:li rdf:parseType="Resource">
<dc:title>
<rdf:Alt>
<rdf:li xml:lang="x-default">3016DynamicFragment</rdf:li>
</rdf:Alt>
</dc:title>
<dc:description>
<rdf:Alt>
<rdf:li xml:lang="x-default"/>
</rdf:Alt>
</dc:description>
<dc:identifier>$template.form1.DynamicFragment</dc:identifier>
<lcd:fragmentRole>Subform</lcd:fragmentRole>
</rdf:li>
</rdf:Seq>
</lcd:fragmentCatalog>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>
<localeSet xmlns="http://www.xfa.org/schema/xfa-locale-set/2.1/">
<locale name="en_US" desc="English (United States)">
<calendarSymbols name="gregorian">
<monthNames>
<month>January</month>
<month>February</month>
<month>March</month>
<month>April</month>
<month>May</month>
<month>June</month>
<month>July</month>
<month>August</month>
<month>September</month>
<month>October</month>
<month>November</month>
<month>December</month>
</monthNames>
<monthNames abbr="1">
<month>Jan</month>
<month>Feb</month>
<month>Mar</month>
<month>Apr</month>
<month>May</month>
<month>Jun</month>
<month>Jul</month>
<month>Aug</month>
<month>Sep</month>
<month>Oct</month>
<month>Nov</month>
<month>Dec</month>
</monthNames>
<dayNames>
<day>Sunday</day>
<day>Monday</day>
<day>Tuesday</day>
<day>Wednesday</day>
<day>Thursday</day>
<day>Friday</day>
<day>Saturday</day>
</dayNames>
<dayNames abbr="1">
<day>Sun</day>
<day>Mon</day>
<day>Tue</day>
<day>Wed</day>
<day>Thu</day>
<day>Fri</day>
<day>Sat</day>
</dayNames>
<meridiemNames>
<meridiem>AM</meridiem>
<meridiem>PM</meridiem>
</meridiemNames>
<eraNames>
<era>BC</era>
<era>AD</era>
</eraNames>
</calendarSymbols>
<datePatterns>
<datePattern name="full">EEEE, MMMM D, YYYY</datePattern>
<datePattern name="long">MMMM D, YYYY</datePattern>
<datePattern name="med">MMM D, YYYY</datePattern>
<datePattern name="short">M/D/YY</datePattern>
</datePatterns>
<timePatterns>
<timePattern name="full">h:MM:SS A Z</timePattern>
<timePattern name="long">h:MM:SS A Z</timePattern>
<timePattern name="med">h:MM:SS A</timePattern>
<timePattern name="short">h:MM A</timePattern>
</timePatterns>
<dateTimeSymbols>GyMdkHmsSEDFwWahKzZ</dateTimeSymbols>
<numberPatterns>
<numberPattern name="numeric">z,zz9.zzz</numberPattern>
<numberPattern name="currency">$z,zz9.99|($z,zz9.99)</numberPattern>
<numberPattern name="percent">z,zz9%</numberPattern>
</numberPatterns>
<numberSymbols>
<numberSymbol name="decimal">.</numberSymbol>
<numberSymbol name="grouping">,</numberSymbol>
<numberSymbol name="percent">%</numberSymbol>
<numberSymbol name="minus">-</numberSymbol>
<numberSymbol name="zero">0</numberSymbol>
</numberSymbols>
<currencySymbols>
<currencySymbol name="symbol">$</currencySymbol>
<currencySymbol name="isoname">USD</currencySymbol>
<currencySymbol name="decimal">.</currencySymbol>
</currencySymbols>
<typefaces>
<typeface name="Myriad Pro"/>
<typeface name="Minion Pro"/>
<typeface name="Courier Std"/>
<typeface name="Adobe Pi Std"/>
<typeface name="Adobe Hebrew"/>
<typeface name="Adobe Arabic"/>
<typeface name="Adobe Thai"/>
<typeface name="Kozuka Gothic Pro-VI M"/>
<typeface name="Kozuka Mincho Pro-VI R"/>
<typeface name="Adobe Ming Std L"/>
<typeface name="Adobe Song Std L"/>
<typeface name="Adobe Myungjo Std M"/>
</typefaces>
</locale>
</localeSet></xdp:xdp>
The expression you've shown -- //field[#name] -- selects all field elements that have a name attribute. What you need to do is select the attribute itself. Like this:
//field/#name
Regarding namespaces: Your target nodes are found in the http://www.xfa.org/schema/xfa-template/2.4/ namespace. Any XPath expression must take this into account with the following steps:
Register the namespace to a prefix with your XPath engine. How this is done depends on the host language you're using to evaluate the expression. In Java, for example, this is done by creating a javax.xml.namespace.NamespaceContext that gets registered with the javax.xml.xpath.XPath instance.
Use the prefix you registered in step 1) to query elements in the target namespace. So, for example, if you were to register http://www.xfa.org/schema/xfa-template/2.4/ with the prefix xfa, then you'd write the expression like this:
//xfa:field/#name
Namespace-agnostic solution: It is possible (but not necessarily recommended) to select the target nodes without accounting for namespaces with the following expression:
//*[local-name()='field']/#name
You need to assign a prefix for the namespace. The field element is not in a null namespace. It appears to be in http://www.xfa.org/schema/xfa-template/2.4/.
How you assign the namespace prefix depends on what host language you are using to issue the XPath. You don't say so we can't help you. It will probably look something like this made-up example:
xpather.registerNamespace('xfa', 'http://www.xfa.org/schema/xfa-template/2.4/');
Note that "xfa" can be any prefix you want. Only the namespace uri matters.
Once that is done, your XPath will look like this:
//xfa:field/#name
If you assign a prefix to the xpd namespace too, you can be more specific:
/xpd:xpd/xfa:template//xfa:field/#name

Can you transition using Fade specifying all elements, without listing individually?

I've got the beginning of an air app, and I'm trying to transition between the states using Fade (a Sequence that should, in theory, fade out, then fade the next state in.) Is there a way to target it to fade out ALL the elements, or will I need to use targets="..." and list every element?
I've tried nesting all the elements in a Group, but that isn't seeming to work.
Shortened version of my current code:
<s:states>
<s:State name="HomeScreen"/>
<s:State name="EnemyBuilder"/>
<s:State name="EncyclopediaBuilder"/>
</s:states>
<fx:Declarations>
<s:Transition toState="*" fromState="*" >
<s:Sequence >
<s:Fade alphaFrom="1" alphaTo="0" duration="250" target="{wrapper}" />
<s:Fade alphaFrom="0" alphaTo="1" duration="250" target="{wrapper}" />
</s:Sequence>
</s:Transition>
</fx:Declarations>
<s:Group id="wrapper" includeIn="HomeScreen, EnemyBuilder, EncyclopediaBuilder" >
<s:BorderContainer id="encounter" includeIn="HomeScreen"
x="49" y="99" width="200" height="44"
styleName="falseButton"
rollOut="alphaOver(event)" rollOver="alphaOver(event)" click="currentState='EncyclopediaBuilder'" >
<s:Label x="48" y="8" color="#000000" fontFamily="Arial" text="Create a new encounter" />
<s:Label x="48" y="24" color="#000000" fontStyle="italic" text="Single encounter" />
<s:Image x="10" y="10" source="assets/001_01.png" />
<s:BorderContainer id="back" includeIn="EncyclopediaBuilder"
right="20" bottom="20" width="200" height="44"
styleName="falseButton"
rollOut="alphaOver(event)" rollOver="alphaOver(event)"
click="currentState='HomeScreen'" >
<s:Label x="48" y="16" color="#000000" fontFamily="Arial" text="Save and Return"/>
<s:Image x="10" y="10" source="assets/001_01.png"/>
</s:BorderContainer>
</s:BorderContainer></s:Group>
Try to use something like the following:
<s:states>
<s:State name="HomeScreen"/>
<s:State name="EnemyBuilder"/>
<s:State name="EncyclopediaBuilder"/>
</s:states>
<s:transitions>
<s:Transition toState="*" fromState="*" >
<s:Sequence target="{wrapper}">
<s:Fade alphaFrom="1" alphaTo="0" duration="250" />
<s:Fade alphaFrom="0" alphaTo="1" duration="250" />
</s:Sequence>
</s:Transition>
</s:transitions>
<s:Group id="wrapper">
<s:BorderContainer id="encounter" includeIn="HomeScreen"
x="49" y="99" width="200" height="44"
styleName="falseButton"
rollOut="alphaOver(event)" rollOver="alphaOver(event)" click="currentState='EncyclopediaBuilder'" >
<s:Label x="48" y="8" color="#000000" fontFamily="Arial" text="Create a new encounter" />
<s:Label x="48" y="24" color="#000000" fontStyle="italic" text="Single encounter" />
<s:Image x="10" y="10" source="assets/001_01.png" />
<s:BorderContainer id="back" includeIn="EncyclopediaBuilder"
right="20" bottom="20" width="200" height="44"
styleName="falseButton"
rollOut="alphaOver(event)" rollOver="alphaOver(event)"
click="currentState='HomeScreen'" >
<s:Label x="48" y="16" color="#000000" fontFamily="Arial" text="Save and Return"/>
<s:Image x="10" y="10" source="assets/001_01.png"/>
</s:BorderContainer>
</s:BorderContainer></s:Group>

Resources