Link to home
Start Free TrialLog in
Avatar of aslam208
aslam208

asked on

org.apache.fop.fo.ValidationException

PLease help me on urgent basis on folowing..

2010-03-28 10:05:58,287  WARN [http-12030-Processor13] (AbstractListItemPart.java:91) - Error(Unknown location): fo:list-item-body is missing child elements. Required Content Model: marker* (%block;)+
2010-03-28 10:05:58,293 ERROR [http-12030-Processor13] (FOPrint.java:110) - Input file: /export/home/edocp/repository_san/edoc/AMM/0000000000000000000020358/AA/xml/EN52210072000100.xml
javax.xml.transform.TransformerException: org.apache.fop.fo.ValidationException: Error(Unknown location): fo:inline is not a valid child element of fo:list-item-body.
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

fo:list-item-dody requires a block element child
usually this is fo:block
allowed elements are:
block|block-container|table-and-caption|table|list-block|list-item
from which fo:block is the most common

you can not have an fo:inline as a direct child. So you have an error in you xsl-fo
note that fo:inline is an allowed child of fo block, so just wrapping the current content of your fo:list-item-body in an extra fo:block container will solve the issue
Interesting puzzle, but without some clarification nobody will be able to solve it. What are you trying to do?

My not-so-educated guess: you're doing XSLT things and XSL:FO, but the transformation description you use is incorrect. Main cause: fo:list-item-body is missing child elements.
Avatar of aslam208
aslam208

ASKER

Below is my xsl file.. please advice where is the error.. i am new to this world.
_____________________



- <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="fo">
- <!--  Aircraft Maintenance Manual FO
  -->
  <xsl:output method="xml" omit-xml-declaration="no" indent="yes" />
  <xsl:import href="./fo_general.xsl" />
  <xsl:param name="eff_sel" select="" />
  <xsl:param name="xmlDir" select="'c:\\temp\\'" />
  <xsl:param name="imagesDir" select="'c:\\temp\\'" />
  <xsl:param name="header1" select="" />
  <xsl:param name="header2" select="" />
  <xsl:param name="header3" select="" />
  <xsl:param name="footer1" select="" />
  <xsl:param name="footer2" select="" />
  <xsl:param name="footer3" select="" />
  <xsl:param name="subtask" select="" />
- <!--  font-size definition
  -->
  <xsl:variable name="float_text_size">10pt</xsl:variable>
  <xsl:variable name="txtgrphc_text_size">8pt</xsl:variable>
  <xsl:variable name="header1_text_size">10pt</xsl:variable>
  <xsl:variable name="header2_text_size">10pt</xsl:variable>
  <xsl:variable name="header3_text_size">8pt</xsl:variable>
  <xsl:variable name="footer1_text_size">8pt</xsl:variable>
  <xsl:variable name="footer2_text_size">10pt</xsl:variable>
  <xsl:variable name="footer3_text_size">8pt</xsl:variable>
- <!--  widows/orphans definition
  -->
  <xsl:variable name="widows">3</xsl:variable>
  <xsl:variable name="orphans">3</xsl:variable>
- <xsl:template match="AMM|SDS">
- <xsl:message>
  <xsl:value-of select="$imagesDir" />
  </xsl:message>
- <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
- <fo:layout-master-set>
- <fo:simple-page-master master-name="simpleA4" page-height="29.7cm" page-width="21cm" margin-top="1cm" margin-bottom="1cm" margin-left="1cm" margin-right="1cm">
  <fo:region-body margin="20mm 0mm" />
  <fo:region-before extent="16mm" region-name="header" display-align="after" />
  <fo:region-after extent="10mm" region-name="footer" display-align="before" />
  </fo:simple-page-master>
  </fo:layout-master-set>
- <fo:page-sequence master-reference="simpleA4">
- <fo:static-content flow-name="header">
- <fo:block width="100%" font-family="Times" color="black" font-weight="bold" font-size="{$header1_text_size}" text-align="start">
  <xsl:value-of select="$header1" />
  </fo:block>
- <fo:block width="100%" font-family="Times" color="black" font-weight="bold" font-size="{$header2_text_size}" text-align="start">
  <xsl:value-of select="$header2" />
  </fo:block>
- <fo:block width="100%" font-family="Times" color="black" font-weight="bold" font-size="{$header3_text_size}" text-align="start" border-bottom-style="solid" border-bottom-width=".5pt" border-bottom-color="black">
  <xsl:value-of select="$header3" />
  </fo:block>
  </fo:static-content>
- <fo:static-content flow-name="footer">
- <fo:block width="100%" border-top-style="solid" border-top-width=".5pt" border-top-color="black">
- <fo:table table-layout="fixed" width="100%">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(4)" column-number="2" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="3" />
- <fo:table-body>
- <fo:table-row border-style="none" border-width="0pt">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="none" border-width="0pt">
- <fo:block font-family="Times" color="black" font-size="{$footer1_text_size}" text-align="left">
  <xsl:value-of select="$footer1" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="none" border-width="0pt">
- <fo:block font-family="Times" color="black" font-size="{$footer2_text_size}" text-align="center">
  <xsl:value-of select="$footer2" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="none" border-width="0pt">
- <fo:block font-family="Times" color="black" font-size="{$footer3_text_size}" text-align="right">
  <xsl:text>Page</xsl:text>
  <fo:page-number />
  <xsl:text>of</xsl:text>
  <fo:page-number-citation-last ref-id="last-page" />
  </fo:block>
- <xsl:if test="/descendant::PGBLK[@PGBLKNBR]">
- <fo:block font-family="Times" color="black" font-size="{$footer3_text_size}" text-align="right">
  <xsl:text>Pageblock</xsl:text>
  <xsl:value-of select="/descendant::PGBLK[@PGBLKNBR]/@PGBLKNBR" />
  </fo:block>
  </xsl:if>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-body>
  </fo:table>
  </fo:block>
  </fo:static-content>
- <fo:flow flow-name="xsl-region-body">
- <fo:block widows="{$widows}" orphans="{$orphans}">
- <xsl:choose>
- <xsl:when test="child::*[not(self::TITLE)]">
  <xsl:apply-templates />
  </xsl:when>
- <xsl:otherwise>
- <fo:block font-size="36pt">
  <xsl:value-of select="./TITLE" />
  </fo:block>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Manual Type:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
  <xsl:value-of select="@TYPE" />
  </fo:block>
- <xsl:if test="@DOCNBR">
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Document Number:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
  <xsl:value-of select="@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SUBJNBR" />
  </fo:block>
  </xsl:if>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Original Issue Date:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="@OIDATE" />
  </xsl:call-template>
  </fo:block>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Revision Date:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="@REVDATE" />
  </xsl:call-template>
  </fo:block>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Transmittal Sequence Number:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
  <xsl:value-of select="@TSN" />
  </fo:block>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Supplier Code:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
  <xsl:value-of select="@SPL" />
  </fo:block>
- <fo:block space-before="10mm" font-size="12pt">
  <xsl:text>Change:</xsl:text>
  </fo:block>
- <fo:block space-before="5mm" space-after="5mm" border-left-width="1cm" font-size="14pt" font-weight="bold">
  <xsl:value-of select="@CHG" />
  </fo:block>
  </xsl:otherwise>
  </xsl:choose>
  <fo:block id="last-page" />
  </fo:block>
  </fo:flow>
  </fo:page-sequence>
  </fo:root>
  </xsl:template>
  <xsl:template match="CHAPTER/EFFECT|SECTION/EFFECT|SUBJECT/EFFECT" />
- <xsl:template match="PGBLK/EFFECT">
- <xsl:if test="not(/descendant::TASK)">
- <fo:block color="red" font-weight="bold">
  <xsl:text>** ON A/C</xsl:text>
- <xsl:call-template name="write.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="@EFFRG" />
  </xsl:with-param>
  </xsl:call-template>
  </fo:block>
  </xsl:if>
  </xsl:template>
- <xsl:template match="TASK/EFFECT">
- <fo:block color="red" font-weight="bold">
  <xsl:text>** ON A/C</xsl:text>
- <xsl:call-template name="write.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="@EFFRG" />
  </xsl:with-param>
  </xsl:call-template>
  </fo:block>
  </xsl:template>
- <xsl:template match="EFFECT">
- <xsl:if test="not(preceding::EFFECT[@EFFRG][1]/@EFFRG=./@EFFRG)">
- <fo:block color="red" font-weight="bold">
  <xsl:text>** ON A/C</xsl:text>
- <xsl:call-template name="write.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="@EFFRG" />
  </xsl:with-param>
  </xsl:call-template>
  </fo:block>
  </xsl:if>
  </xsl:template>
- <xsl:template match="PGBLK">
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
- <xsl:if test="not(/descendant::TASK)">
- <fo:block font-size="12pt" font-weight="bold" space-after="5mm">
  <xsl:value-of select="@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SUBJNBR" />
  <xsl:text>PB</xsl:text>
  <xsl:value-of select="substring(@PGBLKNBR,2,1)" />
  <xsl:text>01</xsl:text>
  <xsl:text>-</xsl:text>
  <xsl:apply-templates select="TITLE" mode="render" />
  </fo:block>
  </xsl:if>
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="TASK">
- <xsl:variable name="efftest">
- <xsl:call-template name="check.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="EFFECT/@EFFRG" />
  </xsl:with-param>
- <xsl:with-param name="eff_selected">
  <xsl:value-of select="$eff_sel" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:variable>
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
- <fo:block font-size="12pt" font-weight="bold" space-after="5mm">
  <xsl:text>Task</xsl:text>
  <xsl:value-of select="@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SUBJNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@FUNC" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SEQ" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@CONFLTR" />
  <xsl:value-of select="@VARNBR" />
  <xsl:text />
  <xsl:value-of select="./TITLE" />
  </fo:block>
- <xsl:choose>
- <xsl:when test="$efftest = 'true'">
  <xsl:apply-templates select="./node()[not(self::TFMATR) and not(self::TOPIC) and not(self::GRAPHIC)]" />
- <xsl:if test="not(./DELETED)">
- <xsl:if test="TFMATR|TOPIC">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2em">
  <xsl:apply-templates select="TFMATR|TOPIC" />
  </fo:list-block>
  </xsl:if>
  <xsl:apply-templates select="GRAPHIC" />
- <!--  check if GRAPHICs in superior PGBLK are referenced in this task and embed them
  -->
- <xsl:variable name="pgDoc">
  <xsl:value-of select="$xmlDir" />
  <xsl:value-of select="ancestor::PGBLK/@KEY" />
  <xsl:text>.xml</xsl:text>
  </xsl:variable>
  <xsl:variable name="extDoc" select="document($pgDoc)/*" />
  <xsl:variable name="thisTask" select="." />
- <xsl:if test="$extDoc">
- <xsl:for-each select="$extDoc/descendant::GRAPHIC">
  <xsl:variable name="key" select="@KEY" />
- <xsl:if test="$thisTask/descendant::GRPHCREF[@REFID=$key]">
  <xsl:variable name="oneRef" select="$thisTask/descendant::GRPHCREF[@REFID=$key]" />
- <!--  check if subtask containing this reference is covered by the actual effectivity
  -->
- <xsl:variable name="subtefftest">
- <xsl:call-template name="check.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="$oneRef/ancestor::SUBTASK/EFFECT/@EFFRG" />
  </xsl:with-param>
- <xsl:with-param name="eff_selected">
  <xsl:value-of select="$eff_sel" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:variable>
- <xsl:if test="$subtefftest = 'true'">
- <xsl:for-each select="SHEET[@GNBR]">
  <xsl:variable name="gnbrLC" select="translate(@GNBR,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
- <fo:block space-after="5mm" keep-together.within-page="always">
  <fo:external-graphic src="url('{$imagesDir}{$gnbrLC}.gif')" width="100%" content-width="scale-to-fit" content-height="100%" scaling="uniform" border-style="solid" border-width="1pt" />
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="./TITLE">
  <xsl:apply-templates select="./TITLE" />
  </xsl:when>
- <xsl:when test="../TITLE">
  <xsl:apply-templates select="../TITLE" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:text>Figure</xsl:text>
  <xsl:value-of select="../@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SUBJNBR" />
- <xsl:if test="not(../@FUNC=' ')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@FUNC" />
  </xsl:if>
- <xsl:choose>
- <xsl:when test="not(../@SEQ='0')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SEQ" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:text>-00</xsl:text>
  </xsl:otherwise>
  </xsl:choose>
- <xsl:if test="not(../@CONFLTR=' ')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@CONFLTR" />
  </xsl:if>
  </xsl:otherwise>
  </xsl:choose>
  <xsl:text>/ SHEET</xsl:text>
  <xsl:value-of select="@SHEETNBR" />
  <xsl:text>of</xsl:text>
  <xsl:value-of select="count(../SHEET)" />
  </fo:block>
  </fo:block>
  </xsl:for-each>
  </xsl:if>
  </xsl:if>
  </xsl:for-each>
  </xsl:if>
  </xsl:if>
  </xsl:when>
  </xsl:choose>
  </fo:block>
  </xsl:template>
- <xsl:template match="TFMATR/PRETOPIC|TASK/TOPIC">
- <fo:list-item space-before="3mm" space-after="2mm">
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="any" from="TASK" count="PRETOPIC|TOPIC" format="1." />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="SUBTASK">
- <xsl:variable name="id">
  <xsl:value-of select="@CHAPNBR" />
  <xsl:value-of select="@SECTNBR" />
  <xsl:value-of select="@SUBJNBR" />
  <xsl:value-of select="@FUNC" />
  <xsl:value-of select="@SEQ" />
- <xsl:if test="@CONFLTR and string-length(@CONFLTR) > 0">
  <xsl:value-of select="translate(@CONFLTR,' ','_')" />
  </xsl:if>
- <xsl:if test="@VARNBR">
  <xsl:value-of select="@VARNBR" />
  </xsl:if>
  </xsl:variable>
- <xsl:if test="$subtask = '' or $subtask = $id">
- <xsl:variable name="efftest">
- <xsl:call-template name="check.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="EFFECT/@EFFRG" />
  </xsl:with-param>
- <xsl:with-param name="eff_selected">
  <xsl:value-of select="$eff_sel" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:variable>
- <xsl:choose>
- <xsl:when test="$efftest = 'true'">
- <fo:block>
- <fo:block font-size="10pt" font-weight="bold" space-before="3mm" space-after="2mm">
- <fo:block font-size="0.1pt" color="white">
  <xsl:text>@@</xsl:text>
  <xsl:value-of select="$id" />
  <xsl:text>@@</xsl:text>
  </fo:block>
  <xsl:text>Subtask</xsl:text>
  <xsl:value-of select="@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SUBJNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@FUNC" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@SEQ" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="@CONFLTR" />
  <xsl:value-of select="@VARNBR" />
  <xsl:text />
  </fo:block>
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.5em">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold" space-after="4mm">
  <xsl:number level="multiple" count="SUBTASK" from="TASK" format="A." />
  <xsl:text />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </fo:list-block>
  </fo:block>
  </xsl:when>
  </xsl:choose>
  </xsl:if>
  </xsl:template>
  <xsl:template match="REVST" />
  <xsl:template match="REVEND" />
  <xsl:template match="TASK/TITLE|CHAPTER/TITLE|SECTION/TITLE|SUBJECT/TITLE|PGBLK/TITLE" />
  <xsl:template match="SUBTASK/TITLE" />
- <xsl:template match="EFFXREF/TITLE">
- <fo:block font-size="12pt" font-weight="bold" space-after="5mm">
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="TITLE">
  <xsl:apply-templates />
  </xsl:template>
- <xsl:template match="PGBLK/TITLE" mode="render">
  <xsl:apply-templates />
  </xsl:template>
- <xsl:template match="PRETOPIC/TITLE|TOPIC/TITLE">
- <fo:block font-size="12pt" font-weight="bold">
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="UNLIST">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.5em">
  <xsl:apply-templates select="UNLITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="UNLITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block>
  <xsl:text>-</xsl:text>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
  <xsl:apply-templates />
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="LIST1">
  <xsl:apply-templates />
  </xsl:template>
- <xsl:template match="LIST2">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L2ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="LIST3">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L3ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="LIST4">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L4ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="LIST5">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L5ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="LIST6">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L6ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="LIST7">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="L7ITEM" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="L1ITEM">
- <fo:block space-before="1mm" space-after="2mm">
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="L2ITEM">
- <fo:list-item space-before="1mm" space-after="1mm">
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L2ITEM" format="(1)" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="L3ITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L3ITEM" format="(a)" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="L4ITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L4ITEM" format="[1]" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="L5ITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L5ITEM" format="[a]" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="L6ITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L6ITEM" format="{1}" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="L7ITEM">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
  <xsl:number level="single" count="L7ITEM" format="{a}" />
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCLIST1">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM1" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST2">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM2" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST3">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM3" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST4">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM4" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST5">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM5" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST6">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM6" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCLIST7">
- <fo:list-block provisional-label-separation="1em" provisional-distance-between-starts="2.7em">
  <xsl:apply-templates select="PRCITEM7" />
  </fo:list-block>
  </xsl:template>
- <xsl:template match="PRCITEM1">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM1" format="(1)" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM1" format="1." />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM2">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM2" format="(a)" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM2" format="A." />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM3">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM3" format="[1]" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM3" format="(1)" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM4">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM4" format="[a]" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM4" format="(a)" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM5">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM5" format="{1}" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM5" format="[1]" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM6">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM6" format="{a}" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM6" format="[a]" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM7">
- <fo:list-item>
- <fo:list-item-label end-indent="label-end()">
- <fo:block font-weight="bold">
- <xsl:choose>
- <xsl:when test="ancestor::SUBTASK">
  <xsl:number level="single" count="PRCITEM7" format="{I}" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:number level="single" count="PRCITEM7" format="{1}" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:list-item-label>
- <fo:list-item-body start-indent="body-start()">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:list-item-body>
  </fo:list-item>
  </xsl:template>
- <xsl:template match="PRCITEM">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="EFFXREF">
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
  <xsl:apply-templates select="./node()[not(self::EFFDATA)]" />
- <fo:table table-layout="fixed" width="100%" inline-progression-dimension="100%" border-style="solid" border-width=".5pt" border-collapse="collapse" empty-cells="show" border-color="black">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="2" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="3" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="4" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="5" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="6" />
- <fo:table-header background-color="#cccccc" font-family="Times">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Airline</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Customer Fleet Serial Number</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Version Rank</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Model</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="5" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>MSN</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="6" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Registration</xsl:text>
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-header>
- <fo:table-body>
  <xsl:apply-templates select="EFFDATA" />
  </fo:table-body>
  </fo:table>
  </fo:block>
  </xsl:template>
- <xsl:template match="EFFDATA">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="CUS" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="CEC" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="LINENBR" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="MODTYPE" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="5" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="MSNBR" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="6" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="ACN" />
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </xsl:template>
- <xsl:template match="CUS|CEC|LINENBR|MODTYPE|MSNBR|ACN">
  <xsl:apply-templates />
  </xsl:template>
- <xsl:template match="SBLIST">
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
  <xsl:apply-templates select="./node()[not(self::SBDATA)]" />
- <fo:table table-layout="fixed" width="100%" inline-progression-dimension="100%" border-style="solid" border-width=".5pt" border-collapse="collapse" empty-cells="show" border-color="black">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="2" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="3" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="4" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="5" />
- <fo:table-header background-color="#cccccc" font-family="Times">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>INCORP. CODE</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>SB Number</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>SB Rev.</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Status / Incorp. Date</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="5" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Remarks</xsl:text>
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-header>
- <fo:table-body>
  <xsl:apply-templates select="SBDATA" />
  </fo:table-body>
  </fo:table>
  </fo:block>
  </xsl:template>
- <xsl:template match="SBDATA">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="SC" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
- <xsl:choose>
- <xsl:when test="count(preceding::REVST)-count(preceding::REVEND)>0">
- <fo:inline background-color="yellow">
  <xsl:value-of select="substring(./SBNBR,1,7)" />
  </fo:inline>
  </xsl:when>
+ <xsl:otherwise>
  <xsl:value-of select="substring(./SBNBR,1,7)" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
- <xsl:choose>
- <xsl:when test="count(preceding::REVST)-count(preceding::REVEND)>0">
- <fo:inline background-color="yellow">
  <xsl:value-of select="substring-after(./SBNBR,' ')" />
  </fo:inline>
  </xsl:when>
- <xsl:otherwise>
  <xsl:value-of select="substring-after(./SBNBR,' ')" />
  </xsl:otherwise>
  </xsl:choose>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="ICS" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="5" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="./node()[not(self::SC) and not(self::SBNBR) and not(self::ICS)]" />
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </xsl:template>
- <xsl:template match="SBDATA/ICS">
- <xsl:choose>
- <xsl:when test=".=''">
  <xsl:apply-templates />
  </xsl:when>
- <xsl:when test=".=' '">
  <xsl:apply-templates />
  </xsl:when>
- <xsl:when test=".='NO EFFECT'">
  <xsl:apply-templates />
  </xsl:when>
- <xsl:otherwise>
- <xsl:choose>
- <xsl:when test="count(preceding::REVST)-count(preceding::REVEND)>0">
- <fo:inline background-color="yellow">
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="." />
  </xsl:call-template>
  </fo:inline>
  </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="." />
  </xsl:call-template>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>
- <xsl:template match="COCLIST">
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
  <xsl:apply-templates select="./node()[not(self::COCDATA)]" />
- <fo:table table-layout="fixed" width="100%" inline-progression-dimension="100%" border-style="solid" border-width=".5pt" border-collapse="collapse" empty-cells="show" border-color="black">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="2" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="3" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="4" />
- <fo:table-header background-color="#cccccc" font-family="Times">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>COC Reference</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Status</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Remarks</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Title</xsl:text>
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-header>
- <fo:table-body>
- <xsl:choose>
- <xsl:when test="COCDATA">
  <xsl:apply-templates select="COCDATA" />
  </xsl:when>
- <xsl:otherwise>
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt" number-columns-spanned="4">
  <fo:block font-weight="bold">EMPTY</fo:block>
  </fo:table-cell>
  </fo:table-row>
  </xsl:otherwise>
  </xsl:choose>
  </fo:table-body>
  </fo:table>
  </fo:block>
  </xsl:template>
- <xsl:template match="COCDATA">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="COCNBR" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="ICDATE" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="ICS" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="COCREV" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="EONBR" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="ATANBR" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="MDNBR" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="CUSTEFF" />
  </fo:block>
- <fo:block>
  <xsl:apply-templates select="SC" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="4" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="TITLE" />
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </xsl:template>
- <xsl:template match="ICDATE">
- <xsl:choose>
- <xsl:when test="count(preceding::REVST)-count(preceding::REVEND)>0">
- <fo:inline background-color="yellow">
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="." />
  </xsl:call-template>
  </fo:inline>
  </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name="dodate">
  <xsl:with-param name="date" select="." />
  </xsl:call-template>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:template>
- <xsl:template match="DRINDEX">
- <fo:block font-family="Times" color="black" font-size="{$float_text_size}">
  <xsl:apply-templates select="./node()[not(self::DRDATA)]" />
- <fo:table table-layout="fixed" width="100%" inline-progression-dimension="100%" border-style="solid" border-width=".5pt" border-collapse="collapse" empty-cells="show" border-color="black">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="2" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="3" />
- <fo:table-header background-color="#cccccc" font-family="Times">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Manual Item</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Description</xsl:text>
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:text>Task Number</xsl:text>
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-header>
- <fo:table-body>
  <xsl:apply-templates select="DRDATA" />
  </fo:table-body>
  </fo:table>
  </fo:block>
  </xsl:template>
- <xsl:template match="DRDATA">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="REFEXT" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="DRDESC" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="3" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates select="REFINT" />
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </xsl:template>
- <xsl:template match="CB|CON|CONNBR|CONNAME|CSN|EIN|EQU|NCON|PAN|CHGDESC|MSNBR|ACN|TED|TOOLNBR|TOOLNAME|ZONE|TOC|STD|STDNBR|STDNAME">
  <xsl:apply-templates />
  </xsl:template>
- <xsl:template match="DRDATA/REFEXT">
- <fo:block font-weight="bold">
  <xsl:text>(Ref.</xsl:text>
  <xsl:apply-templates />
  <xsl:text>)</xsl:text>
  </fo:block>
  </xsl:template>
- <xsl:template match="DRDATA/REFINT">
- <fo:block font-weight="bold">
- <fo:basic-link color="blue" external-destination="./{@REFLOC}.pdf" indicate-destination="true" show-destination="true">
  <xsl:apply-templates />
  </fo:basic-link>
  </fo:block>
  </xsl:template>
- <xsl:template match="REFEXT">
- <fo:inline font-weight="bold">
  <xsl:text>(Ref.</xsl:text>
  <xsl:apply-templates />
  <xsl:text>)</xsl:text>
  </fo:inline>
  </xsl:template>
- <xsl:template match="REFINT">
- <fo:inline font-weight="bold">
- <fo:basic-link color="blue" external-destination="./{@REFLOC}.pdf" indicate-destination="true" show-destination="true">
  <xsl:apply-templates />
  </fo:basic-link>
  </fo:inline>
  <xsl:text />
  </xsl:template>
- <xsl:template match="TABLE">
- <fo:table table-layout="fixed" width="100%" border-style="solid" border-width=".5pt" border-collapse="collapse" empty-cells="show" border-color="black">
  <xsl:apply-templates select="./node()[not(self::TITLE) and not(self::FTNOTE)]" />
  </fo:table>
  <xsl:apply-templates select="./FTNOTE" />
  <xsl:apply-templates select="./TITLE" />
  </xsl:template>
- <xsl:template match="TGROUP">
- <!-- xsl:message> </xsl:message
  -->
- <!-- xsl:message>=======================================================</xsl:message
  -->
  <xsl:apply-templates select="COLSPEC" />
  <xsl:apply-templates select="THEAD" />
  <xsl:apply-templates select="TBODY" />
  <xsl:apply-templates select="TFOOT" />
  </xsl:template>
- <xsl:template match="COLSPEC">
  <xsl:variable name="colname" select="@COLNAME" />
- <xsl:variable name="colnum">
  <xsl:number level="single" count="COLSPEC" format="1" />
  </xsl:variable>
- <!-- xsl:message>Colspec: <xsl:value-of select="@COLNAME"/>, <xsl:value-of select="$colnum"/></xsl:message
  -->
  <xsl:variable name="colwidth" select="translate(@COLWIDTH,'*','')" />
- <!-- fo:table-column column-width="$colwidth" column-number="{$colnum}"/
  -->
- <fo:table-column>
- <xsl:attribute name="column-width">
  <xsl:text>proportional-column-width(</xsl:text>
  <xsl:value-of select="$colwidth + 1" />
  <xsl:text>)</xsl:text>
  </xsl:attribute>
- <xsl:attribute name="column-number">
  <xsl:value-of select="$colnum" />
  </xsl:attribute>
  </fo:table-column>
  </xsl:template>
- <xsl:template match="THEAD">
- <fo:table-header font-family="Times" font-weight="bold">
  <xsl:apply-templates />
  </fo:table-header>
  </xsl:template>
- <xsl:template match="TFOOT">
- <fo:table-footer>
  <xsl:apply-templates />
  </fo:table-footer>
  </xsl:template>
- <xsl:template match="TBODY">
- <fo:table-body>
  <xsl:apply-templates />
  </fo:table-body>
  </xsl:template>
- <xsl:template match="FTNOTE">
- <fo:block font-size="6pt" font-weight="bold">
  <xsl:apply-templates />
  </fo:block>
  </xsl:template>
- <xsl:template match="ROW">
- <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
- <xsl:apply-templates select="ENTRY">
- <xsl:with-param name="rowPos">
- <!-- xsl:number level="single" count="ROW" /
  -->
  <xsl:value-of select="count(preceding-sibling::ROW) + 1" />
  </xsl:with-param>
  </xsl:apply-templates>
  </fo:table-row>
  </xsl:template>
- <xsl:template match="ENTRY">
  <xsl:param name="rowPos" />
- <!-- xsl:message>- - - - - - - - - - - - - - - - - - - - - - - - </xsl:message
  -->
- <!-- xsl:message><xsl:text>Entry value: </xsl:text><xsl:value-of select="."/></xsl:message
  -->
- <xsl:variable name="colspan">
- <xsl:choose>
- <xsl:when test="@SPANNAME">
  <xsl:variable name="spname" select="@SPANNAME" />
  <xsl:variable name="span1" select="../../../SPANSPEC[@SPANNAME = $spname]/@NAMEST" />
  <xsl:variable name="span2" select="../../../SPANSPEC[@SPANNAME = $spname]/@NAMEEND" />
  <xsl:variable name="col1" select="count(../../../COLSPEC[@COLNAME = $span1]/preceding-sibling::COLSPEC)" />
  <xsl:variable name="col2" select="count(../../../COLSPEC[@COLNAME = $span2]/preceding-sibling::COLSPEC)" />
  <xsl:value-of select="$col2 - $col1 + 1" />
  </xsl:when>
- <xsl:when test="not(@SPANNAME) and @NAMEST and @NAMEEND">
  <xsl:variable name="span1" select="@NAMEST" />
  <xsl:variable name="span2" select="@NAMEEND" />
  <xsl:variable name="col1" select="count(../../../COLSPEC[@COLNAME = $span1]/preceding-sibling::COLSPEC)" />
  <xsl:variable name="col2" select="count(../../../COLSPEC[@COLNAME = $span2]/preceding-sibling::COLSPEC)" />
  <xsl:value-of select="$col2 - $col1 + 1" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:value-of select="'1'" />
  </xsl:otherwise>
  </xsl:choose>
  </xsl:variable>
- <xsl:variable name="rowspan">
- <xsl:choose>
- <xsl:when test="@MOREROWS > 0">
  <xsl:value-of select="@MOREROWS + 1" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:value-of select="'1'" />
  </xsl:otherwise>
  </xsl:choose>
  </xsl:variable>
- <xsl:variable name="pos">
  <xsl:number level="single" count="ENTRY" />
  </xsl:variable>
- <!-- xsl:message>Row pos: <xsl:value-of select="$rowPos"/></xsl:message
  -->
- <!-- xsl:message>Col pos: <xsl:value-of select="$pos"/></xsl:message
  -->
- <!-- xsl:message>Colspan: <xsl:value-of select="$colspan"/></xsl:message
  -->
- <xsl:variable name="cellname">
- <xsl:choose>
- <xsl:when test="@COLNAME">
  <xsl:value-of select="@COLNAME" />
- <!-- xsl:message>Colname: <xsl:value-of select="@COLNAME"/></xsl:message
  -->
  </xsl:when>
  </xsl:choose>
  </xsl:variable>
- <xsl:choose>
- <xsl:when test="$pos <= count(../../../COLSPEC)">
- <xsl:if test="$cellname != ../../../COLSPEC[position()=$pos]/@COLNAME or not(../../../COLSPEC[position()=$pos]/@COLNAME)">
  <xsl:variable name="actEntryColPos" select="count(../../../COLSPEC[@COLNAME = $cellname]/preceding-sibling::COLSPEC) + 1" />
- <xsl:variable name="prevEntryColPos">
- <xsl:choose>
- <xsl:when test="preceding-sibling::ENTRY/@COLNAME">
  <xsl:variable name="prevEntryName" select="preceding-sibling::ENTRY/@COLNAME" />
  <xsl:value-of select="count(../../../COLSPEC[@COLNAME = $prevEntryName]/preceding-sibling::COLSPEC) + 1" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:text>0</xsl:text>
  </xsl:otherwise>
  </xsl:choose>
  </xsl:variable>
- <xsl:variable name="prevRowsMoreCols">
- <xsl:for-each select="../preceding-sibling::ROW">
  <xsl:variable name="rPos" select="count(preceding-sibling::ROW)+1" />
- <!-- xsl:message>    Prevrow pos: <xsl:value-of select="$rPos"/></xsl:message
  -->
- <xsl:for-each select="ENTRY">
  <xsl:variable name="ePos" select="count(preceding-sibling::ENTRY)+1" />
- <!-- xsl:message>    Prevrow/Entry pos: <xsl:value-of select="$ePos"/></xsl:message
  -->
- <!-- xsl:message>    Prevrow/Entry/@MOREROWS: <xsl:value-of select="@MOREROWS"/></xsl:message
  -->
- <xsl:if test="@MOREROWS and not(@MOREROWS = '0') and (@MOREROWS + $rPos >= $rowPos)">
  <xsl:text>1</xsl:text>
- <!-- xsl:message>               ROWSPAN FOUND!!!</xsl:message
  -->
  </xsl:if>
  </xsl:for-each>
  </xsl:for-each>
  </xsl:variable>
  <xsl:variable name="insertCells" select="$actEntryColPos - $prevEntryColPos - 1 - string-length($prevRowsMoreCols)" />
- <!-- xsl:message> Prevrow/@MORECOLS: <xsl:value-of select="string-length($prevRowsMoreCols)"/></xsl:message
  -->
- <!-- xsl:message> Insert Cells: <xsl:value-of select="$insertCells"/></xsl:message
  -->
- <xsl:if test="$pos + $insertCells <= count(../../../COLSPEC)">
- <xsl:call-template name="insert.empty.cell">
- <xsl:with-param name="numofcells">
  <xsl:value-of select="$insertCells" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:if>
  </xsl:if>
- <fo:table-cell margin="0pt" padding="0.5pt" number-columns-spanned="{$colspan}" border-style="solid" border-width=".5pt" number-rows-spanned="{$rowspan}">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:table-cell>
  </xsl:when>
- <xsl:when test="$pos > count(../../../COLSPEC)">
- <![CDATA[ </fo:table-row>
  ]]>
- <![CDATA[ <fo:table-row border-style="solid" border-width=".5pt" border-color="black">
  ]]>
- <fo:table-cell margin="0pt" padding="0.5pt" number-columns-spanned="{$colspan}" border-style="solid" border-width=".5pt">
- <fo:block>
  <xsl:apply-templates />
  </fo:block>
  </fo:table-cell>
  </xsl:when>
  </xsl:choose>
  </xsl:template>
- <xsl:template match="TED">
- <fo:inline font-weight="bold">
  <xsl:apply-templates select="TOOLNBR" />
  <xsl:text />
  <xsl:apply-templates select="TOOLNAME" />
  </fo:inline>
  </xsl:template>
- <xsl:template match="GRPHCREF">
- <xsl:variable name="efftest">
- <xsl:call-template name="check.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="EFFECT/@EFFRG" />
  </xsl:with-param>
- <xsl:with-param name="eff_selected">
  <xsl:value-of select="$eff_sel" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:variable>
- <xsl:if test="$efftest = 'true'">
  <xsl:apply-templates />
  <xsl:variable name="refid" select="./@REFID" />
- <xsl:variable name="pgDoc">
- <xsl:choose>
- <xsl:when test="/descendant::GRAPHIC[@KEY=$refid]">
  <xsl:value-of select="$xmlDir" />
- <xsl:choose>
- <xsl:when test="ancestor::TASK">
  <xsl:value-of select="ancestor::TASK/@KEY" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:value-of select="ancestor::*[@KEY][position()=1]/@KEY" />
  </xsl:otherwise>
  </xsl:choose>
  <xsl:text>.xml</xsl:text>
  </xsl:when>
- <xsl:when test="ancestor::PGBLK[@KEY]">
  <xsl:value-of select="$xmlDir" />
  <xsl:value-of select="ancestor::PGBLK/@KEY" />
  <xsl:text>.xml</xsl:text>
  </xsl:when>
  </xsl:choose>
  </xsl:variable>
- <xsl:choose>
- <xsl:when test="not($pgDoc = '')">
  <xsl:variable name="extDoc" select="document($pgDoc)/*" />
  <xsl:variable name="grphRef" select="$extDoc/descendant::GRAPHIC[@KEY=$refid]" />
- <xsl:for-each select="$grphRef/SHEET[@GNBR]">
  <xsl:variable name="gnbrLC" select="translate(@GNBR,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz')" />
- <fo:block space-after="5mm" keep-together.within-page="always">
- <fo:table table-layout="fixed" width="100%" inline-progression-dimension="100%" border-style="none" border-collapse="collapse" empty-cells="show">
  <fo:table-column column-width="proportional-column-width(1)" column-number="1" />
  <fo:table-column column-width="proportional-column-width(1)" column-number="2" />
- <fo:table-body>
- <fo:table-row border-style="none">
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="1">
- <fo:block>
  <fo:external-graphic alignment-adjust="middle" src="url('{$imagesDir}{$gnbrLC}.gif')" width="5cm" content-width="scale-to-fit" content-height="100%" scaling="uniform" border-style="solid" border-width="1pt" />
  </fo:block>
  </fo:table-cell>
- <fo:table-cell margin="0pt" padding="0.5pt" column-number="2" display-align="center">
- <fo:block>
  <xsl:apply-templates select="./node()[not(self::TITLE)]" />
- <fo:inline font-weight="bold">
- <xsl:choose>
- <xsl:when test="./TITLE">
  <xsl:apply-templates select="./TITLE" />
  </xsl:when>
- <xsl:when test="../TITLE">
  <xsl:apply-templates select="../TITLE" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:text>Figure</xsl:text>
  <xsl:value-of select="../@CHAPNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SECTNBR" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SUBJNBR" />
- <xsl:if test="not(../@FUNC=' ')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@FUNC" />
  </xsl:if>
- <xsl:choose>
- <xsl:when test="not(../@SEQ='0')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@SEQ" />
  </xsl:when>
- <xsl:otherwise>
  <xsl:text>-00</xsl:text>
  </xsl:otherwise>
  </xsl:choose>
- <xsl:if test="not(../@CONFLTR=' ')">
  <xsl:text>-</xsl:text>
  <xsl:value-of select="../@CONFLTR" />
  </xsl:if>
  </xsl:otherwise>
  </xsl:choose>
  <xsl:text>/ SHEET</xsl:text>
  <xsl:value-of select="@SHEETNBR" />
  <xsl:text>of</xsl:text>
  <xsl:value-of select="count(../SHEET)" />
  </fo:inline>
  </fo:block>
  </fo:table-cell>
  </fo:table-row>
  </fo:table-body>
  </fo:table>
  </fo:block>
  </xsl:for-each>
  </xsl:when>
- <xsl:otherwise>
  <xsl:apply-templates />
  </xsl:otherwise>
  </xsl:choose>
  </xsl:if>
  </xsl:template>
- <xsl:template name="check.effectivity">
  <xsl:param name="effrg">000999</xsl:param>
  <xsl:param name="eff_selected">0</xsl:param>
- <xsl:if test="number($eff_selected) = 0 or $eff_selected = '' or (number($eff_selected) >= number(substring($effrg,1,3)) and number($eff_selected) <= number(substring($effrg,4,3)))">
  <xsl:text>true</xsl:text>
  </xsl:if>
- <xsl:if test="string-length($effrg) > 6">
- <xsl:call-template name="check.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="substring-after($effrg,' ')" />
  </xsl:with-param>
- <xsl:with-param name="eff_selected">
  <xsl:value-of select="$eff_selected" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:if>
  </xsl:template>
- <xsl:template name="write.effectivity">
  <xsl:param name="effrg">001999</xsl:param>
- <xsl:if test="$effrg">
- <xsl:choose>
- <xsl:when test="$effrg='001999'">
  <xsl:text>ALL</xsl:text>
  </xsl:when>
- <xsl:otherwise>
  <xsl:value-of select="substring($effrg,1,3)" />
  <xsl:text>-</xsl:text>
  <xsl:value-of select="substring($effrg,4,3)" />
  </xsl:otherwise>
  </xsl:choose>
- <xsl:if test="string-length($effrg) > 6">
  <xsl:text>,</xsl:text>
- <xsl:call-template name="write.effectivity">
- <xsl:with-param name="effrg">
  <xsl:value-of select="substring-after($effrg,' ')" />
  </xsl:with-param>
  </xsl:call-template>
  </xsl:if>
  </xsl:if>
  </xsl:template>
  </xsl:stylesheet>
"Interesting puzzle, but without some clarification nobody will be able to solve it"

It is clear to me though :-)
This is part of rendering XSL-FO using Apache FOP, but there are errors in the XSL-FO,
there is no XSLT around (apart from the one that may be used for creating the XSL-FO)

The only issue for this question is that it is put in the wrong zone.
There is a specific EE zone for XSL-FO questions, this question should have been posted there

In the likely event that aslam208 is using an XSLT to process the XML prior to passing it to FOP,
there indeed is an error in the XSLT.
If aslam208 needs help with that, the question should have been posted in teh XSLT zone

In any case. The source of the error has been identified.
If aslam208 needs further help on this, he needs to give more details
so, my answer came late.
@aslam, can you please
- not pull the XSLT from Internet Explorer, but give us the real source
- not paste it in the text field but in the code field, or even better attach it
as you adviced i have attached the file.
fo-general-amm.xsl
from line 450 on your stylesheet should read
<fo:list-item-body start-indent="body-start()">
    <fo:block>
        <xsl:apply-templates />
    </fo:block>
</fo:list-item-body>
you forgot the fo:block there
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot Gretone.. Seems its OK now...
One more help.. since I am very new, can you please advice me the good resource to leran these stuff.
I must say thank to Gertone, and would request for the tips to learn these stuff.
Well, the only real reason I jumped in is that the question was in the Notes zone and I have a little XSLT experience using the features in Notes (project is in the fridge). Now the problem's solved I'm still mystified about the link with Notes... ;-)

Thanks for the links to the books. The one I'm struggling with is http://www.amazon.com/XSL-Formatting-Objects-Developers-Handbook/dp/0672322811
well, the link to Notes was weird for me too.

I don't know the book, so I can't comment on it and the author doesn't ring a bell to me