A
Adelard
Here is my xsl and xml, I want the xml node: LABEL3 ( General
Information ) to move under the ROW when viewing or printing this PDF
Document.
How can I do it?
Thanks
Here is my xsl code:
-------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions">
<xsl
utput method="xml" encoding="UTF-8"/>
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="8.5in" page-width="11in" margin-top="0.5in"
margin-left="0.5in" margin-bottom="0.5in" margin-right="0.5in">
<fo:region-before extent="0in"/>
<fo:region-body margin-top="0in" margin-left="0in"
margin-bottom="0in" margin-right="0in"/>
<fo:region-after border-before-style="solid"
border-width="1pt" extent="5mm" display-align="before"/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:apply-templates select="EC-REPORT"/>
</fo:root>
</xsl:template>
<xsl:template match="EC-REPORT">
<fo
age-sequence master-reference="simple">
<fo:static-content flow-name="xsl-region-before"/>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" font-size="8pt">
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
table-layout="fixed"
<fo:table text-align="center" >
<fo:table-column column-width="3in"/>
<fo:table-column column-width="4in"/>
<fo:table-column column-width="3in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL1"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="12pt" text-align="left">
<xsl:value-of select="TITLE-HEADER/LEFT/LABEL3"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:apply-templates/>
</fo:flow>
</fo
age-sequence>
</xsl:template>
<xsl:template match="SUB_REPORT">
<xsl:apply-templates select="HEADER"/>
<xsl:apply-templates select="ROW"/>
</xsl:template>
<xsl:template match="HEADER">
<fo:block line-height="15pt" font-size="10pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always">
<fo:inline white-space-collapse="false"/>
</fo:block>
<fo:table text-align="center" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000"
font-size="8pt" space-before.optimum="1.5pt"
space-after.optimum="1.5pt" keep-together="always" text-align="center"
wrap-option='wrap' overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="center" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="ROW">
<fo:table text-align="left" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
Here is my xml below:
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<EC-REPORT>
<TITLE-HEADER>
<CENTER>
<LABEL1>ROCKWELL COLLINS, INC.</LABEL1>
</CENTER>
<CENTER>
<LABEL2>ENGINEERING CHANGE ORDER (ECO)-</LABEL2>
</CENTER>
<LEFT>
<LABEL3>GENERAL INFORMATION</LABEL3>
</LEFT>
</TITLE-HEADER>
<REPORT>
<SUB-REPORT>
<HEADER>
<PART-NAME->Part Name </PART-NAME->
<PART-REVISION->Part Revision
</PART-REVISION->
</HEADER>
<ROW>
<PART-NAME->ASE</PART-NAME->
<PART-REVISION->A</PART-REVISION->
</ROW>
<ROW>
<PART-NAME->asoo</PART-NAME->
<PART-REVISION->A</PART-REVISION->
</ROW>
</SUB-REPORT>
</REPORT>
</EC-REPORT>
Information ) to move under the ROW when viewing or printing this PDF
Document.
How can I do it?
Thanks
Here is my xsl code:
-------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0" xmlns:fo="http://www.w3.org/1999/XSL/Format"
xmlns:fox="http://xml.apache.org/fop/extensions">
<xsl
<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple"
page-height="8.5in" page-width="11in" margin-top="0.5in"
margin-left="0.5in" margin-bottom="0.5in" margin-right="0.5in">
<fo:region-before extent="0in"/>
<fo:region-body margin-top="0in" margin-left="0in"
margin-bottom="0in" margin-right="0in"/>
<fo:region-after border-before-style="solid"
border-width="1pt" extent="5mm" display-align="before"/>
</fo:simple-page-master>
</fo:layout-master-set>
<xsl:apply-templates select="EC-REPORT"/>
</fo:root>
</xsl:template>
<xsl:template match="EC-REPORT">
<fo
<fo:static-content flow-name="xsl-region-before"/>
<fo:static-content flow-name="xsl-region-after">
<fo:block text-align="center" font-size="8pt">
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
table-layout="fixed"
<fo:table text-align="center" >
<fo:table-column column-width="3in"/>
<fo:table-column column-width="4in"/>
<fo:table-column column-width="3in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL1"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="10pt" text-align="center">
<xsl:value-of
select="TITLE-HEADER/CENTER/LABEL2"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row>
<fo:table-cell>
<fo:block line-height="19pt"
font-weight="bold" font-size="12pt" text-align="left">
<xsl:value-of select="TITLE-HEADER/LEFT/LABEL3"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
<xsl:apply-templates/>
</fo:flow>
</fo
</xsl:template>
<xsl:template match="SUB_REPORT">
<xsl:apply-templates select="HEADER"/>
<xsl:apply-templates select="ROW"/>
</xsl:template>
<xsl:template match="HEADER">
<fo:block line-height="15pt" font-size="10pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always">
<fo:inline white-space-collapse="false"/>
</fo:block>
<fo:table text-align="center" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000"
font-size="8pt" space-before.optimum="1.5pt"
space-after.optimum="1.5pt" keep-together="always" text-align="center"
wrap-option='wrap' overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>
<fo:table-cell border-bottom-width="thin"
border-bottom-style="double" border-bottom-color="#000000"
background-color="#FFFFFF">
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="center" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
<xsl:template match="ROW">
<fo:table text-align="left" table-layout="fixed">
<fo:table-column column-width="0.5in"/>
<fo:table-column column-width="0.9in"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-NAME-"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block line-height="11pt" color="#000000" font-size="8pt"
space-before.optimum="1.5pt" space-after.optimum="1.5pt"
keep-together="always" text-align="left" wrap-option='wrap'
overflow='auto'>
<xsl:value-of select="PART-REVISION-"/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</xsl:template>
</xsl:stylesheet>
Here is my xml below:
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<EC-REPORT>
<TITLE-HEADER>
<CENTER>
<LABEL1>ROCKWELL COLLINS, INC.</LABEL1>
</CENTER>
<CENTER>
<LABEL2>ENGINEERING CHANGE ORDER (ECO)-</LABEL2>
</CENTER>
<LEFT>
<LABEL3>GENERAL INFORMATION</LABEL3>
</LEFT>
</TITLE-HEADER>
<REPORT>
<SUB-REPORT>
<HEADER>
<PART-NAME->Part Name </PART-NAME->
<PART-REVISION->Part Revision
</PART-REVISION->
</HEADER>
<ROW>
<PART-NAME->ASE</PART-NAME->
<PART-REVISION->A</PART-REVISION->
</ROW>
<ROW>
<PART-NAME->asoo</PART-NAME->
<PART-REVISION->A</PART-REVISION->
</ROW>
</SUB-REPORT>
</REPORT>
</EC-REPORT>