<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet version="1.0" xsi:schemaLocation="http://www.w3.org/1999/XSL/Transform xslt.xsd" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:fox="http://xml.apache.org/fop/extensions" xmlns:LU="lookup-table" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	<!-- 
******************************************************************************
* XSL FORMATTING STYLESHEET: REQUEST                                         *
* DTD Version       : v1.9   01-07-2017                                      *
* Stylesheet Version: v                                                      *
*		2.58                                                      			 *
*		28/02/2026                                              			 *
******************************************************************************
*  contacts:                                                                 *
*  WIPO:  Tadanori MORIGUCHI; tadanori.moriguchi@wipo.int                    *
*  Special thanks to John Dunning                                            *
******************************************************************************
	-->
	<xsl:strip-space elements="*"></xsl:strip-space>
	<xsl:preserve-space elements="invention-title"></xsl:preserve-space>
	<xsl:output method="xml" version="1.0" indent="no" encoding="UTF-8"></xsl:output>
	<!-- ****************************************************************
	*  PARAMETER original                                               *
	*  Set at run-time via XSL Processor; sets                          *
	*  'Paper Copy' or 'Original (for Submission)' in top margin        *
	********************************************************************* -->
	<xsl:param name="original"></xsl:param>
	<!-- ****************************************************************
	*  PARAMETER ia_number                                              *
	*  Set at run-time via XSL Processor; sets                          *
	*  International Application Number                                 *
	********************************************************************* -->
	<xsl:param name="ia_number"></xsl:param>
	<!-- ***************************************************************
    * PARAMETER: mode                                                  * 
    * Set at run time or will be read from 'dtd-version' attribute.    *
    * specifies modal templates to use for different DTD versions      *
    ******************************************************************** -->
	<xsl:param name="mode">
		<xsl:if test="//request/@dtd-version">
			<xsl:value-of select="concat('v',//request/@dtd-version)"></xsl:value-of>
		</xsl:if>
	</xsl:param>
	<!-- ****************************************************************
	*  PARAMETER physical_media                                         *
	*  Set at run-time via XSL Processor; sets                          *
	*  renders type of physical media used for Box IX-17                *
	********************************************************************* -->
	<xsl:param name="physical_media">
		<xsl:choose>
			<xsl:when test="$lang='en'">PCT-SAFE Physical Media</xsl:when>
			<xsl:when test="$lang='ja' and contains($software_name,'SAFE')">PCT-SAFE 物理媒体</xsl:when>
			<xsl:when test="$lang='ja' and contains($software_name,'JPO')">JPO-PAS 物理媒体</xsl:when>
			<xsl:otherwise>PCT-SAFE Physical Media</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!-- *****************************************************************
     * PARAMETER page_size                                               *
     *  VALUES :  (a4 | A4 ) | (Letter | letter)                         *
     *  DEFAULT:  A4                                                     *
     *  Set at run-time via XSL Processor; calculates margins, page size *
     *  based on page size                                               *
     ********************************************************************* -->
	<xsl:param name="page_size" select="A4"></xsl:param>
	<!-- *****************************************************************
     * PARAMETER: renderer                                               *
     * VALUES:    (FOP | XEP)                                            *
     * DEFAULT:    FOP                                                   *
     * sets rendering tool (XEP | FOP) for bookmark extensions           *
     ********************************************************************* -->
	<xsl:param name="renderer"></xsl:param>
	<!-- *****************************************************************
     * PARAMETER: lang                                                   *
     * sets language for boilerplate text, hyphenation                   *
     ********************************************************************* -->
	<xsl:param name="lang" select="substring(translate(//request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:param>
	<!-- ****************************************************************
	*  PARAMETER fee_reduction                                          *
	*  Set at run-time via XSL Processor; sets                          *
	*  text of fee-sheet box 12-12, default "PCT-SAFE fee reduction"    *
	********************************************************************* -->
	<xsl:param name="fee_reduction">
		<xsl:choose>
			<xsl:when test="$lang='en'">PCT-SAFE fee reduction</xsl:when>
			<xsl:when test="$lang='ja'">PCT-SAFE ‚É‚æ‚é—¿‹à‚ÌŒ¸Šz</xsl:when>
			<xsl:otherwise>PCT-SAFE fee reduction</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!-- ********************************************************************
     * PARAMETER 'officeUse':  hides office specific data section, unless   *
     * parameter is assigned new value by the XSL processor (anything but 1)*
     * as argument at run-time                                              *
     ************************************************************************-->
	<xsl:param name="officeUse" select="0"></xsl:param>
	<!-- **********************************************************************
	 * PARAMETER 'package': if a package-data document has been created based *
	 * on package-data.dtd, search for sequence listings and/or tables and    *
     * supply that filename and path as a parameter to the XSL processor as   *
     * argument at run-time.  This param will be used on the SERVER-SIDE to   *
     * produce the various sequence/sequence table parameters listed below    *
     **************************************************************************-->
	<xsl:param name="package"></xsl:param>
	<!-- ******************************************************************
     * PARAMETER seqlist                                                  *
     *  VALUES :  (0 | 1 )                                                *
     *  DEFAULT:  0                                                       *
     *  Set at run-time via XSL Processor or by PI 'seqlist'; used on     *
     *  CLIENT-SIDE to trigger box IX-16(A) sequence listings attached as *
     * part of description                                                *
     ********************************************************************** -->
	<xsl:param name="seqlist">
		<xsl:choose>
			<xsl:when test="//processing-instruction('seqlist')">
				<xsl:value-of select="//processing-instruction('seqlist')"></xsl:value-of>
			</xsl:when>
			<xsl:when test="document($package_doc)//document-name='SEQL' or document($package_doc)//document-name='SEQLTXT'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!--**********************************************************************
     * PARAMETER seqlist-search                                              *
     *  VALUES :  (0 | 1 )                                                   *
     *  DEFAULT:  0                                                          *
     *  Set at run-time via XSL Processor or by PI 'seqlist-search'; used on *
     *  CLIENT-SIDE to trigger box IX-16(A)(i) sequence listings attached as *
     *  part of description                                                  *
     ************************************************************************* -->
	<xsl:param name="seqlist-search">
		<xsl:choose>
			<xsl:when test="//processing-instruction('seqlist-search')">
				<xsl:value-of select="//processing-instruction('seqlist-search')"></xsl:value-of>
			</xsl:when>
			<xsl:when test="document($package_doc)//document-name='SEQL-S' or document($package_doc)//document-name='SEQLTXT-S'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!--********************************************************************
     * PARAMETER seqtab                                                    *
     *  VALUES :  (0 | 1 )                                                 *
     *  DEFAULT:  0                                                        *
     *  Set at run-time via XSL Processor or by PI 'seqtab'; used on       *
     *  CLIENT-SIDE to trigger box IX-6b sequence listings attached as     *
     *  part of description                                                *
     *********************************************************************** -->
	<xsl:param name="seqtab">
		<xsl:choose>
			<xsl:when test="//processing-instruction('seqtab')">
				<xsl:value-of select="//processing-instruction('seqtab')"></xsl:value-of>
			</xsl:when>
			<xsl:when test="document($package_doc)//document-name='SEQLTAB' or document($package_doc)//document-name='SEQLTABXML' or document($package_doc)//document-name='SEQLTABTXT'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!-- **********************************************************************
     * PARAMETER seqtab-search                                                *
     *  VALUES :  (0 | 1 )                                                    *
     *  DEFAULT:  0                                                           *
     *  Set at run-time via XSL Processor or by PI 'seqtab-search'; used on   *
     *  CLIENT-SIDE to trigger box IX-6b(i) sequence listings attached as     *
     *  part of description                                                   *
     ************************************************************************** -->
	<xsl:param name="seqtab-search">
		<xsl:choose>
			<xsl:when test="//processing-instruction('seqtab-search')">
				<xsl:value-of select="//processing-instruction('seqtab-search')"></xsl:value-of>
			</xsl:when>
			<xsl:when test="document($package_doc)//document-name='SEQLTAB-S' or document($package_doc)//document-name='SEQLTABXML-S' or document($package_doc)//document-name='SEQLTABTXT-S'">1</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!--********************************************************************************
     * PARAMETER seqlist-additional                                                    *
     *  Set at run-time via XSL Processor or by PI 'seqlist-additional'; used on       *
     *  CLIENT-SIDE to trigger box IX-16(i) sequence listings attached as additional   *
     *  item and text for box IX-6a                                                    *
     *********************************************************************************** -->
	<xsl:param name="seqlist-additional">
		<xsl:choose>
			<xsl:when test="//processing-instruction('seqlist-additional')">
				<xsl:value-of select="//processing-instruction('seqlist-additional')"></xsl:value-of>
			</xsl:when>
			<xsl:otherwise>0</xsl:otherwise>
		</xsl:choose>
	</xsl:param>
	<!-- **********************************************************************
     * PARAMETER seqtab-additional                                            *
     *  Set at run-time via XSL Processor or by PI 'seqtab-additional'; used  *
     *  on CLIENT-SIDE to trigger box IX-16(ii) sequence listing table        *
     *  attached as additional item                                           *
     ************************************************************************** -->
	<xsl:param name="seqtab-additional">
		<xsl:value-of select="//processing-instruction('seqtab-additional')"></xsl:value-of>
	</xsl:param>
	<!-- *****************************************************************************
	 * PARAMETER 'declarations': if a declarations document has been created         *
     * based on declaration.dtd, *and* if that document contains *all* declarations, *
     * supply that filename and path as a parameter to the XSL processor as argument *
     * at run-time                                                                   *
     **********************************************************************************-->
	<xsl:param name="declarations"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'declaration1': the XML document based on declaration.dtd that *
     * contains declaration1, <identity-of-inventor>                            *
     ****************************************************************************-->
	<xsl:param name="declaration1"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'declaration2': the XML document based on declaration.dtd that *
     * contains declaration2, <entitlement-to-be-granted-patent>                * 
     ****************************************************************************-->
	<xsl:param name="declaration2"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'declaration3': the XML document based on declaration.dtd that *
     * contains declaration3, <entitlement-to-claim-priority>                   *
     ****************************************************************************-->
	<xsl:param name="declaration3"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'declaration4': the XML document based on declaration.dtd that *
     *  contains declaration4, <inventorship>                                   *
     ****************************************************************************-->
	<xsl:param name="declaration4"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'declaration5': the XML document based on declaration.dtd that *
     * contains declaration5, <lack-of-novelty>                                 *
     ****************************************************************************-->
	<xsl:param name="declaration5"></xsl:param>
	<!-- ***********************************************************************
	 * PARAMETER 'fees': if a fee-sheet document has been created, supply that *
     * filename and path as a parameter to the XSL processor as argument       *
     * at runtime                                                              *
     ***************************************************************************-->
	<xsl:param name="fees"></xsl:param>
	<!-- ************************************************************************
	 * PARAMETER 'bio': if an indication-bio-deposit document has been created, *
     * supply that filename and path as a parameter to the XSL processor as     *
     * argument at runtime                                                      *
     ****************************************************************************-->
	<xsl:param name="bio"></xsl:param>
	<!-- **********************************************************************
	 * PARAMETER 'power': if a power-of-attorney document has been created,   *
	 * supply that filename and path as a parameter to the XSL processor as   *
	 * argument at runtime                                                    *
	 **************************************************************************-->
	<xsl:param name="power"></xsl:param>

	<!--*********************************************************************
     * PARAMETER: XXX_font
	 * Note: It seems that FOP0.2X does not work well for font-family lists.
	 *       FOP0.2X always uses the first font so long as it is defined.
	 *        (even if it fails to render some characters)
     *********************************************************************-->
	<xsl:param name="helvetica_font">
		<xsl:choose>
			<xsl:when test="$lang = 'ar' ">Arialuni, Helvetica, WIPOUni</xsl:when>
			<xsl:when test="$lang = 'ja' ">IPAMincho-P, Helvetica, WIPOUni</xsl:when>
			<xsl:when test="$lang = 'ru' ">WIPOUni, Arialuni, Helvetica</xsl:when>
			<xsl:when test="$lang = 'zh' ">FZSongS-SIP, FZSongS, Simsun, WIPOUni, Helvetica</xsl:when>
			<xsl:otherwise>Arialuni, Helvetica, WIPOUni</xsl:otherwise>
		</xsl:choose>
	</xsl:param><xsl:param name="courier_font">
		<xsl:choose>
			<xsl:when test="$lang = 'ar' ">Arialuni, Courier, WIPOUni</xsl:when>
			<xsl:when test="$lang = 'ja' ">IPAGothic, Courier, WIPOUni</xsl:when>
			<xsl:when test="$lang = 'ru' ">WIPOUni, Courier, Arialuni</xsl:when>
			<xsl:when test="$lang = 'zh' ">FZSongS-SIP, FZSongS, Simhei, Courier, WIPOUni</xsl:when>
			<xsl:otherwise>Arialuni, Courier, WIPOUni</xsl:otherwise>
		</xsl:choose>
	</xsl:param>

	<!-- VARIABLE 'software_name': finds this PI, whether in doc prolog or doc -->
	<xsl:variable name="software_name">
		<xsl:value-of select="processing-instruction('software_name')"></xsl:value-of>
	</xsl:variable>
	<!-- VARIABLE 'software_version': finds this PI, whether in doc prolog or doc -->
	<xsl:variable name="software_version">
		<xsl:value-of select="processing-instruction('software_version')"></xsl:value-of>
	</xsl:variable>
	<!-- ************************************************************************
	 * PARAMETER 'rrri': if a RO-request-receiving-info document has been created, *
     * supply that filename and path as a parameter to the XSL processor as     *
     * argument at runtime                                                      *
     ****************************************************************************-->
	<xsl:param name="rrri"></xsl:param>
	<!-- *****************************************************************************
    * VARIABLE: EASY                                                                 * 
    * Set from $software_name.  Specifies EASY mode $software_name contains [EASY].  *
    ********************************************************************************** -->
	<xsl:variable name="EASY">
		<xsl:choose>
			<xsl:when test="contains($software_name,'EASY') or contains($software_name,'EFS-Web')">1</xsl:when>
			<xsl:otherwise></xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<!-- *****************************************************************************
    * VARIABLE: EFSWEB                                                                 * 
    * Set from $software_name.  Specifies EASY/EFS-Web mode $software_name contains [EFS-Web].  *
    ********************************************************************************** -->
	<xsl:variable name="EFSWEB">
		<xsl:choose>
			<xsl:when test="contains($software_name,'EFS-Web')">1</xsl:when>
			<xsl:otherwise></xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<!-- VARIABLE 'request_doc': used in fee-sheet components; declared here to prevent error -->
	<xsl:variable name="request_doc"></xsl:variable>
	<!-- VARIABLE 'package_doc': adds 'file:/' to path of 'package' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="package_doc">
		<xsl:if test="$package!= ''">
			<xsl:choose>
				<xsl:when test="contains($package,':')">
					<xsl:choose>
						<xsl:when test="contains($package,'file:/')">
							<xsl:value-of select="$package"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$package)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$package"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec_doc': adds 'file:/' to path of 'declarations' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec_doc">
		<xsl:if test="$declarations != ''">
			<xsl:choose>
				<xsl:when test="contains($declarations,':')">
					<xsl:choose>
						<xsl:when test="contains($declarations,'file:/')">
							<xsl:value-of select="$declarations"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declarations)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declarations"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec1_doc': adds 'file:/' to path of 'declaration1' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec1_doc">
		<xsl:if test="$declaration1 != ''">
			<xsl:choose>
				<xsl:when test="contains($declaration1,':')">
					<xsl:choose>
						<xsl:when test="contains($declaration1,'file:/')">
							<xsl:value-of select="$declaration1"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declaration1)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declaration1"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec2_doc': adds 'file:/' to path of 'declaration2' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec2_doc">
		<xsl:if test="$declaration2 != ''">
			<xsl:choose>
				<xsl:when test="contains($declaration2,':')">
					<xsl:choose>
						<xsl:when test="contains($declaration2,'file:/')">
							<xsl:value-of select="$declaration2"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declaration2)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declaration2"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec3_doc': adds 'file:/' to path of 'declaration3' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec3_doc">
		<xsl:if test="$declaration3 != ''">
			<xsl:choose>
				<xsl:when test="contains($declaration3,':')">
					<xsl:choose>
						<xsl:when test="contains($declaration3,'file:/')">
							<xsl:value-of select="$declaration3"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declaration3)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declaration3"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec4_doc': adds 'file:/' to path of 'declaration4' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec4_doc">
		<xsl:if test="$declaration4 != ''">
			<xsl:choose>
				<xsl:when test="contains($declaration4,':')">
					<xsl:choose>
						<xsl:when test="contains($declaration4,'file:/')">
							<xsl:value-of select="$declaration4"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declaration4)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declaration4"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'dec5_doc': adds 'file:/' to path of 'declaration5' parameter 
     (if necessary), if supplied as prior argument.  -->
	<xsl:variable name="dec5_doc">
		<xsl:if test="$declaration5 != ''">
			<xsl:choose>
				<xsl:when test="contains($declaration5,':')">
					<xsl:choose>
						<xsl:when test="contains($declaration5,'file:/')">
							<xsl:value-of select="$declaration5"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:/',$declaration5)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$declaration5"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'fee_doc'" adds 'file:/' to path of 'fees' parameter (if necessary)
     if supplied as argument -->
	<xsl:variable name="fee_doc">
		<xsl:if test="$fees != ''">
			<xsl:choose>
				<xsl:when test="contains($fees,':')">
					<xsl:choose>
						<xsl:when test="contains($fees,'file:')">
							<xsl:value-of select="$fees"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:///',$fees)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$fees"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'bio_doc'" adds 'file:/' to path of 'bio' parameter (if necessary)
     if supplied as argument -->
	<xsl:variable name="bio_doc">
		<xsl:if test="$bio != ''">
			<xsl:choose>
				<xsl:when test="contains($bio,':')">
					<xsl:choose>
						<xsl:when test="contains($bio,'file:')">
							<xsl:value-of select="$bio"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:///',$bio)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$bio"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'power_doc'" adds 'file:/' to path of 'power' parameter (if necessary)
     if supplied as argument -->
	<xsl:variable name="power_doc">
		<xsl:if test="$power != ''">
			<xsl:choose>
				<xsl:when test="contains($power,':')">
					<xsl:choose>
						<xsl:when test="contains($power,'file:')">
							<xsl:value-of select="$power"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:///',$power)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$power"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<!-- VARIABLE 'rrri_doc'" adds 'file:/' to path of 'rrri' parameter (if necessary)
     if supplied as argument -->
	<xsl:variable name="rrri_doc">
		<xsl:if test="$rrri != ''">
			<xsl:choose>
				<xsl:when test="contains($rrri,':')">
					<xsl:choose>
						<xsl:when test="contains($rrri,'file:')">
							<xsl:value-of select="$rrri"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="concat('file:///',$rrri)"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="$rrri"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:variable>
	<xsl:variable name="page_height">
		<xsl:choose>
			<xsl:when test="$page_size='A4' or $page_size='a4'">297</xsl:when>
			<xsl:when test="$page_size='Letter' or $page_size='letter'">279</xsl:when>
			<xsl:otherwise>297</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<xsl:variable name="page_width">
		<xsl:choose>
			<xsl:when test="$page_size='A4' or $page_size='a4'">210</xsl:when>
			<xsl:when test="$page_size='Letter' or $page_size='letter'">215</xsl:when>
			<xsl:otherwise>210</xsl:otherwise>
		</xsl:choose>
	</xsl:variable>
	<!-- parameter "baseDir":
     It holds a direct path to an image data referred from an input XML file.-->
	<xsl:param name="baseDir"></xsl:param>
	<!-- VARIABLE 'fop_version': finds this PI -->
	<xsl:variable name="fop_version">
		<xsl:value-of select="processing-instruction('fop_version')"></xsl:value-of>
	</xsl:variable>
	<xsl:template match="/">
		<fo:root>
			<fo:layout-master-set>
				<!-- NOTE: setting margin-bottom to '5cm' in attempt to emulate PCT-EASY output -->
				<fo:simple-page-master master-name="page" page-width="{$page_width}mm" page-height="{$page_height}mm" margin-top="1.5cm" margin-bottom="5cm" margin-left="2cm" margin-right="2.3cm">
					<fo:region-body margin-bottom="0mm" margin-right="0mm" margin-left="0mm" margin-top="19mm"></fo:region-body>
					<fo:region-before extent="2.5cm"></fo:region-before>
				</fo:simple-page-master>
				<fo:simple-page-master master-name="fees" page-width="{$page_width}mm" page-height="{$page_height}mm" margin-top="1.5cm" margin-bottom="5cm" margin-left="2cm" margin-right="2.3cm">
					<fo:region-body margin-bottom="0mm" margin-right="0mm" margin-left="0mm" margin-top="23mm"></fo:region-body>
					<fo:region-before extent="2.5cm"></fo:region-before>
				</fo:simple-page-master>
				<fo:simple-page-master master-name="bio" page-width="{$page_width}mm" page-height="{$page_height}mm" margin-top="1.5cm" margin-bottom="2cm" margin-left="2cm" margin-right="2.3cm">
					<fo:region-body margin-bottom="0mm" margin-right="0mm" margin-left="0mm" margin-top="23mm"></fo:region-body>
					<fo:region-before extent="2.5cm"></fo:region-before>
				</fo:simple-page-master>
				<fo:simple-page-master master-name="power" page-width="{$page_width}mm" page-height="{$page_height}mm" margin-top="1.5cm" margin-bottom="2cm" margin-left="2cm" margin-right="2.3cm">
					<fo:region-body margin-bottom="0mm" margin-right="0mm" margin-left="0mm" margin-top="23mm"></fo:region-body>
					<fo:region-before extent="2.5cm"></fo:region-before>
				</fo:simple-page-master>
				<fo:page-sequence-master master-name="request">
					<fo:repeatable-page-master-reference master-reference="page"></fo:repeatable-page-master-reference>
				</fo:page-sequence-master>
				<fo:page-sequence-master master-name="fee-sheet">
					<fo:repeatable-page-master-reference master-reference="fees"></fo:repeatable-page-master-reference>
				</fo:page-sequence-master>
				<fo:page-sequence-master master-name="power-of-attorney">
					<fo:repeatable-page-master-reference master-reference="power"></fo:repeatable-page-master-reference>
				</fo:page-sequence-master>
				<fo:page-sequence-master master-name="bio-deposit">
					<fo:repeatable-page-master-reference master-reference="bio"></fo:repeatable-page-master-reference>
				</fo:page-sequence-master>
			</fo:layout-master-set>
			<xsl:if test="$renderer='FOP'">
				<fox:outline internal-destination="requestSec">
					<fox:label>Requerimento </fox:label>
				</fox:outline>
				<xsl:if test="$declarations != '' or $declaration1 != '' or $declaration2 != '' or $declaration3 != '' or $declaration4 != '' or $declaration5 != ''">
					<fox:outline internal-destination="declarationSec">
						<fox:label>Declarações </fox:label>
					</fox:outline>
				</xsl:if>
				<xsl:if test="$fees != ''">
					<fox:outline internal-destination="feeSec">
						<fox:label>Taxas </fox:label>
					</fox:outline>
				</xsl:if>
				<xsl:if test="$power != ''">
					<fox:outline internal-destination="powerSec">
						<fox:label></fox:label>
					</fox:outline>
				</xsl:if>
				<xsl:if test="$bio != ''">
					<fox:outline internal-destination="bioSec">
						<fox:label>Depósito Biológico </fox:label>
					</fox:outline>
				</xsl:if>
			</xsl:if>
			<xsl:variable name="avail_width">
				<xsl:value-of select="$page_width - 50"></xsl:value-of>
			</xsl:variable>
			<fo:page-sequence master-reference="request" initial-page-number="1" force-page-count="no-force">
				<fo:static-content flow-name="xsl-region-before">
					<fo:block font-family="{$helvetica_font}">
						<fo:table table-layout="fixed">
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell>
										<fo:block font-size="9pt">
											<xsl:value-of select=".//file-reference-id"></xsl:value-of>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block font-size="10pt" text-align="right">
											<fo:inline font-weight="bold">
												<xsl:value-of select="$ia_number"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block text-align="center" font-size="10pt" background-color="white">
											<fo:page-number></fo:page-number>/<fo:page-number-citation ref-id="endofdoc"></fo:page-number-citation>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="2">
										<fo:block text-align="left" font-size="10pt" color="black" background-color="white">
											<fo:inline font-weight="bold">
												PCT REQUERIMENTO 
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell>
										<fo:block text-align="right" font-size="8pt" background-color="white"></fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
						<fo:table table-layout="fixed">
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-column column-width="55mm"></fo:table-column>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell number-columns-spanned="3">
										<fo:block text-align="center" font-size="8pt" background-color="white">
											<xsl:choose>
												<xsl:when test="$original = '1' and $EASY = '1'">
													Original (para 
													<fo:inline font-weight="bold">
														APRESENTAÇÃO 
													</fo:inline>
													<xsl:text>)</xsl:text>
												</xsl:when>
												<xsl:when test="$original = '2' and $EASY = '1'">
													Duplicado (do Original) 
												</xsl:when>
												<xsl:when test="$EASY = '1'">
													Cópia em papel 
													(NÃO 
													para apresentação) 
												</xsl:when>
												<xsl:otherwise>
													(Original em Formato Electrónico) 
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</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 xsl:use-attribute-sets="hyphenation" font-family="{$helvetica_font}">
						<xsl:attribute name="line-height"><xsl:choose><xsl:when test="$lang='ja' or $lang='ko' or $lang='zh'">1</xsl:when><xsl:otherwise>1.2</xsl:otherwise></xsl:choose></xsl:attribute>
						<xsl:attribute name="id">requestSec</xsl:attribute>
						<xsl:apply-templates select="request"></xsl:apply-templates>
					</fo:block>
					<fo:block id="endofdoc"></fo:block>
				</fo:flow>
			</fo:page-sequence>
			<!-- insert the fee-sheet pages if that parameter has been set; 
      start page numbering at '1' -->
			<xsl:if test="$fee_doc != ''">
				<fo:page-sequence master-reference="fee-sheet" initial-page-number="1" force-page-count="no-force">
					<fo:static-content flow-name="xsl-region-before">
						<fo:block width="{$avail_width}mm" font-family="{$helvetica_font}">
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-size="9pt">
												<xsl:value-of select=".//file-reference-id"></xsl:value-of>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-size="10pt" text-align="right">
												<fo:inline font-weight="bold">
													<xsl:value-of select="$ia_number"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="center" font-size="10pt" background-color="white">
												<fo:page-number></fo:page-number>/<fo:page-number-citation ref-id="endofFeedoc"></fo:page-number-citation>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="2">
											<fo:block text-align="left" font-size="10pt" color="black" background-color="white">
												<fo:inline font-weight="bold">
													PCT (ANEXO - FOLHA DE CÁLCULO DAS TAXAS)  
												</fo:inline>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="right" font-size="8pt" background-color="white"></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3">
											<fo:block text-align="center" font-size="8pt" background-color="white">
												<xsl:choose>
													<xsl:when test="$original = '1' and $EASY = '1'">
														Original (para 
														<fo:inline font-weight="bold">
															APRESENTAÇÃO 
														</fo:inline>
														<xsl:text>)</xsl:text>
													</xsl:when>
													<xsl:when test="$original = '2' and $EASY = '1'">
														Duplicado (do Original) 
													</xsl:when>
													<xsl:when test="$EASY = '1'">
														Cópia em papel 
														(NÃO 
														para apresentação) 
													</xsl:when>
													<xsl:otherwise>
														(Original em Formato Electrónico) 
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3" text-align="center" font-size="8pt" vertical-align="top">
											<fo:block background-color="white">
												(Esta folha não faz parte de, e não conta como, uma folha do pedido internacional) 
											</fo:block>
										</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 font-family="{$helvetica_font}" xsl:use-attribute-sets="hyphenation">
							<xsl:attribute name="id">feeSec</xsl:attribute>
							<xsl:call-template name="fee_info">
								<xsl:with-param name="lang" select="$lang"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
						<fo:block id="endofFeedoc"></fo:block>
					</fo:flow>
				</fo:page-sequence>
			</xsl:if>
			<!-- insert the power-of-attorney pages if that parameter has been set; 
      start page numbering at '1' -->
			<xsl:if test="$power_doc != ''">
				<fo:page-sequence master-reference="power-of-attorney" initial-page-number="1" force-page-count="no-force">
					<fo:static-content flow-name="xsl-region-before">
						<fo:block width="{$avail_width}mm" font-family="{$helvetica_font}">
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-size="9pt">
												<xsl:value-of select=".//file-reference-id"></xsl:value-of>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-size="10pt" text-align="right">
												<fo:inline font-weight="bold">
													<xsl:value-of select="$ia_number"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="center" font-size="10pt" background-color="white">
												<fo:page-number></fo:page-number>/<fo:page-number-citation ref-id="endofPowerdoc"></fo:page-number-citation>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="2">
											<fo:block text-align="left" font-size="10pt" color="black" background-color="white">
												<fo:inline font-weight="bold">
													PROCURAÇÃO PCT 
												</fo:inline>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="right" font-size="8pt" background-color="white"></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3">
											<fo:block text-align="center" font-size="8pt" background-color="white">
												<xsl:choose>
													<xsl:when test="$original = '1' and $EASY = '1'">
														Original (para 
														<fo:inline font-weight="bold">
															APRESENTAÇÃO 
														</fo:inline>
														<xsl:text>)</xsl:text>
													</xsl:when>
													<xsl:when test="$original = '2' and $EASY = '1'">
														Duplicado (do Original) 
													</xsl:when>
													<xsl:when test="$EASY = '1'">
														<fo:block></fo:block>
													</xsl:when>
													<xsl:otherwise>
														(Original em Formato Electrónico) 
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3" text-align="center" font-size="8pt" vertical-align="top">
											<fo:block background-color="white">
												(Esta folha não faz parte de, e não conta como, uma folha do pedido internacional) 
											</fo:block>
										</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 font-family="{$helvetica_font}" xsl:use-attribute-sets="hyphenation">
							<xsl:attribute name="id">powerSec</xsl:attribute>
							<xsl:call-template name="power_of_attorney">
								<xsl:with-param name="lang" select="$lang"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
						<fo:block id="endofPowerdoc"></fo:block>
					</fo:flow>
				</fo:page-sequence>
			</xsl:if>
			<!-- insert the bio-deposit pages if that parameter has been set; 
      start page numbering at '1' -->
			<xsl:if test="$bio_doc != ''">
				<fo:page-sequence master-reference="bio-deposit" initial-page-number="1" force-page-count="no-force">
					<fo:static-content flow-name="xsl-region-before">
						<fo:block width="{$avail_width}mm" font-family="{$helvetica_font}">
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block font-size="9pt">
												<xsl:value-of select=".//file-reference-id"></xsl:value-of>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block font-size="10pt" text-align="right">
												<fo:inline font-weight="bold">
													<xsl:value-of select="$ia_number"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="center" font-size="10pt" background-color="white">
												<fo:page-number></fo:page-number>/<fo:page-number-citation ref-id="endofBiodoc"></fo:page-number-citation>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="2">
											<fo:block text-align="left" font-size="10pt" color="black" background-color="white">
												<fo:inline font-weight="bold">
													PCT 
												</fo:inline>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell>
											<fo:block text-align="right" font-size="8pt" background-color="white"></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3">
											<fo:block text-align="center" font-size="8pt" background-color="white">
												<xsl:choose>
													<xsl:when test="$original = '1' and $EASY = '1'">
														Original (para 
														<fo:inline font-weight="bold">
															APRESENTAÇÃO 
														</fo:inline>
														<xsl:text>)</xsl:text>
													</xsl:when>
													<xsl:when test="$original = '2' and $EASY = '1'">
														Duplicado (do Original) 
													</xsl:when>
													<xsl:when test="$EASY = '1'">
														Cópia em papel 
														(NÃO 
														para apresentação) 
													</xsl:when>
													<xsl:otherwise>
														(Original em Formato Electrónico) 
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</fo:table-body>
							</fo:table>
							<fo:table table-layout="fixed">
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-column column-width="55mm"></fo:table-column>
								<fo:table-body>
									<fo:table-row>
										<fo:table-cell number-columns-spanned="3" text-align="center" font-size="8pt" vertical-align="top">
											<fo:block background-color="white">
												(Esta folha não faz parte de, e não conta como, uma folha do pedido internacional) 
											</fo:block>
										</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 font-family="{$helvetica_font}" xsl:use-attribute-sets="hyphenation">
							<xsl:attribute name="id">bioSec</xsl:attribute>
							<xsl:call-template name="indication_bio_deposit">
								<xsl:with-param name="lang" select="$lang"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
						<fo:block id="endofBiodoc"></fo:block>
					</fo:flow>
				</fo:page-sequence>
			</xsl:if>
		</fo:root>
	</xsl:template>
	<!-- INCLUDE COMPONENT TEMPLATES -->
	<xsl:template name="caseCH">   
		<xsl:choose>   
			<xsl:when test="text()='ch' or text() = 'CH'">  
				<xsl:text>CH&amp;LI</xsl:text>  
				<xsl:if test="following-sibling::*[1][name()='country']">
					<xsl:text> 
					</xsl:text>  
				</xsl:if>   
			</xsl:when>   
			<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
			<xsl:otherwise>  
				<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>  
				<xsl:if test="following-sibling::*[1][name()='country'] or following-sibling::*[1][name()='protection-request']">
					<xsl:text> 
					</xsl:text>  
				</xsl:if>   
			</xsl:otherwise>   
		</xsl:choose>  
	</xsl:template>
	<xsl:template name="format_name">      
		<xsl:param name="name_arg"></xsl:param>      
		<xsl:param name="showOf">0</xsl:param>      
		<!-- TODO: add prefix?  See EASY data and add accordingly -->
		      
		<xsl:choose>         
			<xsl:when test="$name_arg/name">
				<xsl:value-of select="$name_arg/name"></xsl:value-of>           
				<xsl:if test="$showOf='1'"> 
					da            
				</xsl:if>         
			</xsl:when>         
			<xsl:when test="$name_arg/last-name">            
				<xsl:call-template name="uppercaser">               
					<xsl:with-param name="string" select="$name_arg/last-name"></xsl:with-param>            
				</xsl:call-template>    
				<xsl:if test="$name_arg/last-name/text()">
					<xsl:choose>
						<xsl:when test="$name_arg/@lang='zh'">
							<xsl:text> </xsl:text>            
						</xsl:when>
						<xsl:when test="$name_arg/@lang='ko'">
							<xsl:text></xsl:text>            
						</xsl:when>
						<xsl:when test="$name_arg/@lang='ja'">
							<xsl:text>　</xsl:text>            
						</xsl:when>
						<xsl:otherwise> 
							<xsl:text>, </xsl:text>            
						</xsl:otherwise>
					</xsl:choose>
				</xsl:if>        
				<xsl:value-of select="$name_arg/first-name"></xsl:value-of>            
				<xsl:if test="$name_arg/middle-name">            
					<xsl:text> 
					</xsl:text>            
					<xsl:value-of select="$name_arg/middle-name"></xsl:value-of>            
				</xsl:if>            
            
				<xsl:if test="$name_arg/suffix">            
					<xsl:text>, </xsl:text>            
					<xsl:value-of select="$name_arg/suffix"></xsl:value-of>            
				</xsl:if>                        
           
				<xsl:if test="$showOf='1'">            		 
					da            
				</xsl:if>
			</xsl:when>         
			<xsl:otherwise>             
				<xsl:value-of select="."></xsl:value-of>         
			</xsl:otherwise>                  
		</xsl:choose>   
	</xsl:template>
	<xsl:template name="inventorName">
		<xsl:param name="name"></xsl:param>
		<xsl:for-each select="//deceased-inventor">
			<xsl:choose>
				<xsl:when test="./name = $name">
					<xsl:value-of select="preceding-sibling::deceased-inventor[1]/name"></xsl:value-of>				
				</xsl:when>
				<xsl:when test="concat(./last-name,' ',./first-name) = $name">
					<xsl:value-of select="preceding-sibling::deceased-inventor[1]/last-name"></xsl:value-of>
					<xsl:text> </xsl:text>
					<xsl:value-of select="preceding-sibling::deceased-inventor[1]/first-name"></xsl:value-of>
				</xsl:when>
				<xsl:when test="concat(./last-name,', ',./first-name) = $name">
					<xsl:value-of select="preceding-sibling::deceased-inventor[1]/last-name"></xsl:value-of>
					<xsl:text>, </xsl:text>
					<xsl:value-of select="preceding-sibling::deceased-inventor[1]/first-name"></xsl:value-of>				
				</xsl:when>
			</xsl:choose>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="uppercaser">      
		<xsl:param name="string"></xsl:param>      
		<xsl:value-of select="translate(normalize-space($string),                                      'abcdefghijklmnopqrstuvwxyzàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþабвгдежзийклмнопрстуфхцчшщъыьэюяčďľĺňŕřšůťž',  'ABCDEFGHIJKLMNOPQRSTUVWXYZÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯČĎĽĹŇŔŘŠŮŤŽ')"></xsl:value-of>
	</xsl:template>
	<xsl:template name="format_date">      
		<xsl:param name="lang"></xsl:param>      
		<xsl:param name="date"></xsl:param>      
		<xsl:param name="text"></xsl:param>      
		<xsl:param name="year_only"></xsl:param>      
		<xsl:param name="show_date"></xsl:param>      
		<xsl:param name="add_comma"></xsl:param>      
		<xsl:param name="date_too"></xsl:param>      
		<xsl:param name="nDate">         
			<xsl:value-of select="normalize-space(translate($date,'/\.,-',''))"></xsl:value-of>      
		</xsl:param>      
		<xsl:param name="y" select="substring($nDate, 1,4)"></xsl:param>      
		<xsl:param name="m" select="substring($nDate,5,2)"></xsl:param>      
		<xsl:param name="d" select="substring($nDate,7,2)"></xsl:param>  
		<xsl:choose>
		<xsl:when test="number($nDate) = $nDate"> <!-- 09.02.18 for ePCT use during the process and not intended to be anything for output -->
			<xsl:choose>             
			<xsl:when test="$lang='ja' or $lang='zh'">  
				<xsl:choose>        
					<xsl:when test="$year_only='1'">
						<xsl:value-of select="$y"></xsl:value-of> 
					</xsl:when> 
					<xsl:when test="$text != '1'"> 
						<!-- Y 年  M 月  D 日 -->
						<xsl:value-of select="$d"></xsl:value-of>.<xsl:value-of select="$m"></xsl:value-of>.<xsl:value-of select="$y"></xsl:value-of>
					</xsl:when> 
					<xsl:otherwise>
						<xsl:value-of select="$y"></xsl:value-of>
						<xsl:text>年</xsl:text>
						<xsl:choose>   
							<xsl:when test="$m='01'">
								Janeiro    
							</xsl:when>   
							<xsl:when test="$m='02'"> 
								Fevereiro    
							</xsl:when>   
							<xsl:when test="$m='03'"> 
								Março    
							</xsl:when>   
							<xsl:when test="$m='04'"> 
								Abril    
							</xsl:when>   
							<xsl:when test="$m='05'"> 
								Maio    
							</xsl:when>   
							<xsl:when test="$m='06'"> 
								Junho    
							</xsl:when>   
							<xsl:when test="$m='07'"> 
								Julho    
							</xsl:when>   
							<xsl:when test="$m='08'"> 
								Agosto    
							</xsl:when>   
							<xsl:when test="$m='09'"> 
								Setembro    
							</xsl:when>   
							<xsl:when test="$m='10'"> 
								Outubro    
							</xsl:when>   
							<xsl:when test="$m='11'"> 
								Novembro    
							</xsl:when>   
							<xsl:when test="$m='12'"> 
								Dezembro    
							</xsl:when>
							<!-- trap error (e.g., 1-digit month) -->
							   
							<xsl:otherwise>  
								<xsl:value-of select="$m"></xsl:value-of>
								<xsl:text>月</xsl:text> 					  
								<!--xsl:value-of select = "$d"/>
								<xsl:text>日</xsl:text-->   
							</xsl:otherwise>
						</xsl:choose>
						<xsl:if test="$add_comma='1'">   
							<xsl:text>, </xsl:text>
						</xsl:if>
						<xsl:if test="$show_date='1'">   
							<xsl:value-of select="$d"></xsl:value-of>
							<xsl:text>日</xsl:text>
						</xsl:if> 
						<xsl:if test="$date_too = '1'">
							<xsl:text>  
							</xsl:text>
							<xsl:value-of select="concat('(',$d,'.',$m,'.',$y,')')"></xsl:value-of>
							<xsl:text>  
							</xsl:text> 
						</xsl:if> 
					</xsl:otherwise>  
				</xsl:choose>  
			</xsl:when>  
			<xsl:when test="$lang='ko'">  
				<xsl:choose>        
					<xsl:when test="$year_only='1'">
						<xsl:value-of select="$y"></xsl:value-of> 
					</xsl:when> 
					<xsl:when test="$text != '1'"> 
						<!-- Y 年  M 月  D 日 -->
						<xsl:value-of select="$d"></xsl:value-of>.<xsl:value-of select="$m"></xsl:value-of>.<xsl:value-of select="$y"></xsl:value-of>
					</xsl:when> 
					<xsl:otherwise>
						<xsl:value-of select="$y"></xsl:value-of>
						<xsl:text>년</xsl:text>
						<xsl:choose>   
							<xsl:when test="$m='01'">
								Janeiro    
							</xsl:when>   
							<xsl:when test="$m='02'"> 
								Fevereiro    
							</xsl:when>   
							<xsl:when test="$m='03'"> 
								Março    
							</xsl:when>   
							<xsl:when test="$m='04'"> 
								Abril    
							</xsl:when>   
							<xsl:when test="$m='05'"> 
								Maio    
							</xsl:when>   
							<xsl:when test="$m = '06'"> 
								Junho    
							</xsl:when>   
							<xsl:when test="$m='07'"> 
								Julho    
							</xsl:when>   
							<xsl:when test="$m='08'"> 
								Agosto    
							</xsl:when>   
							<xsl:when test="$m='09'"> 
								Setembro    
							</xsl:when>   
							<xsl:when test="$m='10'"> 
								Outubro    
							</xsl:when>   
							<xsl:when test="$m='11'"> 
								Novembro    
							</xsl:when>   
							<xsl:when test="$m='12'"> 
								Dezembro    
							</xsl:when>
							<!-- trap error (e.g., 1-digit month) -->
							   
							<xsl:otherwise>  
								<xsl:value-of select="$m"></xsl:value-of>
								<xsl:text>월</xsl:text> 					  
								<!--xsl:value-of select = "$d"/>
								<xsl:text>일</xsl:text-->   
							</xsl:otherwise>
						</xsl:choose>
						<xsl:if test="$add_comma='1'">   
							<xsl:text>, </xsl:text>
						</xsl:if>
						<xsl:if test="$show_date='1'">   
							<xsl:value-of select="$d"></xsl:value-of>
							<xsl:text>일</xsl:text>
						</xsl:if> 
						<xsl:if test="$date_too = '1'">
							<xsl:text>  
							</xsl:text>
							<xsl:value-of select="concat('(',$d,'.',$m,'.',$y,')')"></xsl:value-of>
							<xsl:text>  
							</xsl:text> 
						</xsl:if> 
					</xsl:otherwise>  
				</xsl:choose>  
			</xsl:when>  
			<xsl:otherwise>  
				<xsl:choose>        
					<xsl:when test="$year_only='1'">
						<xsl:value-of select="$y"></xsl:value-of> 
					</xsl:when> 
					<xsl:when test="$text != '1'">
						<xsl:value-of select="$d"></xsl:value-of>.<xsl:value-of select="$m"></xsl:value-of>.<xsl:value-of select="$y"></xsl:value-of>
					</xsl:when> 
					<xsl:otherwise>
						<xsl:if test="$show_date='1'">   
							<xsl:text> 
							</xsl:text>   
							<xsl:value-of select="$d"></xsl:value-of>   
							<xsl:if test="$lang='de'">.</xsl:if>
							<xsl:text> 
							</xsl:text>
						</xsl:if>
						<xsl:choose>   
							<xsl:when test="$m='01'"> 
								Janeiro    
							</xsl:when>   
							<xsl:when test="$m='02'"> 
								Fevereiro    
							</xsl:when>   
							<xsl:when test="$m='03'"> 
								Março    
							</xsl:when>   
							<xsl:when test="$m='04'"> 
								Abril    
							</xsl:when>   
							<xsl:when test="$m='05'"> 
								Maio    
							</xsl:when>   
							<xsl:when test="$m = '06'"> 
								Junho    
							</xsl:when>   
							<xsl:when test="$m='07'"> 
								Julho    
							</xsl:when>   
							<xsl:when test="$m='08'"> 
								Agosto    
							</xsl:when>   
							<xsl:when test="$m='09'"> 
								Setembro    
							</xsl:when>   
							<xsl:when test="$m='10'"> 
								Outubro    
							</xsl:when>   
							<xsl:when test="$m='11'"> 
								Novembro    
							</xsl:when>   
							<xsl:when test="$m='12'"> 
								Dezembro    
							</xsl:when>
							<!-- trap error (e.g., 1-digit month) -->
							<xsl:otherwise>  
								<xsl:value-of select="$m"></xsl:value-of> 
								<xsl:value-of select="$d"></xsl:value-of>   
							</xsl:otherwise>
						</xsl:choose>
						<xsl:value-of select="$y"></xsl:value-of>
						<xsl:if test="$add_comma='1'">   
							<xsl:text>, </xsl:text>
						</xsl:if> 
						<xsl:if test="$date_too = '1'">
							<xsl:text>  
							</xsl:text>
							<xsl:value-of select="concat('(',$d,'.',$m,'.',$y,')')"></xsl:value-of>
							<xsl:text>  
							</xsl:text> 
						</xsl:if> 
					</xsl:otherwise>  
				</xsl:choose> 
			</xsl:otherwise>
		</xsl:choose>
		</xsl:when>
		<xsl:otherwise> 
			<xsl:value-of select="$nDate"></xsl:value-of>
		</xsl:otherwise>
		</xsl:choose>   
	</xsl:template>
	<xsl:template name="showAddress">
		<xsl:choose>
			<xsl:when test="addressbook[1]/address/country='US' or addressbook[1]/address/country='CA'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text>, </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[1]/address/country='AU'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text>, </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[1]/address/country='DE'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- TODO: determine JA markup -->
			<xsl:when test="addressbook[1]/address/country='JP'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[1]/address/address-1"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[1]/address/address-1"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:if test="addressbook[1]/address/address-2">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="addressbook[1]/address/address-2"></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="addressbook[1]/address/address-2"></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<xsl:if test="addressbook[1]/address/address-3">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="addressbook[1]/address/address-3"></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="addressbook[1]/address/address-3"></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:for-each select="addressbook[1]/address/*[not(name(.)='address-1' or name(.)='address-2' or name(.)='address-3' or name(.)='postcode' or name(.)='country')]"> 
										<xsl:value-of select="."></xsl:value-of>
										<xsl:text>, </xsl:text>
									</xsl:for-each>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:for-each select="addressbook[1]/address/*[not(name(.)='address-1' or name(.)='address-2' or name(.)='address-3' or name(.)='postcode' or name(.)='country')]"> 
										<xsl:value-of select="."></xsl:value-of>
										<xsl:text>, </xsl:text>
									</xsl:for-each>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[1]/address/country='GB' or addressbook[1]/address/country='KR'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='postcode'">
									<fo:block>
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:when test="name(.)='city'">   
									<fo:block>
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:if test="name(.)='address-2' or name(.)='address-3'">
													<xsl:text> </xsl:text>
												</xsl:if>
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:if test="name(.)='address-2' or name(.)='address-3'">
													<xsl:text> </xsl:text>
												</xsl:if>
												<xsl:value-of select="."></xsl:value-of> 
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[1]/address/country='FR' or addressbook[1]/address/country='NL' or addressbook[1]/address/country='SE' or addressbook[1]/address/country='CH' or addressbook[1]/address/country='LI'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[1]/address/country='CN'">				
				<xsl:choose>			
					<xsl:when test="addressbook[1]/text">		
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>		
					<xsl:when test="$lang='zh'"> <!-- for when the stylesheet does not use "showZhAddress" for Chinese address -->
						<fo:block>
							<xsl:call-template name="country_ChoiceText">	
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
							<xsl:value-of select="addressbook[1]/address/state"></xsl:value-of>
							<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
						</fo:block>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[1]/address/street"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-1"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-2"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[1]/address/street"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-1"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-2"></xsl:value-of>
									<xsl:value-of select="addressbook[1]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
						</fo:block>					
					</xsl:when>		
					<xsl:otherwise>		
						<xsl:for-each select="addressbook[1]/address/*[not(name(.)='street' or name(.)='city' or name(.)='state' or name(.)='postcode' or name(.)='country')]"> 	
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>		
						<xsl:if test="addressbook[1]/address/street">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="addressbook[1]/address/street"></xsl:value-of>	
										<xsl:text> </xsl:text>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="addressbook[1]/address/street"></xsl:value-of>	
										<xsl:text> </xsl:text>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="addressbook[1]/address/city">
								<fo:block>		
									<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
									<xsl:text>, </xsl:text>	
									<xsl:value-of select="addressbook[1]/address/state"></xsl:value-of>	
									<xsl:text> </xsl:text>	
									<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>	
								</fo:block>		
							</xsl:when>
							<xsl:otherwise>		
								<fo:block>		
									<xsl:value-of select="addressbook[1]/address/state"></xsl:value-of>	
									<xsl:text> </xsl:text>	
									<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>	
								</fo:block>		
							</xsl:otherwise>			
						</xsl:choose>
						<fo:block>		
							<xsl:call-template name="country_ChoiceText">	
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>	
						</fo:block>		
					</xsl:otherwise>			
				</xsl:choose>				
			</xsl:when>					
			<xsl:when test="addressbook[1]/address/country='RU'">
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
							<xsl:text> </xsl:text>	
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>			
			</xsl:when>
			<!-- for all others, use European format by default -->
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="addressbook[1]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[1]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[1]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>	
							<xsl:value-of select="addressbook[1]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[1]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="showEnAddress">
		<xsl:param name="address_arg" select="./addressbook[@lang='en']"></xsl:param>      
		<xsl:choose>
			<xsl:when test="$address_arg/address/country='US' or $address_arg/address/country='CA'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text>, </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="enCountry_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='AU'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text>, </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="enCountry_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='DE'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="$address_arg/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- TODO: determine JA markup -->
			<xsl:when test="$address_arg/address/country='JP'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:when test="$address_arg/address/state">
						<fo:block>
							<xsl:for-each select="$address_arg/address/*[not(name(.)='state' or name(.)='postcode' or name(.)='country')]"> 
								<xsl:choose>
									<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
										<fo:block white-space="pre" wrap-option="wrap">
											<xsl:value-of select="."></xsl:value-of>
											<xsl:text>, </xsl:text>
										</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:block white-space-collapse="false" wrap-option="wrap">															
											<xsl:value-of select="."></xsl:value-of>
											<xsl:text>, </xsl:text>
										</fo:block>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:for-each>
						</fo:block>
						<fo:block>
							<xsl:value-of select="$address_arg/address/state"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:when>
					<xsl:otherwise>   
						<!-- NOTE: JA format of EN address should always be like below
					           address-1
					           postcode
					           country -->
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="$address_arg//address-1"></xsl:value-of>
									<xsl:text> </xsl:text>
									<xsl:if test="$address_arg//address-2">
										<fo:block white-space="pre" wrap-option="wrap">
											<xsl:value-of select="$address_arg//address-2"></xsl:value-of>
											<xsl:text> </xsl:text>
										</fo:block>
									</xsl:if>
									<xsl:if test="$address_arg//address-3">
										<fo:block white-space="pre" wrap-option="wrap">
											<xsl:value-of select="$address_arg//address-3"></xsl:value-of>
											<xsl:text> </xsl:text>
										</fo:block>
									</xsl:if>
									<xsl:if test="$address_arg//street">
										<fo:block white-space="pre" wrap-option="wrap">
											<xsl:value-of select="$address_arg//street"></xsl:value-of>
											<xsl:if test="$address_arg//city">
												<xsl:text>, </xsl:text>
												<xsl:value-of select="$address_arg//city"></xsl:value-of>
											</xsl:if>									
										</fo:block>
									</xsl:if>
									<xsl:value-of select="$address_arg//county"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="$address_arg//address-1"></xsl:value-of>
									<xsl:text> </xsl:text>
									<xsl:if test="$address_arg//address-2">
										<fo:block white-space-collapse="false" wrap-option="wrap">
											<xsl:value-of select="$address_arg//address-2"></xsl:value-of>
											<xsl:text> </xsl:text>
										</fo:block>
									</xsl:if>
									<xsl:if test="$address_arg//address-3">
										<fo:block white-space-collapse="false" wrap-option="wrap">
											<xsl:value-of select="$address_arg//address-3"></xsl:value-of>
											<xsl:text> </xsl:text>
										</fo:block>
									</xsl:if>
									<xsl:if test="$address_arg//street">
										<fo:block white-space-collapse="false" wrap-option="wrap">
											<xsl:value-of select="$address_arg//street"></xsl:value-of>
											<xsl:if test="$address_arg//city">
												<xsl:text>, </xsl:text>
												<xsl:value-of select="$address_arg//city"></xsl:value-of>
											</xsl:if>									
										</fo:block>
									</xsl:if>
									<xsl:value-of select="$address_arg//county"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<fo:block>
							<xsl:value-of select="$address_arg//postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='GB'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
								</xsl:when>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="enCountry_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='KR'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
								</xsl:when>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="enCountry_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='FR' or $address_arg/address/country='NL' or $address_arg/address/country='SE' or $address_arg/address/country='CH' or $address_arg/address/country='LI'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="$address_arg/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$address_arg/address/country='CN'">				
				<xsl:choose>			
					<xsl:when test="$address_arg/text">		
						<xsl:value-of select="."></xsl:value-of>	
					</xsl:when>		
					<xsl:otherwise>		
						<xsl:for-each select="$address_arg/address/*[not(name(.)='street' or name(.)='city' or name(.)='state' or name(.)='postcode' or name(.)='country')]"> 	
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<xsl:if test="$address_arg/address/street">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="$address_arg/address/street"></xsl:value-of>	
										<xsl:text> </xsl:text>	
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="$address_arg/address/street"></xsl:value-of>	
										<xsl:text> </xsl:text>	
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>		
						<xsl:choose>
							<xsl:when test="$address_arg/address/city">
								<fo:block>		
									<xsl:value-of select="$address_arg/address/city"></xsl:value-of>
									<xsl:text>,	</xsl:text>	
									<xsl:value-of select="$address_arg/address/state"></xsl:value-of>	
									<xsl:text> </xsl:text>	
									<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>	
								</fo:block>		
							</xsl:when>
							<xsl:otherwise>		
								<fo:block>		
									<xsl:value-of select="$address_arg/address/state"></xsl:value-of>	
									<xsl:text> </xsl:text>	
									<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>	
								</fo:block>		
							</xsl:otherwise>			
						</xsl:choose>
						<fo:block>		
							<xsl:call-template name="enCountry_ChoiceText">	
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>	
						</fo:block>		
					</xsl:otherwise>			
				</xsl:choose>				
			</xsl:when>					
			<xsl:when test="$address_arg/address/country='RU'">
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="$address_arg/address/city"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- for all others, use European format by default -->
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="$address_arg/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="$address_arg/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="$address_arg/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="$address_arg/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="enCountry_ChoiceText">
								<xsl:with-param name="country" select="$address_arg/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="showJaAddress">
		<xsl:choose>
			<xsl:when test="addressbook[@lang=$lang]/text">
				<xsl:value-of select="."></xsl:value-of>
			</xsl:when>
			<xsl:otherwise>
				<!-- NOTE: JA format should always be (at least for PCT-SAFE) 
			           postcode
			           country
			           address-1
			           If this changes, uncomment below  -->
				<fo:block>
					<xsl:value-of select="addressbook[@lang=$lang]//postcode"></xsl:value-of>
				</fo:block>
				<fo:block>
					<xsl:call-template name="country_ChoiceText">
						<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
					</xsl:call-template>
				</fo:block>
				<xsl:choose>
					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
						<fo:block white-space="pre" wrap-option="wrap">
							<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							<xsl:if test="addressbook[@lang=$lang]/address/address-2">
								<fo:block>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
								</fo:block>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-3">
								<fo:block>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:if>
						</fo:block>
					</xsl:when>
					<xsl:otherwise>
						<fo:block white-space-collapse="false" wrap-option="wrap">															
							<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							<xsl:if test="addressbook[@lang=$lang]/address/address-2">
								<fo:block>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
								</fo:block>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-3">
								<fo:block>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:if>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="showZhAddress">
		<xsl:choose>
			<xsl:when test="addressbook[@lang=$lang]/text">
				<xsl:value-of select="."></xsl:value-of>
			</xsl:when>
			<xsl:otherwise>
				<fo:block>
					<xsl:variable name="country_name">
						<xsl:call-template name="country_ChoiceText">
							<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
						</xsl:call-template>
					</xsl:variable>
					<xsl:value-of select="normalize-space($country_name)"></xsl:value-of>      
					<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
					<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
				</fo:block>
				<xsl:choose>
					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
						<fo:block white-space="pre" wrap-option="wrap">
							<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
						</fo:block>
					</xsl:when>
					<xsl:otherwise>
						<fo:block white-space-collapse="false" wrap-option="wrap">															
							<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
				<fo:block>
					<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
				</fo:block>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="showKoAddress">
		<xsl:choose>
			<xsl:when test="addressbook[@lang=$lang]/text">
				<xsl:value-of select="."></xsl:value-of>
			</xsl:when>
			<xsl:otherwise>
				<fo:block>
					<xsl:call-template name="country_ChoiceText">
						<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
					</xsl:call-template>
				</fo:block>
				<fo:block>
					<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
				</fo:block>
				<xsl:choose>
					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
						<fo:block white-space="pre" wrap-option="wrap">
							<xsl:if test="addressbook[@lang=$lang]/address/state">   
								<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/city">
								<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/street">
								<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-1">
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-2">
								<xsl:text> </xsl:text>
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-3">
								<xsl:text> </xsl:text>
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
							</xsl:if>
						</fo:block>
					</xsl:when>
					<xsl:otherwise>
						<fo:block white-space-collapse="false" wrap-option="wrap">															
							<xsl:if test="addressbook[@lang=$lang]/address/state">   
								<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/city">
								<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/street">
								<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
								<xsl:text> </xsl:text>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-1">
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-2">
								<xsl:text> </xsl:text>
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
							</xsl:if>
							<xsl:if test="addressbook[@lang=$lang]/address/address-3">
								<xsl:text> </xsl:text>
								<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
							</xsl:if>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="showNativeAddress">
		<!-- shows addressbook data in language of the application -->
		<xsl:choose>
			<xsl:when test="addressbook[@lang=$lang]/address/country='US' or addressbook[@lang=$lang]/address/country='CA'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text>, </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='state'">   
									<xsl:value-of select="."></xsl:value-of>   
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
									<xsl:text> </xsl:text>
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='DE'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- TODO: determine JA markup -->
			<xsl:when test="addressbook[@lang=$lang]/address/country='JP'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]//postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[@lang=$lang]//state"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//city"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//street"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//address-1"></xsl:value-of>
									<xsl:if test="addressbook[@lang=$lang]//address-2">
										<fo:block>
											<xsl:value-of select="addressbook[@lang=$lang]//address-2"></xsl:value-of>
										</fo:block>
									</xsl:if>
									<xsl:if test="addressbook[@lang=$lang]//address-3">
										<fo:block>
											<xsl:value-of select="addressbook[@lang=$lang]//address-3"></xsl:value-of>	
										</fo:block>
									</xsl:if>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[@lang=$lang]//state"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//city"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//street"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]//address-1"></xsl:value-of>
									<xsl:if test="addressbook[@lang=$lang]//address-2">
										<fo:block>
											<xsl:value-of select="addressbook[@lang=$lang]//address-2"></xsl:value-of>
										</fo:block>
									</xsl:if>
									<xsl:if test="addressbook[@lang=$lang]//address-3">
										<fo:block>
											<xsl:value-of select="addressbook[@lang=$lang]//address-3"></xsl:value-of>	
										</fo:block>
									</xsl:if>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='GB'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*"> 
							<xsl:choose>
								<xsl:when test="name(.)='postcode'">
									<xsl:value-of select="."></xsl:value-of>
								</xsl:when>
								<xsl:when test="name(.)='city'">   
									<xsl:value-of select="."></xsl:value-of>   
								</xsl:when>
								<xsl:when test="name(.)='country'">
									<fo:block>
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select="."></xsl:with-param>
										</xsl:call-template>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
											<fo:block white-space="pre" wrap-option="wrap">
												<xsl:value-of select="."></xsl:value-of>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block white-space-collapse="false" wrap-option="wrap">															
												<xsl:value-of select="."></xsl:value-of>   
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise> 
							</xsl:choose>  
						</xsl:for-each>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='KR'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
						</fo:block>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:if test="addressbook[@lang=$lang]/address/address-2">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<xsl:if test="addressbook[@lang=$lang]/address/address-3">
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='FR' or addressbook[@lang=$lang]/address/country='NL' or addressbook[@lang=$lang]/address/country='SE' or addressbook[@lang=$lang]/address/country='CH' or addressbook[@lang=$lang]/address/country='LI'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='CN'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
							<xsl:value-of select="addressbook[@lang=$lang]/address/state"></xsl:value-of>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
						</fo:block>
						<xsl:choose>
							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
								<fo:block white-space="pre" wrap-option="wrap">
									<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block white-space-collapse="false" wrap-option="wrap">															
									<xsl:value-of select="addressbook[@lang=$lang]/address/street"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-1"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-2"></xsl:value-of>
									<xsl:value-of select="addressbook[@lang=$lang]/address/address-3"></xsl:value-of>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="addressbook[@lang=$lang]/address/country='RU'">
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<!-- for all others, use European format by default -->
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="addressbook[@lang=$lang]/text">
						<xsl:value-of select="."></xsl:value-of>
					</xsl:when>
					<xsl:otherwise>   
						<xsl:for-each select="addressbook[@lang=$lang]/address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
							<xsl:choose>
								<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
									<fo:block white-space="pre" wrap-option="wrap">
										<xsl:value-of select="."></xsl:value-of>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block white-space-collapse="false" wrap-option="wrap">															
										<xsl:value-of select="."></xsl:value-of>   
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:for-each>
						<fo:block>
							<xsl:value-of select="addressbook[@lang=$lang]/address/postcode"></xsl:value-of>
							<xsl:text> </xsl:text>
							<xsl:value-of select="addressbook[@lang=$lang]/address/city"></xsl:value-of>
						</fo:block>
						<fo:block>
							<xsl:call-template name="country_ChoiceText">
								<xsl:with-param name="country" select="addressbook[@lang=$lang]/address/country"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="get_size">
      <xsl:param name="size_in"></xsl:param>
    <!-- NOTE: assumes screen resolution of 96 DPI (small icons) -->
        <!-- strip any units from attributes for mathematical operations to follow -->
      <xsl:variable name="unit" select="normalize-space(translate($size_in,'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ',''))"></xsl:variable>
      <xsl:variable name="nSize" select="translate($size_in,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:variable>
      <xsl:variable name="size_out">
         <xsl:choose>
            <!-- if measured in milimeters -->
            <xsl:when test="contains($nSize,'MM')">
               <xsl:value-of select="round(number($unit) div 25.4 * 96)"></xsl:value-of>
            </xsl:when>
            <!-- if measured in centimeters -->
            <xsl:when test="contains($nSize,'CM')">
               <xsl:value-of select="round(number($unit) div 2.54 * 96)"></xsl:value-of>
            </xsl:when>
            <!-- if measured in inches -->
            <xsl:when test="contains($nSize,'IN')">
               <xsl:value-of select="round(number($unit) * 96)"></xsl:value-of>
            </xsl:when>
            <!-- if measured in pixels; NOTE: assumes 300 dpi scan -->
            <xsl:when test="contains($nSize,'PX')">
               <xsl:value-of select="round(number($unit) div 300 * 96)"></xsl:value-of>
            </xsl:when>
            <!-- use mm as default -->
            <xsl:otherwise>
               <xsl:value-of select="round(number($unit) div 25.4 * 96)"></xsl:value-of>
            </xsl:otherwise>
         </xsl:choose>
      </xsl:variable>
      <xsl:value-of select="$size_out"></xsl:value-of>
   </xsl:template>
	<xsl:template name="stripFilePath">
<xsl:param name="path"></xsl:param>
<!-- first, translate path separators to one type ('/' or '\') -->
<xsl:param name="mPath" select="translate($path,'\','/')"></xsl:param>
	<!-- reverse the string -->
	<xsl:variable name="doc">
		<xsl:call-template name="backward">
			<xsl:with-param name="text" select="$mPath"></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<!-- get substring-after '/'  -->
	<xsl:variable name="doc2">
		<xsl:call-template name="backward2">
			<xsl:with-param name="text" select="$doc"></xsl:with-param>
		</xsl:call-template>
	</xsl:variable>
	<xsl:value-of select="$doc2"></xsl:value-of>
</xsl:template><xsl:template name="backward">
    <xsl:param name="text"></xsl:param>
    <xsl:variable name="mirror">
      <xsl:call-template name="build-mirror">
        <xsl:with-param name="text" select="$text"></xsl:with-param>
        <xsl:with-param name="position" select="string-length($text)"></xsl:with-param>
      </xsl:call-template>
    </xsl:variable>
    <!-- returns filename in reverse (e.g., 'lmx.teehs-eef') -->
	<xsl:value-of select="substring-before(substring($mirror, string-length($text) + 1, string-length($text)),'/')"></xsl:value-of>
</xsl:template><xsl:template name="backward2">
    <xsl:param name="text"></xsl:param>
    <xsl:variable name="mirror">
      <xsl:call-template name="build-mirror">
        <xsl:with-param name="text" select="$text"></xsl:with-param>
        <xsl:with-param name="position" select="string-length($text)"></xsl:with-param>
      </xsl:call-template>
    </xsl:variable>
    <!-- returns filename (e.g.,'fee-sheet.xml') -->
	<xsl:value-of select="substring($mirror, string-length($text) + 1, string-length($text))"></xsl:value-of>
</xsl:template><xsl:template name="build-mirror">
    <xsl:param name="text"></xsl:param>
    <xsl:param name="position"></xsl:param>

    <xsl:choose>
      <xsl:when test="$position &gt; 0">
        <xsl:call-template name="build-mirror">
          <xsl:with-param name="text" select="concat($text, substring($text, $position, 1))"></xsl:with-param>
          <xsl:with-param name="position" select="$position - 1"></xsl:with-param>
        </xsl:call-template>
      </xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$text"></xsl:value-of>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>
	<xsl:template name="trimEndWS">
	 <xsl:param name="string"></xsl:param>
	 <xsl:param name="len" select="string-length($string)"></xsl:param>
	 <xsl:param name="cut" select="number($len)-1"></xsl:param>

	 <xsl:choose>
		<xsl:when test="substring($string,$len)='&#xA;' &#xA;					 or substring($string,$len)='&#xA;' &#xA;					 or substring($string,$len)=' ' &#xA;					 or substring($string,$len)='	'">
			<xsl:call-template name="trimEndWS">
				<xsl:with-param name="string" select="substring($string,1,$cut)"></xsl:with-param>
			</xsl:call-template>
		</xsl:when>
		<xsl:otherwise>
			<xsl:value-of select="$string"></xsl:value-of>
		</xsl:otherwise>
	 </xsl:choose>
</xsl:template>
	<xsl:variable name="adjustedFontSize">10pt</xsl:variable><xsl:attribute-set name="tdTL">
		<!-- table, top left column -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="text-align">left</xsl:attribute>
		<xsl:attribute name="letter-spacing">
			<xsl:choose>
				<xsl:when test="$lang='ja'">			
					-0.1mm
				</xsl:when>		
				<xsl:otherwise>			
					0mm
				</xsl:otherwise>		
			</xsl:choose>	
		</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTC">
		<!-- table, top center column -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTR">
		<!-- table, top right column, with data -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBL">
		<!-- table, left column, border bottom -->
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="letter-spacing">
			<xsl:choose>
				<xsl:when test="$lang='ja'">			
					-0.1mm
				</xsl:when>		
				<xsl:otherwise>			
					0mm
				</xsl:otherwise>		
			</xsl:choose>	
		</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBC">
		<!-- table, center column, border bottom -->
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBR">
		<!-- table, right column, border bottom -->
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding-left">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdL">
		<!-- table, left column -->
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="letter-spacing">
			<xsl:choose>
				<xsl:when test="$lang='ja'">			
					-0.1mm
				</xsl:when>		
				<xsl:otherwise>			
					0mm
				</xsl:otherwise>		
			</xsl:choose>	
		</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdC">
		<!-- table, center column -->
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdR">
		<!-- table, right column -->
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTB">
		<!-- table cell, top and bottom borders -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTBL">
		<!-- table, left column, top and bottom borders -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="letter-spacing">
			<xsl:choose>
				<xsl:when test="$lang='ja'">			
					-0.1mm
				</xsl:when>		
				<xsl:otherwise>			
					0mm
				</xsl:otherwise>		
			</xsl:choose>	
		</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTBC">
		<!-- table, center column, all borders -->
		<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTBC_hyp">
		<!-- table, center column, all borders -->
		<xsl:attribute name="border">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="hyphenate">
			<xsl:choose>
				<xsl:when test="not($lang='ja' or $lang='zh')">true</xsl:when>
				<xsl:otherwise>false</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="hyphenation-push-character-count">6</xsl:attribute>
		<xsl:attribute name="hyphenation-remain-character-count">6</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdTBR">
		<!-- table, right column, top and bottom borders -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1.5pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTop">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderBottom">
		<!-- table cell, bottom border -->
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderBottomLeft">
		<!-- table cell, bottom and left border -->
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderLeft">
		<!-- table cell, left border -->
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderRight">
		<!-- table cell, right border -->
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopLeft">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopLeftData">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopBottomLeftData">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-bottom">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopRight">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
		<xsl:attribute name="text-align">center</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopRightData">
		<!-- table cell, top border -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-right">solid black 0.5pt</xsl:attribute> 
		<xsl:attribute name="font-size">
			<xsl:choose>
				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
					<xsl:value-of select="$adjustedFontSize"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>12pt</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="font-family"><xsl:value-of select="$courier_font"></xsl:value-of></xsl:attribute>
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="hyphenation">
		<xsl:attribute name="language">
			<xsl:value-of select="$lang"></xsl:value-of>
		</xsl:attribute>
		<xsl:attribute name="font-size">12pt</xsl:attribute>
		<xsl:attribute name="hyphenate">
			<xsl:choose>
				<xsl:when test="not($lang='ja' or $lang='zh')">true</xsl:when>
				<xsl:otherwise>false</xsl:otherwise>
			</xsl:choose>
		</xsl:attribute>
		<xsl:attribute name="hyphenation-push-character-count">6</xsl:attribute>
		<xsl:attribute name="hyphenation-remain-character-count">6</xsl:attribute>
	</xsl:attribute-set><xsl:attribute-set name="tdBorderTopLeftNoCenter">
		<!-- table cell, top left -->
		<xsl:attribute name="border-top">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="border-left">solid black 0.5pt</xsl:attribute>
		<xsl:attribute name="font-size">8pt</xsl:attribute>
		<xsl:attribute name="vertical-align">top</xsl:attribute> 
		<xsl:attribute name="padding">1pt</xsl:attribute>
	</xsl:attribute-set>
	<xsl:template name="process_dec1">
		<xsl:for-each select=".">
			<xsl:variable name="inv_seq" select="@sequence"></xsl:variable>
			<fo:table table-layout="fixed" border-collapse="separate">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>
								<fo:inline font-weight="bold">VIII-1-<xsl:value-of select="$inv_seq"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								<fo:inline font-weight="bold">
									Declaração: Identidade do inventor 
								</fo:inline>
								<fo:block></fo:block>
								Declaração relativa à identidade do inventor (Regras 4.17.i) e 51bis.1.a)i)) 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<fo:block padding-before="4mm">
								<fo:inline font-weight="bold">
									Em relação ao 
									<xsl:choose>
										<xsl:when test=".//application-reference">
											<xsl:if test="not($lang='ja')">
												pedido internacional número 
											</xsl:if>
											<xsl:value-of select=".//country"></xsl:value-of>
											<xsl:text> </xsl:text>
											<xsl:value-of select=".//doc-number"></xsl:value-of>
											<xsl:if test="$lang='ja'">
												pedido internacional número 
											</xsl:if>
										</xsl:when>
										<xsl:otherwise>
											este pedido internacional 
										</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<xsl:choose>
						<xsl:when test="not($lang='ja' or $lang='ko' or $lang='zh' or $lang='ru' or $lang='ar')">
							<xsl:for-each select=".//addressbook[*]">
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTC">
										<fo:block>
											<xsl:choose>
												<xsl:when test="$lang='ja'">
													<xsl:if test=".//address//text()">
														Endereço 
													</xsl:if>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook"></xsl:with-param>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:if test="./address//text()">
															<fo:block>
																<xsl:value-of select=".//postcode"></xsl:value-of>
															</fo:block>
															<fo:block>
																<xsl:call-template name="country_ChoiceText">
																	<xsl:with-param name="country" select=".//country"></xsl:with-param>
																</xsl:call-template>
															</fo:block>
															<xsl:choose>
																<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																	<fo:block white-space="pre" wrap-option="wrap">
																		<xsl:value-of select=".//state"></xsl:value-of>
																		<xsl:value-of select=".//city"></xsl:value-of>
																		<xsl:value-of select=".//street"></xsl:value-of>
																		<xsl:value-of select=".//address-1"></xsl:value-of>
																		<xsl:if test=".//address-2">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select=".//address-2"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																		<xsl:if test=".//address-3">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select=".//address-3"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																	</fo:block>
																</xsl:when>
																<xsl:otherwise>
																	<fo:block white-space-collapse="false" wrap-option="wrap">
																		<xsl:value-of select=".//state"></xsl:value-of>
																		<xsl:value-of select=".//city"></xsl:value-of>
																		<xsl:value-of select=".//street"></xsl:value-of>
																		<xsl:value-of select=".//address-1"></xsl:value-of>
																		<xsl:if test=".//address-2">
																			<fo:block white-space-collapse="false" wrap-option="wrap">
																				<xsl:value-of select=".//address-2"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																		<xsl:if test=".//address-3">
																			<fo:block white-space-collapse="false" wrap-option="wrap">
																				<xsl:value-of select=".//address-3"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																	</fo:block>
																</xsl:otherwise>
															</xsl:choose>
															<fo:block></fo:block>
															<xsl:text>在住の</xsl:text>
														</xsl:if>
													</xsl:when>
													<xsl:when test="$lang='zh'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
														<xsl:if test="./address//text()">
															<xsl:text> 住在</xsl:text>
														</xsl:if>
													</xsl:when>
													<xsl:when test="$lang='fr' or $lang='ru' or $lang='ko' or $lang='pt'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
													</xsl:when>
													<xsl:otherwise>
														<xsl:choose>
															<xsl:when test="./address//text()">
																<xsl:choose>
																	<xsl:when test="$lang = 'de'">
																		<xsl:call-template name="format_name">
																			<xsl:with-param name="name_arg" select="."></xsl:with-param>
																			<xsl:with-param name="showOf" select="1"></xsl:with-param>
																		</xsl:call-template>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:call-template name="format_name">
																			<xsl:with-param name="name_arg" select="."></xsl:with-param>
																			<xsl:with-param name="showOf" select="1"></xsl:with-param>
																		</xsl:call-template>
																	</xsl:otherwise>
																</xsl:choose>
															</xsl:when>
															<xsl:otherwise>
																<xsl:call-template name="format_name">
																	<xsl:with-param name="name_arg" select="."></xsl:with-param>
																</xsl:call-template>
															</xsl:otherwise>
														</xsl:choose>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											<xsl:choose>
												<xsl:when test="$lang='ja'">
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook"></xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:if test=".//address//text()">
														Endereço 
													</xsl:if>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
														<fo:block></fo:block>
													</xsl:when>
													<xsl:otherwise>
														<xsl:if test="./address//text()">
															<xsl:choose>
																<xsl:when test=".//address/country='US' or .//address/country='CA'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:when test="$lang='zh'">
																			<!-- US and CA address in Chinese Request Case-->
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*">
																				<xsl:choose>
																					<xsl:when test="name(.)='city'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text>, </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='state'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='postcode'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='country'">
																						<fo:block>
																							<xsl:call-template name="country_ChoiceText">
																								<xsl:with-param name="country" select="."></xsl:with-param>
																							</xsl:call-template>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='DE'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select="."></xsl:value-of>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">
																								<xsl:value-of select="."></xsl:value-of>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</fo:block>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<!-- TODO: determine JA markup -->
																<xsl:when test=".//address/country='JP'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:when test="(.//address/state) or (.//address/city) or (.//address/street)">
																			<!-- Japanese address in Korean or Chinese Request Case-->
																			<xsl:choose>
																				<xsl:when test="$lang='ko'">
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																						</xsl:call-template>
																					</fo:block>
																					<fo:block>
																						<xsl:value-of select=".//postcode"></xsl:value-of>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"></xsl:value-of>
																								<xsl:if test=".//address-2">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-2"></xsl:value-of>
																								</xsl:if>
																								<xsl:if test=".//address-3">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-3"></xsl:value-of>
																								</xsl:if>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"></xsl:value-of>
																								<xsl:if test=".//address-2">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-2"></xsl:value-of>
																								</xsl:if>
																								<xsl:if test=".//address-3">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-3"></xsl:value-of>
																								</xsl:if>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																						</xsl:call-template>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																					<fo:block>
																						<xsl:value-of select=".//postcode"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">
																						<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='GB'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*">
																				<xsl:choose>
																					<xsl:when test="name(.)='postcode'">
																						<xsl:value-of select="."></xsl:value-of>
																					</xsl:when>
																					<xsl:when test="name(.)='city'">
																						<xsl:value-of select="."></xsl:value-of>
																					</xsl:when>
																					<xsl:when test="name(.)='country'">
																						<fo:block>
																							<xsl:call-template name="country_ChoiceText">
																								<xsl:with-param name="country" select="."></xsl:with-param>
																							</xsl:call-template>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='KR'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='CN' or .//address/country='TW'">			
																	<xsl:choose>			
																		<xsl:when test=".//text">		
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>		
																		<xsl:when test="$lang='zh'"> <!-- for when the stylesheet does not use "showZhAddress" for Chinese address -->
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">	
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																				<xsl:value-of select=".//address/state"></xsl:value-of>
																					<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																			</fo:block>					
																		</xsl:when>		
																		<xsl:otherwise>		
																			<xsl:for-each select=".//address/*[not(name(.)='street' or name(.)='city' or name(.)='state' or name(.)='postcode' or name(.)='country')]"> 	
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>		
																			<xsl:if test=".//address/street">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select=".//address/street"></xsl:value-of>	
																							<xsl:text> </xsl:text>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select=".//address/street"></xsl:value-of>	
																							<xsl:text> </xsl:text>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:if>
																			<xsl:choose>
																				<xsl:when test=".//address/city">
																					<fo:block>		
																						<xsl:value-of select=".//address/city"></xsl:value-of>
																						<xsl:text>, </xsl:text>	
																						<xsl:value-of select=".//address/state"></xsl:value-of>	
																						<xsl:text> </xsl:text>	
																						<xsl:value-of select=".//address/postcode"></xsl:value-of>	
																					</fo:block>		
																				</xsl:when>
																				<xsl:otherwise>		
																					<fo:block>		
																						<xsl:value-of select=".//address/state"></xsl:value-of>	
																						<xsl:text> </xsl:text>	
																						<xsl:value-of select=".//address/postcode"></xsl:value-of>	
																					</fo:block>		
																				</xsl:otherwise>			
																			</xsl:choose>
																			<fo:block>		
																				<xsl:call-template name="country_ChoiceText">	
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>	
																			</fo:block>		
																		</xsl:otherwise>			
																	</xsl:choose>				
																</xsl:when>	
																<!-- 202001 CN address not shown correctly
																<xsl:when test=".//address/country='CN' or .//address/country='TW'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."/>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:choose>
																				<xsl:when test="$lang='ko'">
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"/>
																						</xsl:call-template>
																					</fo:block>
																					<fo:block>
																						<xsl:value-of select=".//postcode"/>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"/>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">
																								<xsl:value-of select=".//state"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"/>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"/>
																						</xsl:call-template>
																						<xsl:value-of select=".//state"/>
																						<xsl:value-of select=".//city"/>
																					</fo:block>
																					<xsl:if test=".//street">
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select=".//street"/>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">
																									<xsl:value-of select=".//street"/>
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:if>
																					<fo:block>
																						<xsl:value-of select=".//postcode"/>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																!-->
																<xsl:when test=".//address/country='FR' or .//address/country='NL' or .//address/country='SE' or .//address/country='CH' or .//address/country='LI'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='RU'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>   
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//city"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<!-- for all others, use European format by default -->
																<xsl:otherwise>
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</xsl:if>
													</xsl:otherwise>
												</xsl:choose>
												é o inventor do objecto  para o qual se procura protecção mediante este pedido internacional    
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:for-each>
						</xsl:when>
						<xsl:otherwise>
							<xsl:for-each select=".//addressbook[@lang='ja' or @lang='ko' or @lang='zh' or @lang='ru' or @lang='ar']">
								<xsl:variable name="sibling" select="following-sibling::addressbook[position()=1][@lang='en']"></xsl:variable>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTC">
										<fo:block>
											<xsl:choose>
												<xsl:when test="$lang='ja'">
													<xsl:if test=".//address//text()">
														Endereço 
													</xsl:if>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook"></xsl:with-param>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:if test="./address//text()">
															<fo:block>
																<xsl:value-of select=".//postcode"></xsl:value-of>
															</fo:block>
															<fo:block>
																<xsl:call-template name="country_ChoiceText">
																	<xsl:with-param name="country" select=".//country"></xsl:with-param>
																</xsl:call-template>
															</fo:block>
															<xsl:choose>
																<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																	<fo:block white-space="pre" wrap-option="wrap">
																		<xsl:value-of select=".//state"></xsl:value-of>
																		<xsl:value-of select=".//city"></xsl:value-of>
																		<xsl:value-of select=".//street"></xsl:value-of>
																		<xsl:value-of select=".//address-1"></xsl:value-of>
																		<xsl:if test=".//address-2">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select=".//address-2"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																		<xsl:if test=".//address-3">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select=".//address-3"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																	</fo:block>
																</xsl:when>
																<xsl:otherwise>
																	<fo:block white-space-collapse="false" wrap-option="wrap">
																		<xsl:value-of select=".//state"></xsl:value-of>
																		<xsl:value-of select=".//city"></xsl:value-of>
																		<xsl:value-of select=".//street"></xsl:value-of>
																		<xsl:value-of select=".//address-1"></xsl:value-of>
																		<xsl:if test=".//address-2">
																			<fo:block white-space-collapse="false" wrap-option="wrap">
																				<xsl:value-of select=".//address-2"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																		<xsl:if test=".//address-3">
																			<fo:block white-space-collapse="false" wrap-option="wrap">
																				<xsl:value-of select=".//address-3"></xsl:value-of>
																			</fo:block>
																		</xsl:if>
																	</fo:block>
																</xsl:otherwise>
															</xsl:choose>
															<fo:block></fo:block>
															<xsl:text>在住の</xsl:text>
														</xsl:if>
													</xsl:when>
													<xsl:when test="$lang='zh'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
														<xsl:if test="./address//text()">
															<xsl:text> 住在</xsl:text>
														</xsl:if>
													</xsl:when>
													<xsl:when test="$lang='fr' or $lang='ru' or $lang='ko' or $lang='pt'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
													</xsl:when>
													<xsl:otherwise>
														<xsl:choose>
															<xsl:when test="./address//text()">
																<xsl:choose>
																	<xsl:when test="$lang = 'de'">
																		<xsl:call-template name="format_name">
																			<xsl:with-param name="name_arg" select="."></xsl:with-param>
																			<xsl:with-param name="showOf" select="1"></xsl:with-param>
																		</xsl:call-template>
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:call-template name="format_name">
																			<xsl:with-param name="name_arg" select="."></xsl:with-param>
																			<xsl:with-param name="showOf" select="1"></xsl:with-param>
																		</xsl:call-template>
																	</xsl:otherwise>
																</xsl:choose>
															</xsl:when>
															<xsl:otherwise>
																<xsl:call-template name="format_name">
																	<xsl:with-param name="name_arg" select="."></xsl:with-param>
																</xsl:call-template>
															</xsl:otherwise>
														</xsl:choose>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<!-- 2018.03.09 Transliteration address for Declaration (i) for non-latin language -->
								<xsl:if test="following-sibling::addressbook[position()=1][@lang='en']">
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:if test=".//address//text()">
															Address:
														</xsl:if>
													</xsl:when>
													<xsl:when test="$lang='ar'">
														<fo:table>
															<fo:table-column column-width="2mm"></fo:table-column>
															<fo:table-column column-width="24mm"></fo:table-column>
															<fo:table-column column-width="27mm"></fo:table-column>
															<fo:table-body>
																<fo:table-row>
																	<fo:table-cell text-align="left">
																		<fo:block>(</fo:block>
																	</fo:table-cell>
																	<fo:table-cell>
																		<fo:block>Name (LAST, First</fo:block>
																	</fo:table-cell>
																	<fo:table-cell>
																		<fo:block>:</fo:block>
																	</fo:table-cell>
																</fo:table-row>
															</fo:table-body>
														</fo:table>
													</xsl:when>
													<xsl:otherwise>
														Name (LAST, First):
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">
													<xsl:choose>
														<xsl:when test="$lang='ja'">
															<xsl:if test="$sibling//address//text()">
																<xsl:call-template name="showEnAddress">
																	<xsl:with-param name="address_arg" select="$sibling"></xsl:with-param>																	
																</xsl:call-template>
															</xsl:if>
														</xsl:when>
														<xsl:when test="$lang='zh' or $lang='ru' or $lang='ko' or $lang='ar'">
															<xsl:call-template name="format_name">
																<xsl:with-param name="name_arg" select="$sibling"></xsl:with-param>
															</xsl:call-template>
														</xsl:when>
													</xsl:choose>
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<fo:table-row>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											<xsl:choose>
												<xsl:when test="$lang='ja'">
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook"></xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:if test=".//address//text()">
														Endereço 
													</xsl:if>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:call-template name="format_name">
															<xsl:with-param name="name_arg" select="."></xsl:with-param>
														</xsl:call-template>
														<fo:block></fo:block>
													</xsl:when>
													<xsl:otherwise>
														<xsl:if test="./address//text()">
															<xsl:choose>
																<xsl:when test=".//address/country='US' or .//address/country='CA'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:when test="$lang='zh'">
																			<!-- US and CA address in Chinese Request Case-->
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select=".//state"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//city"></xsl:value-of>
																						<xsl:text> </xsl:text>
																						<xsl:value-of select=".//street"></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*">
																				<xsl:choose>
																					<xsl:when test="name(.)='city'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text>, </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='state'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='postcode'">
																						<xsl:value-of select="."></xsl:value-of>
																						<xsl:text> </xsl:text>
																					</xsl:when>
																					<xsl:when test="name(.)='country'">
																						<fo:block>
																							<xsl:call-template name="country_ChoiceText">
																								<xsl:with-param name="country" select="."></xsl:with-param>
																							</xsl:call-template>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">															
																									<xsl:value-of select="."></xsl:value-of>   
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='DE'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select="."></xsl:value-of>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">															
																								<xsl:value-of select="."></xsl:value-of>   
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</fo:block>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<!-- TODO: determine JA markup -->
																<xsl:when test=".//address/country='JP'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:when test="(.//address/state) or (.//address/city) or (.//address/street)">
																			<!-- Japanese address in Korean or Chinese Request Case-->
																			<xsl:choose>
																				<xsl:when test="$lang='ko'">
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																						</xsl:call-template>
																					</fo:block>
																					<fo:block>
																						<xsl:value-of select=".//postcode"></xsl:value-of>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"></xsl:value-of>
																								<xsl:if test=".//address-2">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-2"></xsl:value-of>
																								</xsl:if>
																								<xsl:if test=".//address-3">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-3"></xsl:value-of>
																								</xsl:if>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">															
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"></xsl:value-of>
																								<xsl:if test=".//address-2">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-2"></xsl:value-of>
																								</xsl:if>
																								<xsl:if test=".//address-3">
																									<xsl:text> </xsl:text>
																									<xsl:value-of select=".//address-3"></xsl:value-of>
																								</xsl:if>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																						</xsl:call-template>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">															
																								<xsl:value-of select=".//state"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"></xsl:value-of>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"></xsl:value-of>
																								<xsl:text> </xsl:text>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																					<fo:block>
																						<xsl:value-of select=".//postcode"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																					<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select=".//address-1"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='GB'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*">
																				<xsl:choose>
																					<xsl:when test="name(.)='postcode'">
																						<xsl:value-of select="."></xsl:value-of>
																					</xsl:when>
																					<xsl:when test="name(.)='city'">
																						<xsl:value-of select="."></xsl:value-of>
																					</xsl:when>
																					<xsl:when test="name(.)='country'">
																						<fo:block>
																							<xsl:call-template name="country_ChoiceText">
																								<xsl:with-param name="country" select="."></xsl:with-param>
																							</xsl:call-template>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select="."></xsl:value-of>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">															
																									<xsl:value-of select="."></xsl:value-of>   
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='KR'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select=".//state"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//city"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//street"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address-1"></xsl:value-of>
																							<xsl:if test=".//address-2">
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-2"></xsl:value-of>
																							</xsl:if>
																							<xsl:if test=".//address-3">
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-3"></xsl:value-of>
																							</xsl:if>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select=".//state"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//city"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//street"></xsl:value-of>
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address-1"></xsl:value-of>
																							<xsl:if test=".//address-2">
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-2"></xsl:value-of>
																							</xsl:if>
																							<xsl:if test=".//address-3">
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-3"></xsl:value-of>
																							</xsl:if>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='CN' or .//address/country='TW'">			
																	<xsl:choose>			
																		<xsl:when test=".//text">		
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>		
																		<xsl:when test="$lang='zh'"> <!-- for when the stylesheet does not use "showZhAddress" for Chinese address -->
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">	
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																				<xsl:value-of select=".//address/state"></xsl:value-of>
																					<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																			</fo:block>					
																		</xsl:when>
																		<xsl:when test="$lang='ru'">
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																				<xsl:value-of select=".//address/state"></xsl:value-of>
																				<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select=".//address/street"></xsl:value-of>
																						<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						<xsl:value-of select=".//address/address-3"></xsl:value-of>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:when test="$lang='ko'">
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																			</fo:block>
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:if test=".//address/state">   
																							<xsl:value-of select=".//address/state"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/city">
																							<xsl:value-of select=".//address/city"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/street">
																							<xsl:value-of select=".//address/street"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/address-1">
																							<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						</xsl:if>
																						<xsl:if test=".//address/address-2">
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						</xsl:if>
																						<xsl:if test=".//address/address-3">
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address/address-3"></xsl:value-of>
																						</xsl:if>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:if test=".//address/state">   
																							<xsl:value-of select=".//address/state"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/city">
																							<xsl:value-of select=".//address/city"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/street">
																							<xsl:value-of select=".//address/street"></xsl:value-of>
																							<xsl:text> </xsl:text>
																						</xsl:if>
																						<xsl:if test=".//address/address-1">
																							<xsl:value-of select=".//address/address-1"></xsl:value-of>
																						</xsl:if>
																						<xsl:if test=".//address/address-2">
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address/address-2"></xsl:value-of>
																						</xsl:if>
																						<xsl:if test=".//address/address-3">
																							<xsl:text> </xsl:text>
																							<xsl:value-of select=".//address/address-3"></xsl:value-of>
																						</xsl:if>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:when>
																		<xsl:otherwise>		
																			<xsl:for-each select=".//address/*[not(name(.)='street' or name(.)='city' or name(.)='state' or name(.)='postcode' or name(.)='country')]"> 	
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>		
																			<xsl:if test=".//address/street">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select=".//address/street"></xsl:value-of>	
																							<xsl:text> </xsl:text>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select=".//address/street"></xsl:value-of>	
																							<xsl:text> </xsl:text>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:if>
																			<xsl:choose>
																				<xsl:when test=".//address/city">
																					<fo:block>		
																						<xsl:value-of select=".//address/city"></xsl:value-of>
																						<xsl:text>, </xsl:text>	
																						<xsl:value-of select=".//address/state"></xsl:value-of>	
																						<xsl:text> </xsl:text>	
																						<xsl:value-of select=".//address/postcode"></xsl:value-of>	
																					</fo:block>		
																				</xsl:when>
																				<xsl:otherwise>		
																					<fo:block>		
																						<xsl:value-of select=".//address/state"></xsl:value-of>	
																						<xsl:text> </xsl:text>	
																						<xsl:value-of select=".//address/postcode"></xsl:value-of>	
																					</fo:block>		
																				</xsl:otherwise>			
																			</xsl:choose>
																			<fo:block>		
																				<xsl:call-template name="country_ChoiceText">	
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>	
																			</fo:block>		
																		</xsl:otherwise>			
																	</xsl:choose>				
																</xsl:when>	
																<!-- 202001 CN address not shown correctly
																<xsl:when test=".//address/country='CN' or .//address/country='TW'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."/>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:choose>
																				<xsl:when test="$lang='ko'">
																					<fo:block>
																						<xsl:call-template name="country_ChoiceText">
																							<xsl:with-param name="country" select=".//address/country"/>
																						</xsl:call-template>
																					</fo:block>
																					<fo:block>
																						<xsl:value-of select=".//postcode"/>
																					</fo:block>
																					<xsl:choose>
																						<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																							<fo:block white-space="pre" wrap-option="wrap">
																								<xsl:value-of select=".//state"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"/>
																							</fo:block>
																						</xsl:when>
																						<xsl:otherwise>
																							<fo:block white-space-collapse="false" wrap-option="wrap">															
																								<xsl:value-of select=".//state"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//city"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//street"/>
																								<xsl:text> </xsl:text>
																								<xsl:value-of select=".//address-1"/>
																							</fo:block>
																						</xsl:otherwise>
																					</xsl:choose>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block>
																						<xsl:choose>
																							<xsl:when test="$lang='zh'">
																								<xsl:variable name="country_name">
																									<xsl:call-template name="country_ChoiceText">
																										<xsl:with-param name="country" select=".//address/country"/>
																									</xsl:call-template>
																								</xsl:variable>
																								<xsl:value-of select="normalize-space($country_name)"></xsl:value-of>
																							</xsl:when>
																							<xsl:otherwise>
																								<xsl:call-template name="country_ChoiceText">
																									<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																								</xsl:call-template>
																							</xsl:otherwise>
																						</xsl:choose>
																						<xsl:value-of select=".//state"/>
																						<xsl:value-of select=".//city"/>
																					</fo:block>
																					<xsl:if test=".//street">
																						<xsl:choose>
																							<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																								<fo:block white-space="pre" wrap-option="wrap">
																									<xsl:value-of select=".//street"/>
																								</fo:block>
																							</xsl:when>
																							<xsl:otherwise>
																								<fo:block white-space-collapse="false" wrap-option="wrap">															
																									<xsl:value-of select=".//street"/>
																								</fo:block>
																							</xsl:otherwise>
																						</xsl:choose>
																					</xsl:if>
																					<fo:block>
																						<xsl:value-of select=".//postcode"/>
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when> !-->
																<xsl:when test=".//address/country='FR' or .//address/country='NL' or .//address/country='SE' or .//address/country='CH' or .//address/country='LI'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select="."></xsl:value-of>   
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//address/postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//address/city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//address/country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<xsl:when test=".//address/country='RU'">
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>   
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]"> 
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//city"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:when>
																<!-- for all others, use European format by default -->
																<xsl:otherwise>
																	<xsl:choose>
																		<xsl:when test=".//text">
																			<xsl:value-of select="."></xsl:value-of>
																		</xsl:when>
																		<xsl:otherwise>
																			<xsl:for-each select=".//address/*[not(name(.)='city' or name(.)='postcode' or name(.)='country')]">
																				<xsl:choose>
																					<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																						<fo:block white-space="pre" wrap-option="wrap">
																							<xsl:value-of select="."></xsl:value-of>
																						</fo:block>
																					</xsl:when>
																					<xsl:otherwise>
																						<fo:block white-space-collapse="false" wrap-option="wrap">															
																							<xsl:value-of select="."></xsl:value-of>   
																						</fo:block>
																					</xsl:otherwise>
																				</xsl:choose>
																			</xsl:for-each>
																			<fo:block>
																				<xsl:value-of select=".//postcode"></xsl:value-of>
																				<xsl:text> </xsl:text>
																				<xsl:value-of select=".//city"></xsl:value-of>
																			</fo:block>
																			<fo:block>
																				<xsl:call-template name="country_ChoiceText">
																					<xsl:with-param name="country" select=".//country"></xsl:with-param>
																				</xsl:call-template>
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise>
															</xsl:choose>
														</xsl:if>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<!-- 2018.03.09 Transliteration address for Declaration (i) for non-latin language -->
								<xsl:if test="following-sibling::addressbook[position()=1][@lang='en']">
									<fo:table-row>
										<fo:table-cell>
											<fo:block></fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														Name (LAST, First):
													</xsl:when>
													<xsl:otherwise>
														<xsl:if test=".//address//text()">
															Address:
														</xsl:if>
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">
													<xsl:choose>
														<xsl:when test="$lang='ja'">
															<xsl:call-template name="format_name">
																<xsl:with-param name="name_arg" select="$sibling"></xsl:with-param>
															</xsl:call-template>
															<fo:block></fo:block>
														</xsl:when>
														<xsl:otherwise>
															<xsl:if test="./address//text()">
																<xsl:call-template name="showEnAddress">
																	<xsl:with-param name="address_arg" select="$sibling"></xsl:with-param>																	
																</xsl:call-template>
															</xsl:if>
														</xsl:otherwise>
													</xsl:choose>
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<fo:table-row>
									<fo:table-cell>
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block>
											<fo:inline font-weight="bold">
												é o inventor do objecto  para o qual se procura protecção mediante este pedido internacional    
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:for-each>
						</xsl:otherwise>
					</xsl:choose>
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:for-each>
	</xsl:template>
	<xsl:template name="process_dec2">
		<xsl:variable name="dec_seq" select="@sequence"></xsl:variable>  
		<fo:table table-layout="fixed" border-collapse="separate">          
			<fo:table-column column-width="12mm"></fo:table-column>          
			<fo:table-column column-width="53mm"></fo:table-column>          
			<fo:table-column column-width="105mm"></fo:table-column> 
			<fo:table-body>               
				<fo:table-row>                  
					<fo:table-cell xsl:use-attribute-sets="tdTL">                     
						<fo:block>                        
							<fo:inline font-weight="bold">VIII-2-<xsl:value-of select="$dec_seq"></xsl:value-of>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTC">                     
						<fo:block>                        
							<fo:inline font-weight="bold">                           
								Declaração: Direito de pedir e obter uma patente                         
							</fo:inline>                        
							<fo:block></fo:block>                        
							Declaração relativa ao direito do requerente, na data do depósito internacional, de pedir e obter uma patente (Regras 4.17.ii) e 51bis.1.a)ii)) no caso de a declaração de acordo com a Regra 4.17. iv) não ser apropriada:                      
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTR">                     
						<fo:block padding-before="7mm">    
							<fo:inline font-weight="bold">                           
								Em relação ao 
								<xsl:choose>                              
									<xsl:when test=".//application-reference">                                 
										<xsl:if test="not($lang='ja')">
											pedido internacional número   
										</xsl:if>
										<xsl:value-of select=".//country"></xsl:value-of>                                 
										<xsl:text> 
										</xsl:text>                                 
										<xsl:value-of select=".//doc-number"></xsl:value-of>    
										<xsl:if test="$lang='ja'">
											pedido internacional número   
										</xsl:if>                          
									</xsl:when>                              
									<xsl:otherwise>
										este pedido internacional                               
									</xsl:otherwise>                           
								</xsl:choose>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>               
				<fo:table-row>                  
					<fo:table-cell>                     
						<fo:block></fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdC">                     
						<fo:block>                     
							<xsl:call-template name="nameType">                     
								<xsl:with-param name="nam" select="."></xsl:with-param>                     
							</xsl:call-template>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdR">                     
						<fo:block padding-top="1pt">                        
							<fo:inline font-weight="bold">           
								<xsl:if test="$lang='ja'">以下の事実により、      <fo:block></fo:block>                     
								</xsl:if>                
								<xsl:call-template name="format_name">                              
									<xsl:with-param name="name_arg" select="."></xsl:with-param>                           
								</xsl:call-template>
								<xsl:if test="$lang='ja'">
									<xsl:text>は、</xsl:text>                       
									<fo:block></fo:block> 
								</xsl:if>
								tem o direito de pedir e obter uma patente em virtude de:                         
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>    
			</fo:table-body>
		</fo:table>           
		<xsl:for-each select="./matter">                  
			<xsl:variable name="matter" select="translate(@item,'()','')"></xsl:variable>                  
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">          
				<fo:table-column column-width="12mm"></fo:table-column>          
				<fo:table-column column-width="53mm"></fo:table-column>          
				<fo:table-column column-width="105mm"></fo:table-column> 
				<fo:table-body>               
					<fo:table-row>                     
						<fo:table-cell xsl:use-attribute-sets="tdTL">                        
							<fo:block>VIII-2-<xsl:value-of select="$dec_seq"></xsl:value-of></fo:block>
							<fo:block>(<xsl:value-of select="$matter"></xsl:value-of>)</fo:block>                     
						</fo:table-cell>                     
						<fo:table-cell xsl:use-attribute-sets="tdTC">                        
							<fo:block></fo:block>                     
						</fo:table-cell>                     
						<fo:table-cell xsl:use-attribute-sets="tdTR">                        
							<fo:block padding-top="1pt"> 
								<fo:inline font-weight="bold">                        
									<xsl:call-template name="matter">                        
										<xsl:with-param name="matter" select="$matter"></xsl:with-param>                        
									</xsl:call-template>                           
								</fo:inline>                        
							</fo:block>                        
						</fo:table-cell>                  
					</fo:table-row>  
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>      
				</fo:table-body>
			</fo:table>
		</xsl:for-each>               
	</xsl:template>
	<xsl:template name="process_dec3">
		<xsl:variable name="dec_seq" select="@sequence"></xsl:variable>  
		<fo:table table-layout="fixed" border-collapse="separate">          
			<fo:table-column column-width="12mm"></fo:table-column>          
			<fo:table-column column-width="53mm"></fo:table-column>          
			<fo:table-column column-width="105mm"></fo:table-column> 
			<fo:table-body>               
				<fo:table-row>                  
					<fo:table-cell xsl:use-attribute-sets="tdTL">                     
						<fo:block>                        
							<fo:inline font-weight="bold">VIII-3-<xsl:value-of select="$dec_seq"></xsl:value-of>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTC">                     
						<fo:block>                        
							<fo:inline font-weight="bold">                           
								Declaração: Direito de reivindicar a prioridade                         
							</fo:inline>                        
							<fo:block></fo:block>                        
							Declaração relativa ao direito do requerente, na data do depósito internacional, de reivindicar a prioridade do pedido anterior especificado abaixo, no caso de o requerente não ser o requerente que depositou o pedido anterior, ou no caso de o nome do requerente ter mudado desde o depósito do pedido anterior (Regras 4.17.iii) e 51bis.1.a)iii)):                      
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTR">                     
						<fo:block padding-before="7mm">                        
							<fo:inline font-weight="bold">                           
								Em relação ao 
								<xsl:choose>                              
									<xsl:when test=".//application-reference">                                 
										<xsl:if test="not($lang='ja')">
											pedido internacional número   
										</xsl:if>
										<xsl:value-of select=".//country"></xsl:value-of>                                 
										<xsl:text> 
										</xsl:text>                                 
										<xsl:value-of select=".//doc-number"></xsl:value-of>    
										<xsl:if test="$lang='ja'">
											pedido internacional número   
										</xsl:if>                          
									</xsl:when>                              
									<xsl:otherwise>
										este pedido internacional                               
									</xsl:otherwise>                           
								</xsl:choose>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>               
				<fo:table-row>                  
					<fo:table-cell>                     
						<fo:block></fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdC">                     
						<fo:block>                     
							<xsl:choose>
								<xsl:when test="./name and not($lang='zh')">
									Nome 
								</xsl:when>
								<xsl:when test="./name and $lang='zh'">
									Nome (APELIDO, nome próprio) 
								</xsl:when>
								<xsl:otherwise>
									Nome (APELIDO, nome próprio) 
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdR">                     
						<fo:block padding-top="1pt">                        
							<fo:inline font-weight="bold">                           
								<xsl:if test="$lang='ja'">
									<xsl:text>以下の事実により、</xsl:text>                  
									<fo:block></fo:block>
								</xsl:if>
								<xsl:call-template name="format_name">                              
									<xsl:with-param name="name_arg" select="."></xsl:with-param>                           
								</xsl:call-template>                        
								<xsl:if test="$lang='ja'">
									<xsl:text>は、</xsl:text>
								</xsl:if>
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>               
				<fo:table-row>                  
					<fo:table-cell>                     
						<fo:block></fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdC">                     
						<fo:block></fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdR">                     
						<fo:block padding-top="1pt">                        
							<fo:inline font-weight="bold">                           
								tem o direito de reivindicar a prioridade do pedido anterior No.                            
								<xsl:value-of select=".//earlier-app-reference//country"></xsl:value-of>                           
								<xsl:text> </xsl:text>
								<xsl:value-of select=".//earlier-app-reference//doc-number"></xsl:value-of>                           
								em virtude de:                         
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>   
			</fo:table-body>
		</fo:table>            
		<xsl:for-each select="./matter">                  
			<xsl:variable name="matter" select="translate(@item,'()','')"></xsl:variable>                  
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">          
				<fo:table-column column-width="12mm"></fo:table-column>          
				<fo:table-column column-width="53mm"></fo:table-column>          
				<fo:table-column column-width="105mm"></fo:table-column> 
				<fo:table-body>               
					<fo:table-row>                     
						<fo:table-cell xsl:use-attribute-sets="tdTBL">                        
							<fo:block>VIII-3-<xsl:value-of select="$dec_seq"></xsl:value-of></fo:block>
							<fo:block>(<xsl:value-of select="$matter"></xsl:value-of>)</fo:block>                     
						</fo:table-cell>                     
						<fo:table-cell xsl:use-attribute-sets="tdTBC">                        
							<fo:block></fo:block>                     
						</fo:table-cell>                     
						<fo:table-cell xsl:use-attribute-sets="tdTBR">                        
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                        
									<xsl:call-template name="matter">                        
										<xsl:with-param name="matter" select="$matter"></xsl:with-param>                        
									</xsl:call-template>                           
								</fo:inline>                        
							</fo:block>   
						</fo:table-cell>                  
					</fo:table-row>           
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>      
				</fo:table-body>
			</fo:table>    
		</xsl:for-each>               
	</xsl:template>
	<xsl:template name="process_dec4">   
		<xsl:variable name="dec_seq" select="@sequence"></xsl:variable>
		<xsl:for-each select=".">      
			<fo:table table-layout="fixed" border-collapse="separate">          
				<fo:table-column column-width="12mm"></fo:table-column>          
				<fo:table-column column-width="53mm"></fo:table-column>          
				<fo:table-column column-width="105mm"></fo:table-column>         
				<fo:table-body>            
					<fo:table-row>               
						<fo:table-cell xsl:use-attribute-sets="tdTBL">                  
							<fo:block>                     
								<fo:inline font-weight="bold">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of></fo:inline>                  
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdTBC">                  
							<fo:block>                     
								<fo:inline font-weight="bold">                        
									Declaração: Autoria da invenção (apenas para os fins da designação dos Estados Unidos da América)                      
								</fo:inline>                     
								<fo:block></fo:block>                     
								Declaração de autoria da invenção (Regras 4.17.iv) e 51bis.1.a)iv)) para os fins da designação dos Estados Unidos da América                  
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdTBR">                  
							<fo:block padding="1.5pt" line-height="1.3" space-before="1cm">                     
								<fo:block></fo:block>                     
								<fo:block></fo:block>                     
								<fo:inline font-weight="bold">                        
									Declaro, por este meio, que creio ser o inventor original ou um co-inventor original de uma invenção reivindicada no pedido.                         
									<fo:block></fo:block>
									<fo:block space-after="2mm">
									</fo:block>
									<xsl:choose>
										<xsl:when test="./application-reference">
											Esta declaração refere-se ao pedido internacional No. <xsl:value-of select="./application-reference//doc-number"></xsl:value-of>(se a declaração for apresentada de acordo com a Regra 26ter). 
											<fo:block space-after="2mm">
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
												Esta declaração refere-se ao pedido internacional de que faz parte (se a declaração for apresentada com o pedido).  
												<fo:block space-after="2mm">
												</fo:block>                        
										</xsl:otherwise>
									</xsl:choose>
									<fo:block></fo:block>                        
									Declaro, por este meio, que o pedido internacional acima identificado foi feito ou autorizado por mim.                         
									<fo:block space-after="2mm">
									</fo:block>                        
									Reconheço, por este meio, que qualquer declaração falsa intencional feita por este meio é punível por multa ou prisão não superior a cinco (5) anos, ou ambas as coisas, de acordo com a Seção 1001 do Título 18 do Código dos Estados Unidos.                      
								</fo:inline>                  
							</fo:block>               
						</fo:table-cell>            
					</fo:table-row>            
				</fo:table-body>      
			</fo:table>     
		</xsl:for-each>  
		<xsl:if test=".//inventor-info/addressbook">               
			<fo:table table-layout="fixed" keep-together.within-page="always" border-collapse="separate">          
				<fo:table-column column-width="12mm"></fo:table-column>          
				<fo:table-column column-width="53mm"></fo:table-column>          
				<fo:table-column column-width="105mm"></fo:table-column> 
				<fo:table-body>            
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- 1-1</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC">                     
							<fo:block>                     
								<xsl:call-template name="nameType">                     
									<xsl:with-param name="nam" select=".//inventor-info[1]/addressbook[1]"></xsl:with-param>                     
								</xsl:call-template>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:call-template name="format_name">                              
										<xsl:with-param name="name_arg" select=".//inventor-info[1]/addressbook[1]"></xsl:with-param>                           
									</xsl:call-template>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:if test=".//inventor-info[1]/addressbook[2]">  
						<xsl:if test=".//inventor-info[1]/addressbook[@lang='en']">  
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">                     
									<fo:block></fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdC">                     
									<fo:block>
										Name (LAST, First):
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdR">                     
									<fo:block padding-top="1pt">                        
										<fo:inline font-weight="bold">                           
											<xsl:call-template name="format_name">                              
												<xsl:with-param name="name_arg" select=".//inventor-info[1]/addressbook[2]"></xsl:with-param>                           
											</xsl:call-template>                        
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>               
							</fo:table-row>   
						</xsl:if>  
					</xsl:if>  
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL">                     
							<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- 1-2</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC">                     
							<fo:block>                        
								Domicílio:                        
								<fo:block></fo:block>                        
								(cidade e Estado dos Estados Unidos da América, se for caso disso, ou país)                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select=".//inventor-info[1]/us-residence//city"></xsl:value-of>                           
									<xsl:text>, </xsl:text>                           
									<xsl:choose>                              
										<xsl:when test=".//inventor-info[1]/us-residence/us/state">                                 
											<xsl:value-of select=".//inventor-info[1]/us-residence//state"></xsl:value-of>                              
										</xsl:when>                              
										<xsl:otherwise>
											<xsl:call-template name="country_ChoiceText">
												<xsl:with-param name="country" select=".//inventor-info[1]/us-residence//country"></xsl:with-param>
											</xsl:call-template>                              
										</xsl:otherwise>                           
									</xsl:choose>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:choose>                  
						<xsl:when test=".//inventor-info[1]/addressbook[1]/address">                     
							<fo:table-row>                        
								<fo:table-cell xsl:use-attribute-sets="tdL">                           
									<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- 1-3</fo:block>                        
								</fo:table-cell>                        
								<fo:table-cell xsl:use-attribute-sets="tdC">                           
									<fo:block>                              
										Endereço postal:                           
									</fo:block>                        
								</fo:table-cell>                        
								<fo:table-cell xsl:use-attribute-sets="tdR">                           
									<fo:block padding-top="1pt">                              
										<fo:inline font-weight="bold">        
											<xsl:choose>
												<xsl:when test="($lang='ja') or ($lang='zh')">
													<xsl:if test=".//inventor-info[1]/addressbook[1]/address/country">
														<fo:block>
															<xsl:call-template name="country_ChoiceText">
																<xsl:with-param name="country" select=".//inventor-info[1]/addressbook[1]/address/country"></xsl:with-param>
															</xsl:call-template>
														</fo:block>
													</xsl:if>
													<xsl:if test=".//inventor-info[1]/addressbook[1]/address/state">
														<fo:block>
															<xsl:value-of select=".//inventor-info[1]/addressbook[1]/address/state"></xsl:value-of>
														</fo:block>
													</xsl:if>
													<xsl:for-each select=".//inventor-info[1]/addressbook[1]/address//*[not(name(.)='country' or name(.)='state')]">
														<xsl:choose>
															<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																<fo:block white-space="pre" wrap-option="wrap">
																	<xsl:value-of select="."></xsl:value-of>
																</fo:block>
															</xsl:when>
															<xsl:otherwise>
																<fo:block white-space-collapse="false" wrap-option="wrap">															
																	<xsl:value-of select="."></xsl:value-of>   
																</fo:block>
															</xsl:otherwise>
														</xsl:choose>
													</xsl:for-each>
												</xsl:when>
												<xsl:otherwise>
													<xsl:for-each select=".//inventor-info[1]/addressbook[1]/address/*">                                    
														<xsl:choose>                                       
															<xsl:when test="name(.)='city' or name(.)='state'">                                          
																<xsl:value-of select="."></xsl:value-of>                                          
																<xsl:text> </xsl:text>                                       
															</xsl:when> 
															<xsl:when test="name(.)='country'">
																<xsl:call-template name="country_ChoiceText">
																	<xsl:with-param name="country" select="."></xsl:with-param>
																</xsl:call-template> 
															</xsl:when>                                       
															<xsl:otherwise>                                          
																<xsl:choose>
																	<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																		<fo:block white-space="pre" wrap-option="wrap">
																			<xsl:value-of select="."></xsl:value-of>
																		</fo:block>
																	</xsl:when>
																	<xsl:otherwise>
																		<fo:block white-space-collapse="false" wrap-option="wrap">															
																			<xsl:value-of select="."></xsl:value-of>   
																		</fo:block>
																	</xsl:otherwise>
																</xsl:choose>
																<fo:block></fo:block>                                       
															</xsl:otherwise>                                    
														</xsl:choose>                                 
													</xsl:for-each>                              
												</xsl:otherwise>
											</xsl:choose>                         
										</fo:inline>                           
									</fo:block>                        
								</fo:table-cell>                     
							</fo:table-row>                  
							<xsl:if test=".//inventor-info[1]/addressbook[2]">  
								<xsl:if test=".//inventor-info[1]/addressbook[@lang='en']">  
									<fo:table-row>                        
										<fo:table-cell xsl:use-attribute-sets="tdL">                           
											<fo:block></fo:block>                        
										</fo:table-cell>                        
										<fo:table-cell xsl:use-attribute-sets="tdC">                           
											<fo:block>                              
												Mailing Address:                           
											</fo:block>                        
										</fo:table-cell>                        
										<fo:table-cell xsl:use-attribute-sets="tdR">                           
											<fo:block padding-top="1pt">                              
												<fo:inline font-weight="bold">        
													<xsl:choose>
														<xsl:when test="$lang='ja'">
															<xsl:for-each select=".//inventor-info[1]/addressbook[2]/address//*[not(name(.)='country' or name(.)='state')]">
															<xsl:choose>
																<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																	<fo:block white-space="pre" wrap-option="wrap">
																		<xsl:value-of select="."></xsl:value-of>
																	</fo:block>
																</xsl:when>
																<xsl:otherwise>
																	<fo:block white-space-collapse="false" wrap-option="wrap">															
																		<xsl:value-of select="."></xsl:value-of>   
																	</fo:block>
																</xsl:otherwise>
															</xsl:choose>
															</xsl:for-each>
															<xsl:if test=".//inventor-info[1]/addressbook[2]/address/state">
																<fo:block>
																	<xsl:value-of select=".//inventor-info[1]/addressbook[2]/address/state"></xsl:value-of>
																</fo:block>
															</xsl:if>
															<xsl:if test=".//inventor-info[1]/addressbook[2]/address/country">
																<fo:block>
																	<xsl:call-template name="enCountry_ChoiceText">
																		<xsl:with-param name="country" select=".//inventor-info[1]/addressbook[2]/address/country"></xsl:with-param>
																	</xsl:call-template>
																</fo:block>
															</xsl:if>
														</xsl:when>
														<xsl:otherwise>
															<xsl:for-each select=".//inventor-info[1]/addressbook[2]/address/*">                                    
																<xsl:choose>                                       
																	<xsl:when test="name(.)='city' or name(.)='state'">                                          
																		<xsl:value-of select="."></xsl:value-of>                                          
																	<xsl:text> </xsl:text>                                       
																	</xsl:when> 
																	<xsl:when test="name(.)='country'">
																		<xsl:call-template name="enCountry_ChoiceText">
																			<xsl:with-param name="country" select="."></xsl:with-param>
																		</xsl:call-template> 
																	</xsl:when>                                       
																	<xsl:otherwise>                                          
																		<xsl:choose>
																			<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																				<fo:block white-space="pre" wrap-option="wrap">
																					<xsl:value-of select="."></xsl:value-of>
																				</fo:block>
																			</xsl:when>
																			<xsl:otherwise>
																				<fo:block white-space-collapse="false" wrap-option="wrap">															
																					<xsl:value-of select="."></xsl:value-of>   
																				</fo:block>
																			</xsl:otherwise>
																		</xsl:choose>
																		<fo:block></fo:block>                                       
																	</xsl:otherwise>                                    
																</xsl:choose>                                 
															</xsl:for-each>                              
														</xsl:otherwise>
													</xsl:choose>                         
												</fo:inline>                           
											</fo:block>                        
										</fo:table-cell>                     
									</fo:table-row>                  
								</xsl:if>  
							</xsl:if>  
						</xsl:when>               
					</xsl:choose>         
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL">                     
							<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- 1-4</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC">                     
							<fo:block>                        
								Assinatura do inventor:                        
								<fo:block></fo:block>                        
								(A assinatura deve ser a do inventor e não a do mandatário)                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:choose>                              
										<xsl:when test=".//signatory[1]/electronic-signature/basic-signature/fax-image"> 
											<fo:external-graphic>
												<xsl:if test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
													<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>											
													<xsl:attribute name="width">100mm</xsl:attribute>											
												</xsl:if>										
												<!-- NOTE: XEP will not load files in same directory if 'file:///' is prepended -->
												<xsl:attribute name="src">   
													<xsl:choose>  
														<xsl:when test="contains(.//signatory[1]/electronic-signature/basic-signature/fax-image/@file,'/') or contains(./electronic-signature/basic-signature/fax-image/@file,'\') or contains(./electronic-signature/basic-signature/fax-image/@file,':')"> 
															<xsl:value-of select="concat('file:///',./electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
														</xsl:when>  
														<xsl:otherwise> 
															<xsl:choose>
																<xsl:when test="$baseDir != ''"> 
																	<xsl:value-of select="concat('file:///', $baseDir, .//signatory[1]/electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
																</xsl:when>
																<xsl:otherwise>
																	<xsl:value-of select=".//signatory[1]/electronic-signature/basic-signature/fax-image/@file"></xsl:value-of>
																</xsl:otherwise>
															</xsl:choose> 
														</xsl:otherwise>   
													</xsl:choose>
												</xsl:attribute> 
											</fo:external-graphic>                              
										</xsl:when>                              
										<xsl:when test=".//signatory[1]/electronic-signature/basic-signature/click-wrap">                                 
											(Requerente clicou "Sim")                               
										</xsl:when>                              
										<xsl:when test=".//signatory[1]//text-string">                                 
											<xsl:value-of select=".//signatory[1]//text-string"></xsl:value-of>                              
										</xsl:when>                              
										<xsl:when test=".//signatory[1]//pkcs7">                                 
											(PKCS7 Assinatura Digital)                               
										</xsl:when>                           
									</xsl:choose>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdBL">                     
							<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- 1-5</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBC">                     
							<fo:block>                        
								Data:                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:if test=".//signatory[1]/electronic-signature/@date">                              
										<xsl:call-template name="format_date">                                 
											<xsl:with-param name="date" select=".//signatory[1]/electronic-signature/@date"></xsl:with-param>                              
											<xsl:with-param name="show_date" select="1"></xsl:with-param>   
											<xsl:with-param name="text" select="1"></xsl:with-param>   
											<xsl:with-param name="lang" select="$lang"></xsl:with-param>   
											<xsl:with-param name="date_too" select="1"></xsl:with-param>
										</xsl:call-template>                           
									</xsl:if>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>  	  
				</fo:table-body>  
			</fo:table>  
		</xsl:if> 
		<xsl:if test="count(//inventor-info) &gt; 1"> 
			<xsl:call-template name="other_inventors">
				<xsl:with-param name="signatory_seq" select="ancestor-or-self::inventorship/@sequence"></xsl:with-param>
			</xsl:call-template>
		</xsl:if>   
	</xsl:template><xsl:template name="other_inventors">      
		<!-- ****************************************************************** -->
		 
		<!--  repeated inventor-info                                            -->
		
		<!-- ****************************************************************** -->
		<xsl:param name="signatory_seq"></xsl:param>
		<xsl:variable name="dec_seq" select="@sequence"></xsl:variable>
		<xsl:if test=".//inventor-info[position() &gt; 1]/addressbook">   
			<xsl:for-each select=".//inventor-info[position() &gt; 1]">  
				<xsl:variable name="inventor_seq" select="position()+1"></xsl:variable> 
				<fo:table table-layout="fixed" keep-together.within-page="always" border-collapse="separate"> 
					<fo:table-column column-width="12mm"></fo:table-column> 
					<fo:table-column column-width="53mm"></fo:table-column> 
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- <xsl:value-of select="$inventor_seq"></xsl:value-of>-1</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC">                        
								<fo:block>                     
									<xsl:call-template name="nameType">                     
										<xsl:with-param name="nam" select="./addressbook[1]"></xsl:with-param>                     
									</xsl:call-template>                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                              
										<xsl:call-template name="format_name">                                 
											<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>                              
										</xsl:call-template>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>                  
						<xsl:if test="./addressbook[2]">  
							<xsl:if test="./addressbook[@lang='en']">  
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">                     
										<fo:block></fo:block>                  
									</fo:table-cell>                  
									<fo:table-cell xsl:use-attribute-sets="tdC">                     
										<fo:block>
											Name (LAST, First):
										</fo:block>                  
									</fo:table-cell>                  
									<fo:table-cell xsl:use-attribute-sets="tdR">                     
										<fo:block padding-top="1pt">                        
											<fo:inline font-weight="bold">                           
												<xsl:call-template name="format_name">                              
													<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>                           
												</xsl:call-template>                        
											</fo:inline>                     
										</fo:block>                  
									</fo:table-cell>               
								</fo:table-row>   
							</xsl:if>  
						</xsl:if>  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdL">                        
								<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- <xsl:value-of select="$inventor_seq"></xsl:value-of>-2</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdC">                        
								<fo:block>                           
									Domicílio:                           
									<fo:block></fo:block>                           
									(cidade e Estado dos Estados Unidos da América, se for caso disso, ou país)                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                              
										<xsl:value-of select=".//us-residence//city"></xsl:value-of>                              
										<xsl:if test=".//us-residence//city/text()">                              
											<xsl:text>, </xsl:text>                          
										</xsl:if>                              
										<xsl:choose>                                 
											<xsl:when test=".//us-residence/us">                                    
												<xsl:value-of select=".//us-residence//state"></xsl:value-of>                                 
											</xsl:when>                                 
											<xsl:otherwise>                                    
												<xsl:call-template name="country_ChoiceText">
													<xsl:with-param name="country" select=".//us-residence//country"></xsl:with-param>                                    
												</xsl:call-template>       
											</xsl:otherwise>                              
										</xsl:choose>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>                  
						<xsl:choose>                     
							<xsl:when test=".//addressbook/address">                        
								<fo:table-row>                           
									<fo:table-cell xsl:use-attribute-sets="tdL">                              
										<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- <xsl:value-of select="$inventor_seq"></xsl:value-of>-3</fo:block>                           
									</fo:table-cell>                           
									<fo:table-cell xsl:use-attribute-sets="tdC">                              
										<fo:block>                                 
											Endereço postal:                              
										</fo:block>                           
									</fo:table-cell>                           
									<fo:table-cell xsl:use-attribute-sets="tdR">                              
										<fo:block padding-top="1pt">                                 
											<fo:inline font-weight="bold">                                    
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:if test=".//addressbook[1]/address/country">
															<fo:block>
																<xsl:call-template name="country_ChoiceText">
																	<xsl:with-param name="country" select=".//addressbook[1]/address/country"></xsl:with-param>
																</xsl:call-template>
															</fo:block>
														</xsl:if>
														<xsl:if test=".//addressbook[1]/address/state">
															<fo:block>
																<xsl:value-of select=".//addressbook[1]/address/state"></xsl:value-of>
															</fo:block>
														</xsl:if>
														<xsl:for-each select=".//addressbook[1]/address//*[not(name(.)='country' or name(.)='state')]">
															<xsl:choose>
																<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																	<fo:block white-space="pre" wrap-option="wrap">
																		<xsl:value-of select="."></xsl:value-of>
																	</fo:block>
																</xsl:when>
																<xsl:otherwise>
																	<fo:block white-space-collapse="false" wrap-option="wrap">															
																		<xsl:value-of select="."></xsl:value-of>   
																	</fo:block>
																</xsl:otherwise>
															</xsl:choose>
														</xsl:for-each>
													</xsl:when>
													<xsl:otherwise>
														<xsl:for-each select=".//addressbook[1]/address/*">   
															<xsl:choose>                                          
																<xsl:when test="name(.)='city' or name(.)='state'">                                             
																	<xsl:value-of select="."></xsl:value-of>                                             
																	<xsl:text> </xsl:text>                                       
																</xsl:when>  
																<xsl:when test="name(.)='country'">
																	<xsl:call-template name="country_ChoiceText">
																		<xsl:with-param name="country" select="."></xsl:with-param>
																	</xsl:call-template>  
																</xsl:when>                                          
																<xsl:otherwise>                                             
																	<xsl:choose>
																		<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select="."></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:otherwise>
																			<fo:block white-space-collapse="false" wrap-option="wrap">															
																				<xsl:value-of select="."></xsl:value-of>   
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																	<fo:block></fo:block>                                          
																</xsl:otherwise>                                       
															</xsl:choose>                                    
														</xsl:for-each>                                 
													</xsl:otherwise>
												</xsl:choose>                                    
											</fo:inline>                              
										</fo:block>                           
									</fo:table-cell>                        
								</fo:table-row>                     
								<xsl:if test="./addressbook[2]">  
									<xsl:if test="./addressbook[@lang='en']">  
										<fo:table-row>                        
											<fo:table-cell xsl:use-attribute-sets="tdL">                           
												<fo:block></fo:block>                        
											</fo:table-cell>                        
											<fo:table-cell xsl:use-attribute-sets="tdC">                           
												<fo:block>                              
													Mailing Address:                           
												</fo:block>                        
											</fo:table-cell>                        
											<fo:table-cell xsl:use-attribute-sets="tdR">                           
												<fo:block padding-top="1pt">                              
													<fo:inline font-weight="bold">        
														<xsl:choose>
															<xsl:when test="$lang='ja'">
																<xsl:for-each select="./addressbook[2]/address//*[not(name(.)='country' or name(.)='state')]">
																	<xsl:choose>
																		<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select="."></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:otherwise>
																			<fo:block white-space-collapse="false" wrap-option="wrap">															
																				<xsl:value-of select="."></xsl:value-of>   
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:for-each>
																<xsl:if test="./addressbook[2]/address/state">
																	<fo:block>
																		<xsl:value-of select="./addressbook[2]/address/state"></xsl:value-of>
																	</fo:block>
																</xsl:if>
																<xsl:if test="./addressbook[2]/address/country">
																	<fo:block>
																		<xsl:call-template name="enCountry_ChoiceText">
																			<xsl:with-param name="country" select="./addressbook[2]/address/country"></xsl:with-param>
																		</xsl:call-template>
																	</fo:block>
																</xsl:if>
															</xsl:when>
															<xsl:otherwise>
																<xsl:for-each select="./addressbook[2]/address/*">                                    
																	<xsl:choose>                                       
																		<xsl:when test="name(.)='city' or name(.)='state'">                                          
																			<xsl:value-of select="."></xsl:value-of>                                          
																			<xsl:text> </xsl:text>                                       
																		</xsl:when> 
																		<xsl:when test="name(.)='country'">
																			<xsl:call-template name="enCountry_ChoiceText">
																				<xsl:with-param name="country" select="."></xsl:with-param>
																			</xsl:call-template> 
																		</xsl:when>                                       
																		<xsl:otherwise>                                          
																			<xsl:choose>
																				<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																					<fo:block white-space="pre" wrap-option="wrap">
																						<xsl:value-of select="."></xsl:value-of>
																					</fo:block>
																				</xsl:when>
																				<xsl:otherwise>
																					<fo:block white-space-collapse="false" wrap-option="wrap">															
																						<xsl:value-of select="."></xsl:value-of>   
																					</fo:block>
																				</xsl:otherwise>
																			</xsl:choose>
																			<fo:block></fo:block>                                       
																		</xsl:otherwise>                                    
																	</xsl:choose>                                 
																</xsl:for-each>                              
															</xsl:otherwise>
														</xsl:choose>                         
													</fo:inline>                           
												</fo:block>                        
											</fo:table-cell>                     
										</fo:table-row>                  
									</xsl:if>  
								</xsl:if>  
							</xsl:when>                  
						</xsl:choose>                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdL">                        
								<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- <xsl:value-of select="$inventor_seq"></xsl:value-of>-4</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdC">                        
								<fo:block>                           
									Assinatura do inventor:                           
									<fo:block></fo:block>                           
									(A assinatura deve ser a do inventor e não a do mandatário)                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                              
										<xsl:choose>                                 
											<xsl:when test="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image"> 
												<fo:external-graphic>
													<xsl:if test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
														<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>											
														<xsl:attribute name="width">100mm</xsl:attribute>											
													</xsl:if>										
													<!-- NOTE: XEP will not load files in same directory if 'file:///' is prepended -->
													<xsl:attribute name="src">   
														<xsl:choose>  
															<xsl:when test="contains(ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file,'/') or contains(ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file,'\') or contains(ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file,':')"> 
																<xsl:value-of select="concat('file:///',ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
															</xsl:when>  
															<xsl:otherwise> 
																<xsl:choose>
																	<xsl:when test="$baseDir != ''"> 
																		<xsl:value-of select="concat('file:///', $baseDir, ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
																	</xsl:when>
																	<xsl:otherwise>
																		<xsl:value-of select="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/fax-image/@file"></xsl:value-of>
																	</xsl:otherwise>
																</xsl:choose>
															</xsl:otherwise>   
														</xsl:choose>
													</xsl:attribute> 
												</fo:external-graphic>                                 
											</xsl:when>                                 
											<xsl:when test="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/click-wrap">                                    
												(Requerente clicou "Sim")                                  
											</xsl:when>                                 
											<xsl:when test="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/basic-signature/text-string">                                    
												<xsl:value-of select="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]//text-string"></xsl:value-of>                                 
											</xsl:when>                                 
											<xsl:when test="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature//pkcs7">                                    
												(PKCS7 Assinatura Digital)                                  
											</xsl:when>                              
										</xsl:choose>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdBL">                        
								<fo:block wrap-option="wrap">VIII-4-<xsl:value-of select="$dec_seq"></xsl:value-of>- <xsl:value-of select="$inventor_seq"></xsl:value-of>-5</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdBC">                        
								<fo:block>                           
									Data:                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdBR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                  
										<xsl:if test="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/@date">                                 
											<xsl:call-template name="format_date">                                 
												<xsl:with-param name="date" select="ancestor-or-self::inventorship[$signatory_seq]//signatory[$inventor_seq]/electronic-signature/@date"></xsl:with-param>                                 
												<xsl:with-param name="show_date" select="1"></xsl:with-param>   
												<xsl:with-param name="text" select="1"></xsl:with-param>   
												<xsl:with-param name="lang" select="$lang"></xsl:with-param>   
												<xsl:with-param name="date_too" select="1"></xsl:with-param>
											</xsl:call-template>                           
										</xsl:if>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>
					</fo:table-body> 
				</fo:table>         
			</xsl:for-each>      
		</xsl:if>   
	</xsl:template>
	<xsl:template name="process_dec5">
		<xsl:variable name="lack_seq" select="@sequence"></xsl:variable>
		<fo:table table-layout="fixed" border-collapse="separate">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
						<xsl:element name="fo:block">
							<fo:inline font-weight="bold">VIII-5-<xsl:value-of select="$lack_seq"></xsl:value-of>
							</fo:inline>
						</xsl:element>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Declaração: Divulgações não prejudiciais ou excepções à falta de novidade 
							</fo:inline>
							<fo:block></fo:block>
							Declaração relativa a divulgações não prejudiciais ou excepções à falta de novidade (Regras 4.17.v) e 51bis.1.a)v)): 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block padding-before="9mm">
							<fo:inline font-weight="bold">
								Em relação ao 
								<xsl:choose>
									<xsl:when test=".//application-reference">
										<xsl:if test="not($lang='ja')">
											pedido internacional número 
										</xsl:if>
										<xsl:value-of select=".//country"></xsl:value-of>
										<xsl:text>
										</xsl:text>
										<xsl:value-of select=".//doc-number"></xsl:value-of>
										<xsl:if test="$lang='ja'">
											pedido internacional número 
										</xsl:if>
									</xsl:when>
									<xsl:otherwise>
										este pedido internacional 
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell>
						<fo:block></fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>
							<xsl:call-template name="nameType">
								<xsl:with-param name="nam" select="."></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:call-template name="format_name">
									<xsl:with-param name="name_arg" select="."></xsl:with-param>
								</xsl:call-template>
							</fo:inline>
						</fo:block>
						<fo:block>
							<fo:inline font-weight="bold">
								declara que o objecto reivindicado neste pedido internacional foi divulgado da seguinte maneira: 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:for-each select=".//method-of-disclosure">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>VIII-5-<xsl:value-of select="$lack_seq"></xsl:value-of></fo:block>
							<fo:block>(i)</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Tipo de divulgação: 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test="./international-exhibition/text()">
											<xsl:value-of select="./international-exhibition"></xsl:value-of>
										</xsl:when>
										<xsl:when test="./international-exhibition">
											Exposição internacional 
										</xsl:when>
										<xsl:when test="./publication/text()">
											<xsl:value-of select="./publication"></xsl:value-of>
										</xsl:when>
										<xsl:when test="./publication">
											Publicação 
										</xsl:when>
										<xsl:when test="./abuse/text()">
											<xsl:value-of select="./abuse"></xsl:value-of>
										</xsl:when>
										<xsl:when test="./abuse">
											Utilização abusiva 
										</xsl:when>
										<xsl:when test="./other">
											outra coisa: 
											<xsl:value-of select="./other"></xsl:value-of>
										</xsl:when>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>VIII-5-<xsl:value-of select="$lack_seq"></xsl:value-of></fo:block>
							<fo:block>(ii)</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Data da divulgação: 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="preceding-sibling::date[1]"></xsl:with-param>
										<xsl:with-param name="lang" select="$lang"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>VIII-5-<xsl:value-of select="$lack_seq"></xsl:value-of></fo:block>
							<fo:block>(iii)</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Título da divulgação: 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:value-of select="preceding-sibling::title-of-disclosure[1]"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>VIII-5-<xsl:value-of select="$lack_seq"></xsl:value-of></fo:block>
							<fo:block>(iv)</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Lugar da divulgação: 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test="not($lang='ja')">
											<xsl:choose>
												<xsl:when test="name(.)='city' or name(.)='state'">
													<xsl:value-of select="."></xsl:value-of>
													<xsl:text> 
													</xsl:text>
												</xsl:when>
												<xsl:when test="name(.)='country'">
													<xsl:call-template name="country_ChoiceText">
														<xsl:with-param name="country" select="."></xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
				                                    <xsl:value-of select="following-sibling::address[1]/text"></xsl:value-of>
													<fo:block></fo:block>
												</xsl:otherwise>
											</xsl:choose>
										</xsl:when>
										<xsl:when test="$lang='ja' and (following-sibling::*[1][name()='address'] or contains($software_name,'SAFE'))">
											<xsl:value-of select="following-sibling::address[1]/text"></xsl:value-of>
										</xsl:when>
										<!-- JA address precedes other elements and uses <text> instead of subelements -->
										<xsl:otherwise>
											<xsl:value-of select="preceding-sibling::address[1]/text"></xsl:value-of>
										</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:for-each>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template name="signatory">
		<xsl:param name="sig_seq"></xsl:param>
		<xsl:param name="sig_type"></xsl:param>
		<xsl:param name="box"></xsl:param>
		<fo:table table-layout="fixed" keep-together.within-page="always">  
			<fo:table-column column-width="12mm"></fo:table-column>  
			<fo:table-column column-width="53mm"></fo:table-column>  
			<fo:table-column column-width="105mm"></fo:table-column>  
			<fo:table-body>		
				<fo:table-row>                  
					<fo:table-cell xsl:use-attribute-sets="tdTL">                     
						<fo:block>                        
							<fo:inline font-weight="bold">
								<xsl:value-of select="$box"></xsl:value-of>-<xsl:value-of select="$sig_seq"></xsl:value-of>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTC">                     
						<fo:block space-after="11mm">                        
							<fo:inline font-weight="bold">     
								<xsl:choose>
									<xsl:when test="$sig_type='applicant'">
										Assinatura do requerente 
									</xsl:when>
									<xsl:otherwise>
										Assinatura do requerente, do mandatário ou do representante comun   
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdTR">                     
						<fo:block>                        
							<fo:inline font-weight="bold">                           
								<xsl:choose>                              
									<xsl:when test="./electronic-signature/basic-signature/fax-image">                                 
										<fo:external-graphic>
											<xsl:if test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
												<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>											
												<xsl:attribute name="width">100mm</xsl:attribute>											
											</xsl:if>										
											<xsl:attribute name="src">   
												<xsl:choose>  
													<xsl:when test="contains(./electronic-signature/basic-signature/fax-image/@file,'/') or contains(./electronic-signature/basic-signature/fax-image/@file,'\') or contains(.//signatory[1]/electronic-signature/basic-signature/fax-image/@file,':')"> 
														<xsl:value-of select="concat('file:///',./electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
													</xsl:when>  
													<xsl:otherwise> 
														<xsl:choose>
															<xsl:when test="$baseDir != ''"> 
																<xsl:value-of select="concat('file:///', $baseDir, ./electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
															</xsl:when>
															<xsl:otherwise>													
																<xsl:value-of select="./electronic-signature/basic-signature/fax-image/@file"></xsl:value-of>  
															</xsl:otherwise>   
														</xsl:choose>
													</xsl:otherwise>   
												</xsl:choose>
											</xsl:attribute>
										</fo:external-graphic>                              
									</xsl:when>                              
									<xsl:when test="./electronic-signature/basic-signature/click-wrap">                                 
										(Requerente clicou "Sim") 
									</xsl:when>                              
									<xsl:when test="./electronic-signature/basic-signature/text-string">                                 
										<xsl:value-of select=".//text-string"></xsl:value-of>
									</xsl:when>                              
									<xsl:when test=".//pkcs7">                                 
										(PKCS7 Assinatura Digital) 
									</xsl:when>                           
								</xsl:choose>                        
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>               
				<xsl:choose>
					<xsl:when test="./name[@name-type='legal']">
						<fo:table-row>                  
							<fo:table-cell xsl:use-attribute-sets="tdL">                     
								<fo:block>                        
									<fo:inline font-weight="bold">
										<xsl:value-of select="$box"></xsl:value-of>-<xsl:value-of select="$sig_seq"></xsl:value-of>-1</fo:inline>                     
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>                     
									Nome 
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdR">                     
								<fo:block>                        
									<fo:inline font-weight="bold">                           
										<xsl:call-template name="format_name">                              
											<xsl:with-param name="name_arg" select="."></xsl:with-param>                           
										</xsl:call-template>                        
									</fo:inline>                     
								</fo:block>                  
							</fo:table-cell>               
						</fo:table-row>           
					</xsl:when>
					<xsl:otherwise>
						<fo:table-row>                  
							<fo:table-cell xsl:use-attribute-sets="tdL">                     
								<fo:block>                        
									<fo:inline font-weight="bold">
										<xsl:value-of select="$box"></xsl:value-of>-<xsl:value-of select="$sig_seq"></xsl:value-of>-1</fo:inline>                     
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>                     
									Nome (APELIDO, nome próprio) 
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdR">                     
								<fo:block>                        
									<fo:inline font-weight="bold">                           
										<xsl:call-template name="format_name">                              
											<xsl:with-param name="name_arg" select="."></xsl:with-param>                           
										</xsl:call-template>                        
									</fo:inline>                     
								</fo:block>                  
							</fo:table-cell>               
						</fo:table-row>           
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test="./name[@name-type='legal']">
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">
									<xsl:value-of select="$box"></xsl:value-of>-<xsl:value-of select="$sig_seq"></xsl:value-of>-2</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC">                     
							<fo:block>         
								Nome de quem assina 
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select="substring-after(./signatory-capacity,'|')"></xsl:value-of>
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>            
				</xsl:if>
				<fo:table-row>                  
					<fo:table-cell xsl:use-attribute-sets="tdBL">                     
						<fo:block>                        
							<fo:inline font-weight="bold">
								<xsl:value-of select="$box"></xsl:value-of>-<xsl:value-of select="$sig_seq"></xsl:value-of>-3</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdBC">                     
						<fo:block>         
							Qualidade (se tal qualidade não for evidente para quem ler o requerimento)
						</fo:block>                  
					</fo:table-cell>                  
					<fo:table-cell xsl:use-attribute-sets="tdBR">                     
						<fo:block>                        
							<fo:inline font-weight="bold">                           
								<xsl:value-of select="substring-before(./signatory-capacity/text(),'|')"></xsl:value-of>
							</fo:inline>                     
						</fo:block>                  
					</fo:table-cell>               
				</fo:table-row>            
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="doc-page">
	  <fo:block>
	   <fo:external-graphic>
			<xsl:if test="@type='pdf'">
				<xsl:attribute name="content-type">pdf</xsl:attribute>
			</xsl:if>
		<!-- NOTE: XEP will not load files in same directory if 'file:///' is prepended,
				   but FOP requires this  -->
			  <xsl:attribute name="src">
				 <xsl:choose>
					<!-- file is properly addressed -->
					<xsl:when test="contains(@file,'file')">
					   <xsl:value-of select="@file"></xsl:value-of>
					</xsl:when>
					<!-- create proper URI -->
					<xsl:otherwise>
						<xsl:value-of select="concat('file:///',translate(@file,'\','/'))"></xsl:value-of>
					</xsl:otherwise>
				 </xsl:choose>
				 <xsl:if test="@ppf">
					 <xsl:if test="@ppl">
						 <xsl:if test="@pp">
							<xsl:text>|</xsl:text>
							<xsl:value-of select="@ppf"></xsl:value-of>
							<xsl:text>;</xsl:text>
							<xsl:value-of select="@ppl"></xsl:value-of>
							<xsl:text>;</xsl:text>
							<xsl:value-of select="@pp"></xsl:value-of>
 	        	         </xsl:if>
        	         </xsl:if>
       	         </xsl:if>
			  </xsl:attribute>
			  <xsl:if test="@he">
				  <xsl:attribute name="content-height">
					 <xsl:choose>
						<xsl:when test="contains(@he,'mm') or contains(@he,'MM')">
						   <xsl:value-of select="@he"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
						   <xsl:value-of select="@he"></xsl:value-of>mm</xsl:otherwise>
					 </xsl:choose>
				  </xsl:attribute>
			  </xsl:if>
			  <xsl:if test="@wi">
				  <xsl:attribute name="content-width">
					 <xsl:choose>
						<xsl:when test="contains(@wi,'mm') or contains(@wi,'MM')">
						   <xsl:value-of select="@wi"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
						   <xsl:value-of select="@wi"></xsl:value-of>mm</xsl:otherwise>
					 </xsl:choose>
				  </xsl:attribute>
			  </xsl:if>
		   </fo:external-graphic>
	  </fo:block>
   </xsl:template>
	<xsl:key name="allCharge" match="//charge" use="."></xsl:key><xsl:key name="allPostal" match="//postal-order" use="."></xsl:key><xsl:key name="allCash" match="//cash" use="."></xsl:key><xsl:key name="allCoupons" match="//coupons" use="."></xsl:key><xsl:key name="allCheque" match="//cheque" use="."></xsl:key><xsl:key name="allBank" match="//bank-draft" use="."></xsl:key><xsl:key name="allStamps" match="//stamps" use="."></xsl:key><xsl:key name="allOther" match="//other" use="."></xsl:key><xsl:key name="allCur" match="//*/@currency" use="."></xsl:key><xsl:key name="fee-currency" match="prescribed-fees/* | amount-grand-total" use="@currency"></xsl:key><xsl:template name="fee_info">      
		<xsl:choose>         
			<xsl:when test="$fee_doc != ''">         
				<xsl:for-each select="document($fee_doc)/*">
					<xsl:choose>   
						<xsl:when test="document($fee_doc)//doc-page">  
							<xsl:for-each select="document($fee_doc)//doc-page"> 
								<xsl:apply-templates select="."></xsl:apply-templates>  
							</xsl:for-each>   
						</xsl:when>   
						<xsl:otherwise>  
							<xsl:call-template name="process_fee_info"></xsl:call-template>   
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>  
			</xsl:when>      
			<!-- when no fee parameter (e.g., fee-sheet document) -->
			<xsl:otherwise>            
				<xsl:choose>               
					<xsl:when test="./doc-page">                  
						<xsl:for-each select="./doc-page">                     
							<xsl:apply-templates select="doc-page"></xsl:apply-templates>                  
						</xsl:for-each>               
					</xsl:when>               
					<xsl:otherwise>
						<xsl:call-template name="process_fee_info"></xsl:call-template>        
					</xsl:otherwise>            
				</xsl:choose>         
			</xsl:otherwise>      
		</xsl:choose>   
		<xsl:call-template name="remarks"></xsl:call-template>       
	</xsl:template><xsl:template name="process_fee_info">    
		<!-- get the currencies used -->
		<xsl:variable name="uCharge" select="//charge[generate-id(.)=generate-id(key('allCharge',.))]"></xsl:variable>   
		<xsl:variable name="uPostal" select="//postal-order[generate-id(.)=generate-id(key('allPostal',.))]"></xsl:variable>   
		<xsl:variable name="uCash" select="//cash[generate-id(.)=generate-id(key('allCash',.))]"></xsl:variable>   
		<xsl:variable name="uCoupons" select="//coupons[generate-id(.)=generate-id(key('allCoupons',.))]"></xsl:variable>   
		<xsl:variable name="uCheque" select="//cheque[generate-id(.)=generate-id(key('allCheque',.))]"></xsl:variable>   
		<xsl:variable name="uBank" select="//bank-draft[generate-id(.)=generate-id(key('allBank',.))]"></xsl:variable>   
		<xsl:variable name="uStamps" select="//stamps[generate-id(.)=generate-id(key('allStamps',.))]"></xsl:variable>   
		<xsl:variable name="uOther" select="//other[generate-id(.)=generate-id(key('allOther',.))]"></xsl:variable>   
		<!-- variable to store the number of different payment modes; used in box 12-19 -->
		<xsl:variable name="pModes" select="count($uCharge) + count($uPostal) + count($uCash) + count($uCoupons) + count($uCheque) + count($uBank) + count($uStamps) + count($uOther)"></xsl:variable>
		<xsl:variable name="curCount" select="count(.//*/@currency[generate-id(.)=generate-id(key('allCur',.))])"></xsl:variable>      
		<xsl:variable name="unique-currencies" select=".//prescribed-fees/*[count( . | key('fee-currency', @currency)[1]) = 1] | .//amount-grand-total[count( . | key('fee-currency', @currency)[1]) = 1]"></xsl:variable>      
		<fo:table table-layout="fixed" border-collapse="separate" space-after="5mm">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="53mm"></fo:table-column>         
			<fo:table-column column-width="105mm"></fo:table-column>         
			<fo:table-body>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>0</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTC">                  
						<fo:block space-after="1.5mm">                     
							<fo:inline font-weight="bold">                        
								Reservado para o Organismo receptor                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdBL">                  
						<fo:block>                     
							<xsl:text>0-1</xsl:text>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBC">                  
						<fo:block>                     
							Pedido internacional No.                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBR">
						<fo:block>
						<xsl:choose>
							<xsl:when test="document($rrri_doc)//doc-number">
									<xsl:value-of select="document($rrri_doc)//doc-number"></xsl:value-of>
							</xsl:when>
							<xsl:when test="$ia_number">
									<xsl:value-of select="$ia_number"></xsl:value-of>
							</xsl:when>
						</xsl:choose>
						</fo:block>    
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdBL">                  
						<fo:block space-after="2.5mm">                     
							<fo:inline font-weight="bold">                        
								<xsl:text>0-2</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBC">                  
						<fo:block>                     
							Carimbo datador do Organismo receptor                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderBottom">                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>         
			</fo:table-body>      
		</fo:table>      
		<fo:table table-layout="fixed" border-collapse="separate">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="48mm"></fo:table-column>         
			<fo:table-column column-width="5mm"></fo:table-column>         
			<fo:table-column column-width="31mm"></fo:table-column>         
			<fo:table-column column-width="41mm"></fo:table-column>         
			<fo:table-column column-width="33mm"></fo:table-column>         
			<fo:table-body>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>0-4</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Formulário PCT/RO/101 (Anexo)                         
								<fo:block space-before=".5mm"></fo:block>                        
								Folha de cálculo das taxas PCT                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" number-columns-spanned="3">                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdBL">                  
						<fo:block>                     
							<xsl:text>0-4-1</xsl:text>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBC" number-columns-spanned="2">                  
						<fo:block>                     
							Preparado Utilizando                   
						</fo:block>               
					</fo:table-cell>   
					<fo:table-cell xsl:use-attribute-sets="tdBR" number-columns-spanned="3">                  
						<fo:block>                  
							<fo:inline font-weight="bold"> 
								<xsl:value-of select="$software_name"></xsl:value-of> 
								<fo:block></fo:block>
								<xsl:value-of select="$software_version"></xsl:value-of> 
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>   
            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdBL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>0-9</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBC" number-columns-spanned="2">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Referência do processo do requerente ou do mandatário                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBR" number-columns-spanned="3">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:value-of select=".//file-reference-id"></xsl:value-of>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>2</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdC" number-columns-spanned="2">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Requerente                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdR" number-columns-spanned="3">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>                           
									<xsl:when test=".//applicant-name/name">                              
										<xsl:call-template name="uppercaser">                                 
											<xsl:with-param name="string" select=".//applicant-name/name"></xsl:with-param>                              
										</xsl:call-template>                           
									</xsl:when>                           
									<xsl:otherwise>                              
										<xsl:call-template name="uppercaser">                                 
											<xsl:with-param name="string" select=".//applicant-name/last-name"></xsl:with-param>                              
										</xsl:call-template>                                
                              
										<xsl:text>, </xsl:text>                              
										<xsl:value-of select=".//applicant-name/first-name"></xsl:value-of>                           
									</xsl:otherwise>                        
								</xsl:choose>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="left">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>12</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Cálculo das taxas prescritas                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">                  
						<fo:block>                     
							Valor de taxa/multiplicador                   
						</fo:block>               
					</fo:table-cell>
					<xsl:for-each select=".//prescribed-fees/*">
						<xsl:sort select="@currency"></xsl:sort>
						<xsl:if test="not(@currency = preceding-sibling::*/@currency)"> 
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">   
							<!--202001 show equivalent amount !-->
								<xsl:choose>
									<xsl:when test="@currency = 'EQF'">
										<fo:block>
											Valor total   
										</fo:block>
										<fo:block>
											(equivalente em 
											<xsl:choose>
												<xsl:when test="..//transmittal-fee/@currency != 'EQF'">
													<xsl:value-of select="..//transmittal-fee/@currency"></xsl:value-of>
												</xsl:when>
												<xsl:when test="..//search-fee/@currency != 'EQF'">
													<xsl:value-of select="..//search-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//international-fee/@currency != 'EQF'">
													<xsl:value-of select="..//international-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//pdoc-fee/@currency != 'EQF'">
													<xsl:value-of select="..//pdoc-fee/@currency"></xsl:value-of>
												</xsl:when>
												<xsl:when test="..//restoration-fee/@currency != 'EQF'">
													<xsl:value-of select="..//restoration-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//earlier-search-document-fee/@currency != 'EQF'">
													<xsl:value-of select="..//earlier-search-document-fee/@currency"></xsl:value-of>
												</xsl:when>
											</xsl:choose>
											 de CHF)
										</fo:block>	
									</xsl:when>
									<xsl:when test="@currency = 'EQU'">
										<fo:block>
											Valor total   
										</fo:block>
										<fo:block>
											(equivalente em 
											<xsl:choose>
												<xsl:when test="..//transmittal-fee/@currency != 'EQU'">
													<xsl:value-of select="..//transmittal-fee/@currency"></xsl:value-of>
												</xsl:when>
												<xsl:when test="..//search-fee/@currency != 'EQU'">
													<xsl:value-of select="..//search-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//international-fee/@currency != 'EQU'">
													<xsl:value-of select="..//international-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//pdoc-fee/@currency != 'EQU'">
													<xsl:value-of select="..//pdoc-fee/@currency"></xsl:value-of>
												</xsl:when>
												<xsl:when test="..//restoration-fee/@currency != 'EQU'">
													<xsl:value-of select="..//restoration-fee/@currency"></xsl:value-of>															
												</xsl:when>
												<xsl:when test="..//earlier-search-document-fee/@currency != 'EQU'">
													<xsl:value-of select="..//earlier-search-document-fee/@currency"></xsl:value-of>
												</xsl:when>
											</xsl:choose>
											 de USD)
										</fo:block>	
									</xsl:when>
									<xsl:otherwise>	
										<fo:block>   
											Valor total    (<xsl:value-of select="@currency"></xsl:value-of>)
										</fo:block>
									</xsl:otherwise>
								</xsl:choose>
							</fo:table-cell> 
						</xsl:if>
					</xsl:for-each> 
					<xsl:if test="$curCount = 1">
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>
						</fo:table-cell> 
					</xsl:if> 			 
            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL">                  
						<fo:block text-align="center">12-1</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block>                  
							Taxa de transmissão                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>T</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block font-size="11pt" font-family="ZapfDingbats" text-align="center">➪</fo:block>               
					</fo:table-cell> 
					<xsl:for-each select=".//transmittal-fee"> 
						<xsl:variable name="this-fee" select="."></xsl:variable> 
						<xsl:for-each select="$unique-currencies"> 
							<xsl:sort select="@currency"></xsl:sort> 
							<!-- use with 'if' test below to trap NaN values -->
							 
							<xsl:variable name="fNum">
								<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
							</xsl:variable>   
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
								<fo:block>   
									<xsl:if test="boolean(number($fNum))">
										<fo:inline font-weight="bold">   
											<xsl:if test="$fNum &gt; 0">
												<xsl:value-of select="$fNum"></xsl:value-of>   
											</xsl:if>
										</fo:inline>
									</xsl:if>
								</fo:block>   
							</fo:table-cell> 
						</xsl:for-each> 
					</xsl:for-each> 
					<xsl:if test="$curCount = 1">
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>
						</fo:table-cell> 
					</xsl:if>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-2<xsl:if test=".//isa">-1</xsl:if>
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block>                  
							Taxa de pesquisa                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>S</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">                  
						<fo:block font-family="ZapfDingbats" font-size="11pt" padding="1pt">➪</fo:block>               
					</fo:table-cell> 
					<xsl:for-each select=".//search-fee"> 
						<xsl:variable name="this-fee" select="."></xsl:variable> 
						<xsl:for-each select="$unique-currencies"> 
							<xsl:sort select="@currency"></xsl:sort> 
							<!-- use with 'if' test below to trap NaN values -->
							 
							<xsl:variable name="fNum">
								<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
							</xsl:variable> 
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
								<fo:block>   
									<xsl:if test="boolean(number($fNum))">
										<fo:inline font-weight="bold">   
											<xsl:if test="$fNum &gt; 0">
												<xsl:value-of select="$fNum"></xsl:value-of>   
											</xsl:if>
										</fo:inline>
									</xsl:if>
								</fo:block> 
							</fo:table-cell> 
						</xsl:for-each> 
					</xsl:for-each> 
					<xsl:if test="$curCount = 1">
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>
						</fo:table-cell> 
					</xsl:if>            
				</fo:table-row>            
				<xsl:if test=".//isa">
					<fo:table-row>   
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">  
							<fo:block>12-2-2</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" border-right="solid black 0.5pt" text-align="left" number-columns-spanned="2">  
							<fo:block>
								Pesquisa internacional a ser efectuada por   
							</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdTR">  
							<fo:block>  
								<fo:inline font-weight="bold">  
									<xsl:value-of select="translate(.//isa,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
								</fo:inline>  
							</fo:block>   
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" number-columns-spanned="2">               
							<fo:block></fo:block>               
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<fo:table-row>   
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">  
						<fo:block>12-3</fo:block>   
					</fo:table-cell>   
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" border-right="solid black 0.5pt" text-align="left" number-columns-spanned="2">  
						<fo:block>
							Taxa de depósito internacional   
						</fo:block>   
					</fo:table-cell>   
					<!--
					<fo:table-cell xsl:use-attribute-sets = "tdBorderTopRight"> 
					-->
					<fo:table-cell xsl:use-attribute-sets="tdTR">  
						<fo:block></fo:block>   
					</fo:table-cell>               
					<xsl:choose>               
						<xsl:when test=".//isa">               
							<fo:table-cell number-columns-spanned="2" xsl:use-attribute-sets="tdBorderLeft"><fo:block></fo:block> </fo:table-cell>
						</xsl:when>               
						<xsl:otherwise>               
							<fo:table-cell number-columns-spanned="2" xsl:use-attribute-sets="tdBorderTopLeft"><fo:block></fo:block> </fo:table-cell> 
						</xsl:otherwise>               
					</xsl:choose>
				</fo:table-row>            
				<xsl:if test="($mode='v1.0' or $mode='v1.1')">
					<fo:table-row>               
						<fo:table-cell xsl:use-attribute-sets="tdL">                  
							<fo:block></fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
							<fo:block space-after="1mm" start-indent="3mm">
								<xsl:text>     
								</xsl:text>                     
								                  
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderRight">                  
							<fo:block></fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdR">                  
							<fo:block></fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
							<fo:block></fo:block>               
						</fo:table-cell>               
						<fo:table-cell>                  
							<fo:block></fo:block>               
						</fo:table-cell>            
					</fo:table-row>            
				</xsl:if>
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block start-indent="5mm">                     
							(primeiras 30 folhas)                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderRight" text-align="center">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>
									<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
										<xsl:text>i1</xsl:text>                     
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>b1</xsl:text>                     
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdR" text-align="right">                  
						<fo:block>                     
							<fo:inline font-weight="bold">  
								<xsl:value-of select=".//basic-fee/amount-each"></xsl:value-of>  
								<xsl:if test="$curCount &gt; 1">  	 
									<!-- 202001	 
									<xsl:value-of select = ".//international-fee/@currency"/>  !-->
								</xsl:if>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell>                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-4</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block start-indent="5mm">                  
							Restantes folhas                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTR">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>                           
									<xsl:when test=".//sheets-over-30">
										<xsl:value-of select=".//sheets-over-30"></xsl:value-of>                           
									</xsl:when>                           
									<xsl:otherwise>                              
										<xsl:text>0</xsl:text>                              
                           
									</xsl:otherwise>                        
								</xsl:choose>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-5</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block start-indent="5mm">                  
							Valor adicional                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold" font-size="7pt">                        
								<xsl:text>(X)</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTR">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>                           
									<xsl:when test=".//additional-amount/amount-each">  
										<xsl:value-of select=".//additional-amount/amount-each"></xsl:value-of>                           
									</xsl:when>                           
									<xsl:otherwise>                              
										<xsl:text>0</xsl:text>                              
                           
									</xsl:otherwise>                        
								</xsl:choose>                        
								<xsl:if test="$curCount &gt; 1">                        
									<!-- 2020 equivalent                         
									<xsl:value-of select = ".//international-fee/@currency"/> !-->                   
								</xsl:if>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell>                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-6</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block start-indent="5mm">                  
							Total do valor Adicional                   
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>
									<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
										<xsl:text>i2</xsl:text>                     
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>b2</xsl:text>                     
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="right">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>                           
									<xsl:when test=".//total-additional-amount">  
										<xsl:value-of select=".//total-additional-amount"></xsl:value-of>                           
									</xsl:when>                           
									<xsl:otherwise>                              
										<xsl:text>0</xsl:text>                           
									</xsl:otherwise>                        
								</xsl:choose>                        
								<xsl:if test="$curCount &gt; 1">                        
									<!--
									<xsl:value-of select = ".//international-fee/@currency"/> !-->                       
								</xsl:if>                        
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell>                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-7</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block start-indent="5mm">
							<xsl:choose>
								<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
									<xsl:text>i1 + i2 =</xsl:text>                     
								</xsl:when>
								<xsl:otherwise>
									<xsl:text>b1 + b2 =</xsl:text>                     
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:choose>
									<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
										<xsl:text>i</xsl:text>                     
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>B</xsl:text>                     
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="right">                  
						<fo:block>                  
							<fo:inline font-weight="bold">                        
								<xsl:choose>                           
									<xsl:when test=".//basic-fee/amount-total">  
										<xsl:value-of select=".//basic-fee/amount-total"></xsl:value-of>                           
									</xsl:when>                           
									<xsl:otherwise>  
										<xsl:value-of select="number(translate(.//basic-fee/amount-each,' .,:-','')) + number(.//total-additional-amount)"></xsl:value-of>
									</xsl:otherwise>                        
								</xsl:choose>                        
								<xsl:if test="$curCount &gt; 1">                        
									<!--
									<xsl:value-of select = ".//international-fee/@currency"/>   !-->                     
								</xsl:if>                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
						<fo:block></fo:block>               
					</fo:table-cell>               
					<fo:table-cell>                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<xsl:if test="(.//designation-fee) and ($mode='v1.0' or $mode='v1.1')">               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                     
							<fo:block>12-8</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                     
							<fo:block space-after="1mm" start-indent="3mm">                     
								                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTop">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC" number-columns-spanned="2">                     
							<fo:block start-indent="5mm">                     
								                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select=".//number-of-designation"></xsl:value-of>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                     
							<fo:block>12-9</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                     
							<fo:block start-indent="5mm">                     
								                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select=".//designation-fee-payable"></xsl:value-of>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                     
							<fo:block>12-10</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                     
							<fo:block start-indent="5mm">                     
								                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                     
							<fo:block>                        
								<fo:inline font-weight="bold" font-size="7pt">                           
									<xsl:text>(X)</xsl:text>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="left">                     
							<fo:block>                        
								<fo:inline font-weight="bold">  
									<xsl:value-of select=".//designation-fee/amount-each"></xsl:value-of>  
									<xsl:if test="$curCount &gt; 1">                        
										<!-- 
										<xsl:value-of select = ".//international-fee/@currency"/>  !-->
									</xsl:if>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                     
							<fo:block>12-11</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                     
							<fo:block start-indent="5mm">                     
								                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:text>D</xsl:text>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="right">                     
							<fo:block>                        
								<fo:inline font-weight="bold">
									<xsl:value-of select=".//designation-fee/amount-total"></xsl:value-of>
									<xsl:if test="$curCount &gt; 1">
										<!-- 
										<xsl:value-of select = ".//international-fee/@currency"/> !-->
									</xsl:if>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>            
				</xsl:if>            
				<xsl:for-each select=".//fee-reduction">
					<fo:table-row>               
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
							<fo:block>12-12</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
							<fo:block start-indent="3mm">                  
								<xsl:choose>
									<xsl:when test="$mode='v1.0' or $mode='v1.1'">
										<xsl:value-of select="$fee_reduction"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>
										<xsl:call-template name="reduction_type">
											<xsl:with-param name="reduction" select="@reduction-type"></xsl:with-param>
										</xsl:call-template>
									</xsl:otherwise>
								</xsl:choose>
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
							<fo:block>                     
								<fo:inline font-weight="bold">                        
									<xsl:text>R</xsl:text>                     
								</fo:inline>                  
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="right">                  
							<fo:block>                  
								<fo:inline font-weight="bold">
									<!--
									<xsl:if test = "$curCount > 1">
										<xsl:value-of select = "translate(parent::international-fee/@currency,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/>
									</xsl:if> !-->
									<xsl:value-of select="./amount-each"></xsl:value-of>
								</fo:inline>                                
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
							<fo:block></fo:block>               
						</fo:table-cell>               
						<fo:table-cell>                  
							<fo:block></fo:block>               
						</fo:table-cell>            
					</fo:table-row>         
				</xsl:for-each>   
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">                  
						<fo:block>12-13</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">                  
						<fo:block>                  
							<xsl:choose>
								<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
									Valor total da taxa de depósito internacional (i-R)                   
								</xsl:when>
								<xsl:otherwise>
									Valor total da taxa de depósito internacional (B+D+R)                   
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								<xsl:text>I</xsl:text>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTR">                  
						<fo:block font-size="11pt" font-family="ZapfDingbats" text-align="center">➪</fo:block>               
					</fo:table-cell> 
					<xsl:for-each select=".//international-fee"> 
						<xsl:variable name="this-fee" select="."></xsl:variable> 
						<xsl:for-each select="$unique-currencies"> 
							<xsl:sort select="@currency"></xsl:sort> 
							<!-- use with 'if' test below to trap NaN values -->
							<xsl:variable name="fNum">
								<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
							</xsl:variable>   
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
								<fo:block>   
									<xsl:if test="boolean(number($fNum))">
										<fo:inline font-weight="bold">   
											<xsl:if test="$fNum &gt; 0"> 
												<xsl:value-of select="$fNum"></xsl:value-of>   
											</xsl:if>
										</fo:inline>
									</xsl:if>
								</fo:block>   
							</fo:table-cell> 
						</xsl:for-each> 
					</xsl:for-each> 
					<xsl:if test="$curCount = 1">
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>
						</fo:table-cell> 
					</xsl:if>            
				</fo:table-row>
				<xsl:if test=".//pdoc-fee">				
					<xsl:if test="not($lang='ja')">
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">
								<fo:block>12-14</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">
								<fo:block space-after="1mm">
									Taxa pelo documento de prioridade 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" number-columns-spanned="2">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell>
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC" number-columns-spanned="2">
								<fo:block start-indent="5mm">
									Quantidade de documentos de prioridade solicitados 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select=".//pdoc-quantity"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">
								<fo:block>12-15</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">
								<fo:block start-indent="5mm">
									Taxa por documento 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">
								<fo:block>
									<fo:inline font-weight="bold">(X)</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select=".//pdoc-fee/amount-each"></xsl:value-of>
										<xsl:if test="$curCount &gt; 1">
											<!--
											<xsl:value-of select = ".//pdoc-fee/@currency"/> !-->
										</xsl:if>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">
								<fo:block></fo:block>
							</fo:table-cell>
							<fo:table-cell>
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">
								<fo:block>12-16</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">
								<fo:block>
									Total da taxa relativa ao documento de prioridade: 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">
								<fo:block>
									<fo:inline font-weight="bold">P</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">
								<fo:block font-size="11pt" font-family="ZapfDingbats">➪</fo:block>
							</fo:table-cell> 
							<xsl:for-each select=".//pdoc-fee"> 
								<xsl:variable name="this-fee" select="."></xsl:variable> 
								<xsl:for-each select="$unique-currencies">     
									<xsl:sort select="@currency"></xsl:sort> 
									<!-- use with 'if' test below to trap NaN values -->
									<xsl:variable name="fNum">
										<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
									</xsl:variable>   
									<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
										<fo:block>   	  
											<xsl:if test="boolean(number($fNum))">
												<fo:inline font-weight="bold">   
													<xsl:if test="$fNum &gt; 0">  
														<xsl:value-of select="$fNum"></xsl:value-of>   
													</xsl:if>
												</fo:inline>  
											</xsl:if>
										</fo:block>   
									</fo:table-cell> 
								</xsl:for-each> 
							</xsl:for-each> 
							<xsl:if test="$curCount = 1">
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
									<fo:block></fo:block>
								</fo:table-cell> 
							</xsl:if>
						</fo:table-row>
					</xsl:if>
				</xsl:if>
				<xsl:if test=".//restoration-fee">
					<fo:table-row>   
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">  
							<fo:block>12-17</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">  
							<fo:block>
								Taxa pelo restabelecimento do direito de prioridade 
							</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight" border-right="solid black 0.5pt">
							<fo:block>
								<fo:inline font-weight="bold">RP</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTL">  
							<fo:block></fo:block>   
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>   
						</fo:table-cell> 
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>   
						</fo:table-cell> 
					</fo:table-row>
					<fo:table-row>   
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">  
							<fo:block></fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft" border-right="solid black 0.5pt" text-align="left" number-columns-spanned="2">  
							<fo:block padding-top="1pt" start-indent="5mm">
								Número de pedidos para restabelecimento de direitos de prioridade 
							</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdR" text-align="left">                  
							<fo:block>                     
								<fo:inline font-weight="bold">                        
									<xsl:choose>                           
										<xsl:when test=".//restoration-quantity">
											<xsl:value-of select=".//restoration-quantity"></xsl:value-of>                           
										</xsl:when>                           
										<xsl:otherwise>                              
											<xsl:text></xsl:text>                              
										</xsl:otherwise>                        
									</xsl:choose>                     
								</fo:inline>                  
							</fo:block>                     
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">                  
							<fo:block>                     
							</fo:block>               
						</fo:table-cell>               
						<fo:table-cell xsl:use-attribute-sets="tdBorderLeft">  
							<fo:block> 
							</fo:block>   
						</fo:table-cell>               
					</fo:table-row>
					<fo:table-row>   
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">  
							<fo:block></fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" border-right="solid black 0.5pt" text-align="left" number-columns-spanned="2">  
							<fo:block>
								Valor total de taxas para restabelecimento de direitos de prioridade 
							</fo:block>   
						</fo:table-cell>   
						<fo:table-cell xsl:use-attribute-sets="tdTL">  
							<fo:block> 
							</fo:block>   
						</fo:table-cell>               
						<xsl:for-each select=".//restoration-fee"> 
							<xsl:variable name="this-fee" select="."></xsl:variable> 
							<xsl:for-each select="$unique-currencies"> 
								<xsl:sort select="@currency"></xsl:sort> 
								<!-- use with 'if' test below to trap NaN values -->
								<xsl:variable name="fNum">
									<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
								</xsl:variable>   
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
									<fo:block>   
										<xsl:if test="boolean(number($fNum))">
											<fo:inline font-weight="bold">   
												<xsl:if test="$fNum &gt; 0">
													<xsl:value-of select="$fNum"></xsl:value-of>   
												</xsl:if>
											</fo:inline>
										</xsl:if>
									</fo:block>   
								</fo:table-cell> 
							</xsl:for-each> 
						</xsl:for-each> 
						<xsl:if test="$curCount = 1">
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
								<fo:block></fo:block>
							</fo:table-cell> 
						</xsl:if>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//earlier-search-document-fee">
					<fo:table-row>   
						<fo:table-cell xsl:use-attribute-sets="tdL" text-align="center">
							<fo:block>12-18</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft" text-align="left">
							<fo:block>
								Taxa por documentos de pesquisa anterior                      
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">
							<fo:block>
								<fo:inline font-weight="bold">ES</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="left">                  
							<fo:block>                     
								<fo:inline font-weight="bold">                        
									<xsl:choose>                           
										<xsl:when test=".//earlier-search-document-quantity">
											<xsl:value-of select=".//earlier-search-document-quantity"></xsl:value-of>                           
										</xsl:when>                           
										<xsl:otherwise>                              
											<xsl:text></xsl:text>                              
										</xsl:otherwise>                        
									</xsl:choose>                     
								</fo:inline>                  
							</fo:block>                     
						</fo:table-cell>               
						<xsl:for-each select=".//earlier-search-document-fee"> 
							<xsl:variable name="this-fee" select="."></xsl:variable> 
							<xsl:for-each select="$unique-currencies"> 
								<xsl:sort select="@currency"></xsl:sort> 
								<!-- use with 'if' test below to trap NaN values -->
								<xsl:variable name="fNum">
									<xsl:value-of select="$this-fee[@currency = current()/@currency]/amount-total"></xsl:value-of> 
								</xsl:variable>   
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
									<fo:block>   
										<xsl:if test="boolean(number($fNum))">
											<fo:inline font-weight="bold">   
												<xsl:if test="$fNum &gt; 0">
													<xsl:value-of select="$fNum"></xsl:value-of>   
												</xsl:if>
											</fo:inline>
										</xsl:if>
									</fo:block>   
								</fo:table-cell> 
							</xsl:for-each> 
						</xsl:for-each> 
						<xsl:if test="$curCount = 1">
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
								<fo:block></fo:block>
							</fo:table-cell> 
						</xsl:if>              
					</fo:table-row>
				</xsl:if>
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">12-19</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                  
						<fo:block>
						<xsl:if test=".//restoration-fee">
							<xsl:if test=".//earlier-search-document-fee">
									<fo:inline font-weight="bold">                        
										TOTAL DAS TAXAS DEVIDAS (T+S+I+P+RP+ES)                      
									</fo:inline>                  
							</xsl:if>
							<xsl:if test="not(.//earlier-search-document-fee)">
									<fo:inline font-weight="bold">                        
										TOTAL DAS TAXAS DEVIDAS (T+S+I+P+RP)                      
									</fo:inline>                  
							</xsl:if>
						</xsl:if>
						<xsl:if test="not(.//restoration-fee)">
							<xsl:if test=".//earlier-search-document-fee">
									<fo:inline font-weight="bold">                        
										TOTAL DAS TAXAS DEVIDAS (T+S+I+P+ES)                      
									</fo:inline>                  
							</xsl:if>
							<xsl:if test="not(.//earlier-search-document-fee)">
									<fo:inline font-weight="bold">                        
										TOTAL DAS TAXAS DEVIDAS (T+S+I+P)                      
									</fo:inline>                  
							</xsl:if>
						</xsl:if>
						</fo:block>
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">                  
						<fo:block font-size="11pt" font-family="ZapfDingbats">➪</fo:block>               
					</fo:table-cell> 
					<xsl:for-each select=".//amount-grand-total">     
						<xsl:sort select="@currency"></xsl:sort> 
						<xsl:variable name="this-fee" select="."></xsl:variable> 
						<xsl:for-each select="$unique-currencies"> 
							<xsl:variable name="fNum">
								<xsl:value-of select="$this-fee[@currency = current()/@currency]/."></xsl:value-of> 
							</xsl:variable>   
							<xsl:if test="boolean(number($fNum))">   
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="right">   
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:value-of select="$fNum"></xsl:value-of>
										</fo:inline>
									</fo:block>   
								</fo:table-cell>   
							</xsl:if> 
						</xsl:for-each> 
					</xsl:for-each> 
					<xsl:if test="$curCount = 1">
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
							<fo:block></fo:block>
						</fo:table-cell> 
					</xsl:if>            
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell border-top="solid black 0.25pt" number-columns-spanned="6"><fo:block></fo:block></fo:table-cell>
				</fo:table-row>         
			</fo:table-body>       
		</fo:table>            
		<fo:table table-layout="fixed" border-collapse="separate">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="48mm"></fo:table-column>         
			<fo:table-column column-width="5mm"></fo:table-column>         
			<fo:table-column column-width="35mm"></fo:table-column>         
			<fo:table-column column-width="35mm"></fo:table-column>         
			<fo:table-column column-width="35mm"></fo:table-column>         
			<fo:table-body>            
			<!-- NOTE: not used after 2004 -->
				<!--xsl:if test = "not(.//designation-fee)">               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets = "tdTL">                     
							<fo:block>                        
								<fo:inline font-weight = "bold">12-20</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets = "tdTC" number-columns-spanned = "2">                     
							<fo:block>                        
								<fo:inline font-weight = "bold">                           
									<inc file = "commonText.xml" toTranslate = "desFeesNotPaid_Text"/>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets = "tdTL" number-columns-spanned = "3">                     
							<fo:block font-size = "11pt" font-family = "ZapfDingbats">✓</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>            
				</xsl:if-->            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTBL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">12-21</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTBC" number-columns-spanned="2">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Modo de pagamento                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="3">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                     
								<xsl:choose>
									<xsl:when test="$pModes &gt; 1">
										Taxa de transmissão :   <xsl:call-template name="paymentMode">
											<xsl:with-param name="pType" select=".//transmittal-fee/payment-mode"></xsl:with-param>   
										</xsl:call-template>
										<fo:block></fo:block>
										Taxa de pesquisa : <xsl:call-template name="paymentMode">
											<xsl:with-param name="pType" select=".//search-fee/payment-mode"></xsl:with-param>   
										</xsl:call-template>
										<fo:block></fo:block>
										Taxa de depósito internacional :   <xsl:call-template name="paymentMode">
											<xsl:with-param name="pType" select=".//international-fee/payment-mode"></xsl:with-param>   
										</xsl:call-template>
										<xsl:if test=".//pdoc-fee/amount-total &gt; 0">   
											<fo:block></fo:block>   
											Taxa pelo documento de prioridade :   <xsl:call-template name="paymentMode">
												<xsl:with-param name="pType" select=".//pdoc-fee/payment-mode"></xsl:with-param>   
											</xsl:call-template>
										</xsl:if>
									</xsl:when>
									<xsl:otherwise>
										<!-- otherwise, all payment types are the same; use any -->
										<xsl:call-template name="paymentMode">
											<xsl:with-param name="pType" select=".//transmittal-fee/payment-mode"></xsl:with-param>   
										</xsl:call-template>
									</xsl:otherwise>
								</xsl:choose>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<xsl:if test=".//deposit-account/account-no/text()">               
					<fo:table-row keep-with-next="always">                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">12-22</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                     
							<fo:block space-after="2mm">                        
								<fo:inline font-weight="bold">                           
									Instruções relativas à conta corrente ou de depósito                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<!--inc file = "commonText.xml" toTranslate = "charge_Text"/-->									                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row keep-with-next="always">                  
						<fo:table-cell>                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC" number-columns-spanned="2">                     
							<fo:block>                        
								O Organismo receptor                      
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR" number-columns-spanned="3">                     
							<fo:block>                        
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test="$lang='ar'">
											<fo:bidi-override unicode-bidi="embed" direction="rtl">
												<xsl:call-template name="officeName_ChoiceText">
													<xsl:with-param name="office" select=".//@ro"></xsl:with-param>
												</xsl:call-template>
											</fo:bidi-override>
										</xsl:when>
										<xsl:otherwise>
											<xsl:call-template name="officeName_ChoiceText">
												<xsl:with-param name="office" select=".//@ro"></xsl:with-param>
											</xsl:call-template>											
										</xsl:otherwise>
									</xsl:choose>
									<fo:inline keep-together.within-line="always">
										<xsl:text>(RO/</xsl:text>
										<xsl:value-of select="translate(.//@ro,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
										<xsl:text>)</xsl:text>
									</fo:inline>
								</fo:inline>                 
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:if test=".//deposit-account/authorization/total-fee">                  
						<fo:table-row keep-with-next="always">                  
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block>12-22-1</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                        
								<fo:block>                           
									Autorização para debitar o total das taxas indicado acima                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL" number-columns-spanned="3">                        
								<fo:block font-size="11pt" font-family="ZapfDingbats">✓</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>               
					<xsl:if test=".//deposit-account/authorization/deficiency-credit">                  
						<fo:table-row keep-with-next="always">                  
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block>12-22-2</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                        
								<fo:block>                           
									Autorização para debitar qualquer valor que falte – ou creditar qualquer excedente – no pagamento do total das taxas indicado acima                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL" number-columns-spanned="3">                        
								<fo:block font-size="11pt" font-family="ZapfDingbats">✓</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>               
					<xsl:if test=".//deposit-account/authorization/fee-for-pdoc">                  
						<fo:table-row keep-with-previous="always">                  
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block>12-22-3</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                        
								<fo:block>                           
									Autorização para debitar a taxa pelo documento de prioridade                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL" number-columns-spanned="3">                        
								<fo:block font-size="11pt" font-family="ZapfDingbats">✓</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>               
					<xsl:if test=".//deposit-account/authorization/automatic-debit">
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block>12-22-4</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                        
								<fo:block>                           
									O Organismo enquanto Organismo receptor (RO), enquanto Autoridade responsável pela pesquisa internacional (ISA), e, se for caso disso, enquanto Autoridade responsável pelo exame preliminar internacional (IPEA) está autorizado a debitar automaticamente a conta identificada, nos termos do procedimento de débito automático do Organismo, com quaisquer taxas devidas pelo processamento deste pedido internacional                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL" number-columns-spanned="3">                        
								<fo:block font-size="11pt" font-family="ZapfDingbats">✓</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>                  

					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">12-23</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                     
							<fo:block>                        
								Conta corrente ou de depósito No.                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select=".//account-no"></xsl:value-of>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">12-24</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBC" number-columns-spanned="2">                     
							<fo:block>                        
								Data                      
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="3">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:call-template name="format_date">                              
										<xsl:with-param name="lang" select="$lang"></xsl:with-param>                              
										<xsl:with-param name="date" select=".//date"></xsl:with-param>                              
										<xsl:with-param name="show_date" select="1"></xsl:with-param>                              
										<xsl:with-param name="date_too" select="1"></xsl:with-param>                              
										<xsl:with-param name="text" select="1"></xsl:with-param>                           
									</xsl:call-template>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row keep-with-next="always">                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">12-25</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">                     
							<fo:block space-after="12mm">                        
								Nome e assinatura                      
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">                     
							<fo:block>                        
								<fo:inline font-weight="bold">
									<!-- TODO: determine whether to show deposit-account name or signatory name -->
									 
									<xsl:call-template name="format_name">
										<xsl:with-param name="name_arg" select=".//deposit-account"></xsl:with-param> 
									</xsl:call-template>           						 
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<fo:table-row keep-with-previous="always">                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderBottom">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBC" number-columns-spanned="2">                     
							<fo:block></fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBR" number-columns-spanned="3">                     
							<fo:block>   
								<xsl:choose>  
									<xsl:when test=".//signatory[1]/electronic-signature/basic-signature/fax-image"> 
										<fo:external-graphic>
											<xsl:if test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
												<xsl:attribute name="content-width">scale-down-to-fit</xsl:attribute>											
												<xsl:attribute name="width">100mm</xsl:attribute>											
											</xsl:if>										
											<!-- NOTE: XEP will not load files in same directory if 'file:///' is prepended -->
											<xsl:attribute name="src">   
												<xsl:choose>  
													<xsl:when test="contains(.//signatory[1]/electronic-signature/basic-signature/fax-image/@file,'/') or contains(.//signatory[1]/electronic-signature/basic-signature/fax-image/@file,'\') or contains(.//signatory[1]/electronic-signature/basic-signature/fax-image/@file,':')"> 
														<xsl:value-of select="concat('file:///',.//signatory[1]/electronic-signature/basic-signature/fax-image/@file)"></xsl:value-of>  
													</xsl:when>  
													<xsl:otherwise> 
														<xsl:value-of select=".//signatory[1]/electronic-signature/basic-signature/fax-image/@file"></xsl:value-of>  
													</xsl:otherwise>   
												</xsl:choose>
											</xsl:attribute> 
										</fo:external-graphic>  
									</xsl:when>  
									<xsl:when test=".//signatory[1]/electronic-signature/basic-signature/click-wrap"> 
										<fo:inline font-weight="bold"> 
											(Requerente clicou "Sim")  
										</fo:inline>  
									</xsl:when>  
									<xsl:when test=".//signatory[1]/electronic-signature/basic-signature/text-string"> 
										<fo:inline font-weight="bold"> 
											<xsl:value-of select=".//signatory[1]//text-string"></xsl:value-of> 
										</fo:inline>  
									</xsl:when>  
									<xsl:when test=".//signatory[1]/enhanced-signature/pkcs7">
										<fo:inline font-weight="bold"> 
											(PKCS7 Assinatura Digital) 
										</fo:inline>  
									</xsl:when>   
								</xsl:choose>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>            
				</xsl:if>        
				<xsl:if test="(.//payment-mode/credit-card) or (.//payment-mode/bank-draft and .//payment-contact/email/text()) or (.//@ro='IB' and .//payment-contact/email/text())">
					<xsl:if test="not(.//@ro='EP')">
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTBL">
								<fo:block>
									<fo:inline font-weight="bold">12-22</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTBC" number-columns-spanned="2">
								<fo:block>
									<fo:inline font-weight="bold">
										Contacto para pagamento 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="3">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select=".//payment-contact/email"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
				</xsl:if>
				<xsl:if test=".//reimbursement-deposit-account">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">12-26</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC" number-columns-spanned="2">
							<fo:block>
								<fo:inline font-weight="bold">
									Instruções de reembolso
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="3">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
					<xsl:for-each select=".//reimbursement-deposit-account">
						<xsl:variable name="seq" select="position()"></xsl:variable>
						<fo:table-row keep-with-previous="always">
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline>12-26-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">
								<fo:block>
									<fo:inline>
										Organismo que processa o reembolso
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select="./ip-office"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row keep-with-previous="always">
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline>12-26-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">
								<fo:block>
									<fo:inline>
										Reembolso, se for o caso, a ser efetuado para a conta corrente ou de depósito com o n°.
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select="./account-no"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row keep-with-previous="always">
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline>12-26-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC" number-columns-spanned="2">
								<fo:block>
									<fo:inline>
										Titular da conta
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="3">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:value-of select="./name"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>                  
							<fo:table-cell xsl:use-attribute-sets="tdTBL">                     
								<fo:block>                        
										<fo:inline>12-26-<xsl:value-of select="$seq"></xsl:value-of>-4</fo:inline>
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdTBC" number-columns-spanned="2">                     
								<fo:block>                        
									Data                      
								</fo:block>                  
							</fo:table-cell>                  
							<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="3">                     
								<fo:block>                        
									<fo:inline font-weight="bold">                           
										<xsl:call-template name="format_date">                              
											<xsl:with-param name="lang" select="$lang"></xsl:with-param>                              
											<xsl:with-param name="date" select=".//date"></xsl:with-param>                              
											<xsl:with-param name="show_date" select="1"></xsl:with-param>                              
											<xsl:with-param name="date_too" select="1"></xsl:with-param>                              
											<xsl:with-param name="text" select="1"></xsl:with-param>                           
										</xsl:call-template>                        
									</fo:inline>                     
								</fo:block>                  
							</fo:table-cell>               
						</fo:table-row>  
					</xsl:for-each>
				</xsl:if>
			</fo:table-body>      
		</fo:table>   
	</xsl:template><xsl:template name="reduction_type">
		<xsl:param name="reduction"></xsl:param>
		<xsl:choose>
			<xsl:when test="$reduction='PCT-SAFE reduction (full)'">
				PCT-SAFE reduction (full)
			</xsl:when>
			<xsl:when test="$reduction='PCT-SAFE reduction (image)'">
				PCT-SAFE reduction (image)
			</xsl:when>
			<xsl:when test="$reduction='PCT-SAFE reduction (EASY)'">
				PCT-SAFE reduction (EASY)
			</xsl:when>
			<xsl:when test="$reduction='electronic-application-form'">
				Redução por depósito EASY
			</xsl:when>
			<xsl:when test="$reduction='electronic-filing-image-description'">
				Redução por depósito electrónico (imagem)
			</xsl:when>
			<xsl:when test="$reduction='electronic-filing-full-xml'">
				Redução por depósito electrónico (XML)
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$reduction"></xsl:value-of>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="remarks">
		<!-- render <dtext> remarks; currently, JA only -->
		<xsl:if test="(document($request_doc)//dtext) or (.//dtext)">
			<fo:table table-layout="fixed" border-collapse="separate" space-after="5mm" space-before="5mm">         
				<fo:table-column column-width="12mm"></fo:table-column>         
				<fo:table-column column-width="53mm"></fo:table-column>         
				<fo:table-column column-width="105mm"></fo:table-column>         
				<fo:table-body>            
					<fo:table-row>
						<fo:table-cell font-size="10pt" vertical-align="top" padding="1.5pt" number-columns-spanned="3" padding-bottom="4mm">
							<fo:block text-align="center">  
								<fo:inline font-weight="bold">  
									OBSERVAÇÕES 
								</fo:inline>  
							</fo:block>       
						</fo:table-cell>
					</fo:table-row>        
					<xsl:for-each select="document($request_doc)//dtext | .//dtext">
						<xsl:variable name="seq" select="position()"></xsl:variable>
						<fo:table-row>               
							<fo:table-cell xsl:use-attribute-sets="tdTL">                  
								<fo:block>                     
									<fo:inline font-weight="bold">13-1-<xsl:value-of select="$seq"></xsl:value-of>
									</fo:inline>                  
								</fo:block>               
							</fo:table-cell>               
							<fo:table-cell xsl:use-attribute-sets="tdTC">                  
								<fo:block space-after="1.5mm">                     
									<fo:inline font-weight="bold">                        
										Observações do Requerente 
									</fo:inline>                  
								</fo:block>               
							</fo:table-cell>               
							<fo:table-cell xsl:use-attribute-sets="tdTL">                  
								<fo:block padding-bottom="3mm">
									<xsl:value-of select="."></xsl:value-of>
								</fo:block>               
							</fo:table-cell>            
						</fo:table-row>            
					</xsl:for-each>
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.5pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
	</xsl:template><xsl:template name="paymentMode">   	 
		<xsl:param name="pType"></xsl:param>
		<xsl:choose>
			<xsl:when test="name($pType/*)='charge'">
				<xsl:choose>
					<xsl:when test=".//deposit-account/authorization/automatic-debit">
						Autorização para debitar automaticamente uma conta corrente ou de depósito											
					</xsl:when>
					<xsl:otherwise>
						autorização para debitar uma conta corrente ou de depósito
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="name($pType/*)='credit-card'">
				Cartão de crédito
			</xsl:when>
			<xsl:when test="name($pType/*)='postal-order'">
				Vale de correio 
			</xsl:when>
			<xsl:when test="name($pType/*)='cash'">
				Numerário 
			</xsl:when>
			<xsl:when test="name($pType/*)='coupons'">
				Cupões 
			</xsl:when>
			<xsl:when test="name($pType/*)='cheque'">
				Cheque 
			</xsl:when>
			<xsl:when test="name($pType/*)='bank-draft'">
				Transferência bancária
			</xsl:when>
			<xsl:when test="name($pType/*)='stamps'">
				Selos fiscais 
			</xsl:when>
			<xsl:when test="name($pType/*)='other'">
				Outro : 
				<xsl:choose>
					<xsl:when test="$pType='credit card'">
						Cartão de crédito 
					</xsl:when>
					<xsl:otherwise>
						<xsl:value-of select="$pType"></xsl:value-of>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
		</xsl:choose> 
	</xsl:template>
	<xsl:template name="indication_bio_deposit">      
		<xsl:choose>         
			<xsl:when test="$bio_doc != ''">         
				<xsl:for-each select="document($bio_doc)/*">
					<xsl:choose>   
						<xsl:when test="document($bio_doc)//doc-page">  
							<xsl:for-each select="document($bio_doc)//doc-page"> 
								<xsl:apply-templates select="."></xsl:apply-templates>  
							</xsl:for-each>   
						</xsl:when>   
						<xsl:otherwise>  
							<xsl:call-template name="process_bio"></xsl:call-template>   
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>         
			</xsl:when>      
			<!-- when no bio parameter (e.g., bio-deposit document) -->
			<xsl:otherwise>            
				<xsl:choose>               
					<xsl:when test="./doc-page">                  
						<xsl:for-each select="./doc-page">                     
							<xsl:apply-templates select="."></xsl:apply-templates>                  
						</xsl:for-each>               
					</xsl:when>               
					<xsl:otherwise>
						<xsl:call-template name="process_bio"></xsl:call-template>               
					</xsl:otherwise>            
				</xsl:choose>         
			</xsl:otherwise>      
		</xsl:choose>   
	</xsl:template><xsl:template name="process_bio">      
		<fo:table table-layout="fixed" border-collapse="separate" space-after="5mm" keep-together.within-page="always">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="53mm"></fo:table-column>         
			<fo:table-column column-width="105mm"></fo:table-column>         
			<fo:table-body>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">0-1</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTC">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                     
								Formulário PCT/RO/134<fo:block />Indicações Relativas a Depósito de Microorganismo(s) ou Outro  Material Biológico  (PCT Regra 13bis)                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">                  
						<fo:block></fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdBL">                  
						<fo:block>0-1-1</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBC">                  
						<fo:block space-after="5mm">                  
							Preparado Utilizando                   
						</fo:block> 
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdBR">                  
						<fo:block padding-top="1pt">                     
							<fo:inline font-weight="bold">                        
								<xsl:value-of select="$software_name"></xsl:value-of>                        
								<fo:block></fo:block>                        
								<xsl:value-of select="$software_version"></xsl:value-of>
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdL" padding-bottom="5mm">                  
						<fo:block>                     
							<fo:inline font-weight="bold">0-2</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdC">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                     
								Pedido internacional No.                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdR">                  
						<fo:block>
						<xsl:choose>
							<xsl:when test="document($rrri_doc)//doc-number">
									<xsl:value-of select="document($rrri_doc)//doc-number"></xsl:value-of>
							</xsl:when>
							<xsl:when test="$ia_number">
									<xsl:value-of select="$ia_number"></xsl:value-of>
							</xsl:when>
						</xsl:choose>             
						</fo:block>
					</fo:table-cell>            
				</fo:table-row>            
				<fo:table-row>               
					<fo:table-cell xsl:use-attribute-sets="tdTBL">                  
						<fo:block>                     
							<fo:inline font-weight="bold">0-3</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTBC">                  
						<fo:block>                     
							<fo:inline font-weight="bold">                        
								Referência do processo do requerente ou do mandatário                      
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>               
					<fo:table-cell xsl:use-attribute-sets="tdTBR">                  
						<fo:block padding-top="1pt">                     
							<fo:inline font-weight="bold">                        
								<xsl:value-of select=".//file-reference-id"></xsl:value-of>                     
							</fo:inline>                  
						</fo:block>               
					</fo:table-cell>            
				</fo:table-row>          
			</fo:table-body>        
		</fo:table>       
		<xsl:for-each select=".//bio-deposit">         
			<xsl:variable name="bio_seq" select="@num"></xsl:variable> 
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">         
				<fo:table-column column-width="12mm"></fo:table-column>         
				<fo:table-column column-width="53mm"></fo:table-column>         
				<fo:table-column column-width="105mm"></fo:table-column> 
				<fo:table-body>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select="$bio_seq"></xsl:value-of>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                        
									As indicações que seguem referem-se ao depósito de microorganismo(s) ou outro material biológico tal como referido na descrição no:                         
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdBorderTop">                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:choose>
						<xsl:when test="contains(../para-number,'|')">
							<fo:table-row>                  
								<fo:table-cell xsl:use-attribute-sets="tdL">                     
									<fo:block>                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="$bio_seq"></xsl:value-of>-1</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdC">                     
									<fo:block>                        
										<fo:inline font-weight="bold">  
											página                         
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdR">                     
									<fo:block padding-top="1pt">                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="substring-before(preceding-sibling::para-number,'|')"></xsl:value-of>                        
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>               
							</fo:table-row>
							<fo:table-row>                  
								<fo:table-cell xsl:use-attribute-sets="tdL">                     
									<fo:block>                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="$bio_seq"></xsl:value-of>-2</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdC">                     
									<fo:block>                        
										<fo:inline font-weight="bold">  
											linha                         
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdR">                     
									<fo:block padding-top="1pt">                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="substring-after(preceding-sibling::para-number,'|')"></xsl:value-of>                        
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>               
							</fo:table-row>
						</xsl:when>
						<xsl:otherwise>
							<!-- SAFE mode, use paragraph number -->
							<fo:table-row>                  
								<fo:table-cell xsl:use-attribute-sets="tdL">                     
									<fo:block>                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="$bio_seq"></xsl:value-of>-1</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdC">                     
									<fo:block>                        
										<fo:inline font-weight="bold">  
											Parágrafo número                          
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>                  
								<fo:table-cell xsl:use-attribute-sets="tdR">                     
									<fo:block padding-top="1pt">                        
										<fo:inline font-weight="bold">                           
											<xsl:value-of select="preceding-sibling::para-number"></xsl:value-of>
										</fo:inline>                     
									</fo:block>                  
								</fo:table-cell>               
							</fo:table-row>
						</xsl:otherwise>  
					</xsl:choose>
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select="$bio_seq"></xsl:value-of>-3</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTC">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                        
									Identificação do depósito                         
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTR">                     
							<fo:block></fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:if test="depositary/text()">   
						<fo:table-row>  
							<fo:table-cell xsl:use-attribute-sets="tdL"> 
								<fo:block>   
									<xsl:value-of select="$bio_seq"></xsl:value-of>-3-1
						 
								</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdC"> 
								<fo:block> 
									Nome da instituição depositária  
								</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdR"> 
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:value-of select="depositary/text()"></xsl:value-of>
									</fo:inline> 
								</fo:block>  
							</fo:table-cell>   
						</fo:table-row>   
					</xsl:if>               
					<xsl:if test="depositary/address">                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdL">                        
								<fo:block>                              
									<xsl:value-of select="$bio_seq"></xsl:value-of>-3-2
                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdC">                        
								<fo:block>                        
									Endereço da instituição de depósito                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">
										<!-- test whether #PCDATA, <text>, or <address> sub-elements used -->
										<xsl:choose>
											<xsl:when test="not(depositary/address/text)">
												<xsl:choose>
													<xsl:when test="$lang = 'ko'">
														<fo:block>
															<xsl:call-template name="country_ChoiceText">
																<xsl:with-param name="country" select="depositary/address/country"></xsl:with-param>
															</xsl:call-template>
														</fo:block>													
														<xsl:for-each select="depositary/address/*"> 
															<xsl:choose>
																<xsl:when test="name(.)='city'">   
																	<xsl:value-of select="."></xsl:value-of>   
																	<xsl:text>, </xsl:text>
																</xsl:when>
																<xsl:when test="name(.)='state'">   
																	<xsl:value-of select="."></xsl:value-of>   
																	<xsl:text> </xsl:text>                                       
																</xsl:when>
																<xsl:otherwise>
																	<xsl:if test="name(.)!='country'">
																		<xsl:choose>
																			<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																				<fo:block white-space="pre" wrap-option="wrap">
																					<xsl:value-of select="."></xsl:value-of>
																				</fo:block>
																			</xsl:when>
																			<xsl:otherwise>
																				<fo:block white-space-collapse="false" wrap-option="wrap">															
																					<xsl:value-of select="."></xsl:value-of>   
																				</fo:block>
																			</xsl:otherwise>
																		</xsl:choose>
																	</xsl:if>
																</xsl:otherwise> 
															</xsl:choose>
														</xsl:for-each> 
													</xsl:when>
													<xsl:otherwise>
														<xsl:for-each select="depositary/address/*"> 
															<xsl:choose>
																<xsl:when test="name(.)='city'">   
																	<xsl:value-of select="."></xsl:value-of>   
																	<xsl:text>, </xsl:text>
																</xsl:when>
																<xsl:when test="name(.)='state'">   
																	<xsl:value-of select="."></xsl:value-of>   
																	<xsl:text> </xsl:text>                                       
																</xsl:when>
																<xsl:when test="name(.)='country'">
																	<xsl:call-template name="country_ChoiceText">
																		<xsl:with-param name="country" select="."></xsl:with-param>
																	</xsl:call-template>
																</xsl:when>
																<xsl:otherwise>  
																	<xsl:choose>
																		<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
																			<fo:block white-space="pre" wrap-option="wrap">
																				<xsl:value-of select="."></xsl:value-of>
																			</fo:block>
																		</xsl:when>
																		<xsl:otherwise>
																			<fo:block white-space-collapse="false" wrap-option="wrap">															
																				<xsl:value-of select="."></xsl:value-of>   
																			</fo:block>
																		</xsl:otherwise>
																	</xsl:choose>
																</xsl:otherwise> 
															</xsl:choose>
														</xsl:for-each> 
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when> 
											<xsl:otherwise>
												<xsl:choose>
													<xsl:when test="not(contains($fop_version, '0.2')) and ($fop_version != '')">
														<fo:block white-space="pre" wrap-option="wrap">
															<xsl:value-of select="depositary/address/text"></xsl:value-of> 
														</fo:block>
													</xsl:when>
													<xsl:otherwise>
														<fo:block white-space-collapse="false" wrap-option="wrap">															
															<xsl:value-of select="depositary/address/text"></xsl:value-of> 
														</fo:block>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:otherwise>
										</xsl:choose>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>               
					<xsl:if test="date">                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdL">                        
								<fo:block>                              
									<xsl:value-of select="$bio_seq"></xsl:value-of>-3-3
                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdC">                        
								<fo:block>                        
									Data do depósito                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">    
										<xsl:call-template name="format_date">                                 
											<xsl:with-param name="date" select="date"></xsl:with-param>                                 
											<xsl:with-param name="lang" select="$lang"></xsl:with-param>                                 
											<xsl:with-param name="text" select="1"></xsl:with-param>                                 
											<xsl:with-param name="show_date" select="1"></xsl:with-param>                                 
											<xsl:with-param name="date_too" select="1"></xsl:with-param>                              
										</xsl:call-template>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>               
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdL">                     
							<fo:block>                           
								<xsl:value-of select="$bio_seq"></xsl:value-of>-3-4
                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdC">                     
							<fo:block>                     
								O número de protocolo (atribuido ao depósito)                       
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select="bio-accno"></xsl:value-of>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:if test="name(following-sibling::*[position()=1])='additional-indication'">                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdTL">                        
								<fo:block>                           
									<fo:inline font-weight="bold">                              
										<xsl:value-of select="$bio_seq"></xsl:value-of>-4</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTC">                        
								<fo:block>                           
									<fo:inline font-weight="bold">                           
										Indicações Adicionais                            
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdTR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                              
										<xsl:value-of select="following-sibling::additional-indication"></xsl:value-of>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if>       
					<fo:table-row>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBL">                     
							<fo:block>                        
								<fo:inline font-weight="bold">                           
									<xsl:value-of select="$bio_seq"></xsl:value-of>-5</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBC">                     
							<fo:block padding-left="4mm">                        
								<fo:inline font-weight="bold">                        
									Estados Designados à Intenção dos Quais as Indicações são Apresentadas                         
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>                  
						<fo:table-cell xsl:use-attribute-sets="tdTBR">                     
							<fo:block padding-top="1pt">                        
								<fo:inline font-weight="bold">                           
									<xsl:choose>                              
										<xsl:when test="name(following-sibling::*[position()=1])='all-designations' or name(following-sibling::*[position()=2])='all-designations'">                                  
											Todas as designações                               
										</xsl:when>                              
										<xsl:when test="name(following-sibling::*[position()=1])='designated-states' or name(following-sibling::*[position()=2])='designated-states'">
											<!-- do region: (countries); countries -->
											<xsl:for-each select="following-sibling::designated-states[1]/region">
												<xsl:sort select="."></xsl:sort>
												<xsl:variable name="reg_name" select="./country"></xsl:variable>
												<xsl:value-of select="concat(translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ'),': ')"></xsl:value-of>(<xsl:for-each select="following-sibling::country[preceding-sibling::region[1]/country=$reg_name]">
													<xsl:sort select="."></xsl:sort>
													<xsl:call-template name="caseCH"></xsl:call-template>
												</xsl:for-each>
												<xsl:text>) </xsl:text>
												<xsl:if test="./designated-states/country[not(preceding-sibling::region)]">
													<xsl:text>;</xsl:text>
												</xsl:if></xsl:for-each>
											<xsl:for-each select="following-sibling::designated-states[1]/country[not(preceding-sibling::region)]">
												<xsl:sort select="."></xsl:sort>
												<xsl:call-template name="caseCH"></xsl:call-template>
											</xsl:for-each>
										</xsl:when>
									</xsl:choose>                        
								</fo:inline>                     
							</fo:block>                  
						</fo:table-cell>               
					</fo:table-row>               
					<xsl:if test="following-sibling::separate-indications">                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdL">                        
								<fo:block>                           
									<fo:inline font-weight="bold">                              
										<xsl:value-of select="$bio_seq"></xsl:value-of>-6</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdC">                        
								<fo:block padding-left="4mm">                            
									<fo:inline font-weight="bold">                           
										Indicações Apresentadas Separadamente                            
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdR">                        
								<fo:block padding-top="1pt">                           
									<fo:inline font-weight="bold">                              
										<xsl:value-of select="following-sibling::separate-indications"></xsl:value-of>                           
									</fo:inline>                        
								</fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>                  
						<fo:table-row>                     
							<fo:table-cell xsl:use-attribute-sets="tdBL">                        
								<fo:block></fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdBC">                        
								<fo:block padding-left="4mm">                      
									Estas indicações serão apresentadas à Secretaria Internacional posteriormente                         
								</fo:block>                     
							</fo:table-cell>                     
							<fo:table-cell xsl:use-attribute-sets="tdBR">                        
								<fo:block></fo:block>                     
							</fo:table-cell>                  
						</fo:table-row>               
					</xsl:if> 
				</fo:table-body>  
			</fo:table>       
		</xsl:for-each> 
		<fo:block>
			<xsl:text> </xsl:text>
		</fo:block>      
		<fo:table table-layout="fixed" border-collapse="separate" space-before="5mm" keep-together.within-page="always">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="53mm"></fo:table-column>         
			<fo:table-column column-width="105mm"></fo:table-column>         
			<fo:table-body>
				<fo:table-row>  
					<fo:table-cell font-size="10pt" vertical-align="top" padding="1.5pt" number-columns-spanned="3">
						<fo:block text-align="center" padding-after="5mm">  
							<fo:inline font-weight="bold">
								RESERVADO PARA O ORGANISMO RECEPTOR   
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL"> 
						<fo:block>
							<fo:inline font-weight="bold">0-4</fo:inline> 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC"> 
						<fo:block padding-left="4mm"> 
							<fo:inline font-weight="bold">
								Este formulário foi recebido com o pedido Iinernacional 
							</fo:inline> 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTR"> 
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:call-template name="disp_received_with_ia"></xsl:call-template>
							</fo:inline>
						</fo:block>
					</fo:table-cell>   
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL"> 
						<fo:block></fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC"> 
						<fo:block padding-left="4mm">
							(sim ou não)  
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR"> 
						<fo:block></fo:block>  
					</fo:table-cell>   
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL"> 
						<fo:block>0-4-1</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC"> 
						<fo:block space-after="5mm">
							Funcionário autorizado  
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTR"> 
						<fo:block></fo:block>  
					</fo:table-cell>   
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell border-top="solid black 0.5pt" number-columns-spanned="3">  
						<fo:block></fo:block>  
					</fo:table-cell>   
				</fo:table-row>         
			</fo:table-body>  
		</fo:table>      
		<fo:table table-layout="fixed" border-collapse="separate" space-before="5mm" keep-together.within-page="always">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="53mm"></fo:table-column>         
			<fo:table-column column-width="105mm"></fo:table-column>         
			<fo:table-body>   
				<fo:table-row>
					<fo:table-cell font-size="10pt" vertical-align="top" padding="1.5pt" number-columns-spanned="3">
						<fo:block text-align="center" padding-after="5mm">  
							<fo:inline font-weight="bold">  
								RESERVADO PARA A SECRETARIA INTERNACIONAL   
							</fo:inline>  
						</fo:block>   
					</fo:table-cell>
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL"> 
						<fo:block space-after="5mm">
							<fo:inline font-weight="bold">0-5</fo:inline> 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC"> 
						<fo:block padding-left="4mm"> 
							<fo:inline font-weight="bold">
								Data de recepção deste formulário na Secretaria Internacional: 
							</fo:inline> 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTR"> 
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:variable name="bio_software_name">
									<xsl:choose>
										<xsl:when test="$bio_doc != ''">
											<xsl:value-of select="normalize-space( document($bio_doc)/processing-instruction('software_name') )"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>
											<xsl:value-of select="normalize-space( /processing-instruction('software_name') )"></xsl:value-of>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:variable>
								<xsl:call-template name="format_date">
									<xsl:with-param name="date">
										<xsl:choose>
											<xsl:when test="$bio_software_name = 'ePCT-Filing' and translate(/*/@ro,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ') = 'IB'">
												<xsl:value-of select="document($rrri_doc)//date-of-actual-receipt/date"></xsl:value-of>
											</xsl:when>
											<xsl:when test="$bio_software_name = 'ePCT' and $bio_doc != ''">
												<xsl:value-of select="document($bio_doc)/processing-instruction('received_by_ib_on')"></xsl:value-of>
											</xsl:when>
											<xsl:when test="$bio_software_name = 'ePCT'">
												<xsl:value-of select="/processing-instruction('received_by_ib_on')"></xsl:value-of>
											</xsl:when>
										</xsl:choose>
									</xsl:with-param>
									<xsl:with-param name="lang" select="$lang"></xsl:with-param>
									<xsl:with-param name="text" select="1"></xsl:with-param>
									<xsl:with-param name="show_date" select="1"></xsl:with-param>
									<xsl:with-param name="date_too" select="1"></xsl:with-param>
								</xsl:call-template>
							</fo:inline>
						</fo:block>
					</fo:table-cell>   
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL"> 
						<fo:block>0-5-1</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC"> 
						<fo:block space-after="5mm">
							Funcionário autorizado  
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTR"> 
						<fo:block></fo:block>  
					</fo:table-cell>   
				</fo:table-row>   
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdBL"> 
						<fo:block></fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdBC"> 
						<fo:block padding-left="4mm"></fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdBR"> 
						<fo:block></fo:block>  
					</fo:table-cell>   
				</fo:table-row>         
			</fo:table-body>  
		</fo:table>     
	</xsl:template><xsl:template name="disp_received_with_ia">
		<xsl:variable name="bio_software_name">
			<xsl:choose>
				<xsl:when test="$bio_doc != ''">
					<xsl:value-of select="normalize-space( document($bio_doc)/processing-instruction('software_name') )"></xsl:value-of>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="normalize-space( /processing-instruction('software_name') )"></xsl:value-of>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:variable name="yes_or_no_or_none">
			<xsl:choose>
				<xsl:when test="$bio_software_name = 'ePCT-Filing'">yes</xsl:when>
				<xsl:when test="$bio_software_name = 'ePCT'">no</xsl:when>
			</xsl:choose>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$yes_or_no_or_none='yes'">
				sim
			</xsl:when>
			<xsl:when test="$yes_or_no_or_none='no'">
				não
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="power_of_attorney">
		<xsl:choose>
			<xsl:when test="$power_doc != ''">
				<xsl:for-each select="document($power_doc)/*">
					<xsl:choose>
						<xsl:when test="document($power_doc)//doc-page">
							<xsl:for-each select="document($power_doc)//doc-page">
								<xsl:apply-templates select="."></xsl:apply-templates>
							</xsl:for-each>
						</xsl:when>
						<xsl:otherwise>
							<xsl:call-template name="process_power"></xsl:call-template>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>
			</xsl:when>
			<!-- when no fee parameter (e.g., power-of-attorney document) -->
			<xsl:otherwise>
				<xsl:choose>
					<xsl:when test="./doc-page">
						<xsl:for-each select="./doc-page">
							<xsl:apply-templates select="doc-page"></xsl:apply-templates>
						</xsl:for-each>
					</xsl:when>
					<xsl:otherwise>
						<xsl:call-template name="process_power"></xsl:call-template>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="process_power">
		<fo:table table-layout="fixed" border-collapse="separate">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">0-1</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Procuração PCT (em relação a um pedido internacional apresentado ao abrigo do Tratado de Cooperação em Matéria de Patentes) (PCT Regra 90.4) 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>0-1-1</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							Preparado Utilizando 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:value-of select="$software_name"></xsl:value-of>
								<fo:block></fo:block>
								<xsl:value-of select="$software_version"></xsl:value-of>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<fo:table table-layout="fixed" border-collapse="separate" space-before="5mm" space-after="5mm">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								O(s) requerente(s) abaixo-assinado(s) 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<xsl:for-each select=".//signatory">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_name">
										<xsl:with-param name="name_arg" select="."></xsl:with-param>
									</xsl:call-template>
									<xsl:if test="following-sibling::signatory">
										<xsl:text>; </xsl:text>
									</xsl:if>
								</fo:inline>
							</xsl:for-each>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:for-each select=".//attorney-or-agent">
					<xsl:variable name="agent_seq" select="position()"></xsl:variable>
					<fo:table-row keep-together.within-page="always">
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>
								<fo:inline font-weight="bold">1-1-<xsl:value-of select="$agent_seq"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								<fo:inline font-weight="bold">
									designa(m) por este meio a seguinte pessoa 
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<xsl:choose>
								<xsl:when test="$lang = 'ja' or $lang ='ko' or $lang = 'zh' or $lang ='ru' or $lang = 'ar'">
									<fo:block font-weight="bold">
										<xsl:if test="./addressbook[@lang != 'en']">
											<fo:block>
												<xsl:call-template name="format_name">
													<xsl:with-param name="name_arg" select="./addressbook[@lang != 'en']"></xsl:with-param>
												</xsl:call-template>
											</fo:block>
										</xsl:if>
										<fo:block>
											<xsl:call-template name="format_name">
												<xsl:with-param name="name_arg" select="./addressbook[@lang ='en']"></xsl:with-param>
											</xsl:call-template>
										</fo:block>
									</fo:block>
									<xsl:if test="./addressbook[@lang != 'en']/address">
										<fo:block font-weight="bold" padding-top="5mm">
											<xsl:choose>
												<xsl:when test="./addressbook/@lang = 'ja'">
													<xsl:call-template name="showJaAddress"></xsl:call-template>
												</xsl:when>
												<xsl:when test="./addressbook/@lang = 'zh'">
													<xsl:call-template name="showZhAddress"></xsl:call-template>
												</xsl:when>
												<xsl:when test="./addressbook/@lang = 'ko'">
													<xsl:call-template name="showKoAddress"></xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="showAddress"></xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</xsl:if>
									<xsl:if test="./addressbook[@lang = 'en']/address">
										<fo:block font-weight="bold" padding-top="3mm">
											<xsl:call-template name="showEnAddress"></xsl:call-template>
										</fo:block>
									</xsl:if>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:call-template name="format_name">
												<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
											</xsl:call-template>
											<fo:block></fo:block>
											<xsl:if test="./addressbook[1]/address">
												<xsl:choose>
													<xsl:when test="$lang='ja'">
														<xsl:call-template name="showJaAddress"></xsl:call-template>
													</xsl:when>
													<xsl:when test="$lang='zh'">
														<xsl:call-template name="showZhAddress"></xsl:call-template>
													</xsl:when>
													<xsl:when test="$lang='ko'">
														<xsl:call-template name="showKoAddress"></xsl:call-template>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="showAddress"></xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</xsl:if>
										</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:for-each>
				<!-- TODO: display info for additional agents?  See PCT-Easy output (doesn't allow multiple 'rep-type's)-->
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-2</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								na qualidade de 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//attorney-or-agent[1]/@rep-type='agent'">
										Mandatário 
									</xsl:when>
									<xsl:when test=".//attorney-or-agent[1]/@rep-type='attorney'">
										Mandatário 
									</xsl:when>
									<xsl:when test=".//attorney-or-agent[1]/@rep-type='common-representative'">
										Representante comum 
									</xsl:when>
									<xsl:otherwise>
										<xsl:value-of select=".//attorney-or-agent[1]/@rep-type"></xsl:value-of>
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-3</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								para representar o abaixo-assinado perante 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test="name(.//represent-before/*)='all-authorities'">
										todas as Autoridades Internacionais competentes 
									</xsl:when>
									<xsl:when test="name(.//represent-before/*)='isa-only'">
										únicamente a Autoridade Responsável pela Pesquisa Internacional 
									</xsl:when>
									<xsl:when test="name(.//represent-before/*)='ipea-only'">
										únicamente a Autoridade Responsável pelo Exame Preliminar Internacional 
									</xsl:when>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-4</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								em relação ao pedido internacional abaixo indicado: 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-4-1</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block start-indent="4mm">
							<fo:inline font-weight="bold">
								Título da invenção 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:apply-templates select="./invention-title"></xsl:apply-templates>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-4-2</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block start-indent="4mm">
							<fo:inline font-weight="bold">
								Referência do processo do requerente ou do mandatário 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:value-of select=".//file-reference-id"></xsl:value-of>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-4-3</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block start-indent="4mm">
							<fo:inline font-weight="bold">
								Número do Pedido Internacional (se já estiver disponível)
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:value-of select=".//doc-number"></xsl:value-of>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">1-4-4</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block start-indent="4mm">
							<fo:inline font-weight="bold">
								apresentado no seguinte Organismo, na qualidade de Organismo receptor 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>                        
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test="$lang='ar'">
										<fo:bidi-override unicode-bidi="embed" direction="rtl">
											<xsl:call-template name="officeName_ChoiceText">
												<xsl:with-param name="office" select=".//ro"></xsl:with-param>
											</xsl:call-template>
										</fo:bidi-override>
									</xsl:when>
									<xsl:otherwise>
										<xsl:call-template name="officeName_ChoiceText">
											<xsl:with-param name="office" select=".//ro"></xsl:with-param>
										</xsl:call-template>											
									</xsl:otherwise>
								</xsl:choose>
								<fo:inline keep-together.within-line="always">
									<xsl:text>(RO/</xsl:text>
									<xsl:value-of select="translate(.//ro,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
									<xsl:text>)</xsl:text>
								</fo:inline>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">1-5</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							<fo:inline font-weight="bold">
								e fazer ou receber pagamentos em nome do abaixo assinado 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR">
						<fo:block>
							<!--fo:inline font-weight = "bold">                        
								<xsl:value-of select = ".//payor/@role"/>                     
							</fo:inline-->
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<xsl:for-each select=".//signatory">
			<xsl:call-template name="signatory">
				<xsl:with-param name="sig_seq" select="position()"></xsl:with-param>
				<xsl:with-param name="box" select="2"></xsl:with-param>
				<xsl:with-param name="sig_type">applicant</xsl:with-param>
			</xsl:call-template>
		</xsl:for-each>
		<fo:table table-layout="fixed" border-collapse="separate">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">3</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block padding-right="3mm">
							<fo:inline font-weight="bold">
								Data 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:call-template name="format_date">
									<xsl:with-param name="lang" select="$lang"></xsl:with-param>
									<xsl:with-param name="date" select=".//electronic-signature/@date"></xsl:with-param>
									<xsl:with-param name="show_date" select="1"></xsl:with-param>
									<xsl:with-param name="text" select="1"></xsl:with-param>
									<xsl:with-param name="date_too" select="1"></xsl:with-param>
								</xsl:call-template>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template match="applicant[@sequence='1']">
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">         
			<fo:table-column column-width="12mm"></fo:table-column>         
			<fo:table-column column-width="53mm"></fo:table-column>         
			<fo:table-column column-width="105mm"></fo:table-column>  
			<fo:table-body>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>  
							<fo:inline font-weight="bold">
								<xsl:text>II</xsl:text>  
							</fo:inline>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>  
							<fo:inline font-weight="bold">
								Requerente   
							</fo:inline>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
						<fo:block></fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>  
							<xsl:text>II-1</xsl:text>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>  
							Esta pessoa é: 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">  
							<fo:inline font-weight="bold">  
								<xsl:call-template name="applicantType_ChoiceText">
									<xsl:with-param name="app-type" select="@app-type"></xsl:with-param>  
								</xsl:call-template>  
								<xsl:if test="$lang='ru' or $lang='ja' or $lang='zh' or $lang='ko'">(<xsl:call-template name="applicantTypeEn_ChoiceText">
										<xsl:with-param name="app-type" select="@app-type"></xsl:with-param>
									</xsl:call-template>)</xsl:if>  
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<xsl:for-each select="./us-rights">  
					<fo:table-row>
						<fo:table-cell>  
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block></fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test="$lang='ja'">
											<!-- NOTE: order should be name deceased_Text @to-dead-inventor @kind -->
											<xsl:call-template name="inventorName">
												<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
											</xsl:call-template>
											(falecido/a) 
											<xsl:call-template name="kind_ChoiceText">
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>                    
											<!-- repeat info in English -->
											<fo:block></fo:block>
											<xsl:choose>
												<xsl:when test="@to-dead-inventor=''">
													(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
												</xsl:when>
												<xsl:otherwise>
													(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
												</xsl:otherwise>
											</xsl:choose>
										</xsl:when>
										<xsl:when test="$lang='ru'">
											<xsl:call-template name="kind_ChoiceText">
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>                    
											da   
											<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
											(falecido/a) 
											<!-- repeat info in English -->
											<fo:block></fo:block>
											<xsl:choose>
												<xsl:when test="@to-dead-inventor=''">
													(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
												</xsl:when>
												<xsl:otherwise>
													(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
												</xsl:otherwise>
											</xsl:choose>
										</xsl:when>
										<xsl:when test="$lang='zh'">					
											<xsl:call-template name="inventorName">	
												<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
											</xsl:call-template>	
												(falecido/a) 
												da 
											<xsl:call-template name="kind_ChoiceText">	
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>	
											<!-- repeat info in English -->	
											<fo:block></fo:block>
											<xsl:choose>
												<xsl:when test="@to-dead-inventor=''">
													(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
												</xsl:when>
												<xsl:otherwise>
													(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
												</xsl:otherwise>
											</xsl:choose>
										</xsl:when>
										<xsl:when test="$lang='ko'">					
											<xsl:call-template name="inventorName">	
												<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
											</xsl:call-template>	
												(falecido/a) 
												da 
											<xsl:call-template name="kind_ChoiceText">	
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>
										</xsl:when>
										<xsl:when test="$lang='en'">		
											<xsl:call-template name="kind_ChoiceText">
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>                    
											da  
											<xsl:choose>
												<xsl:when test="@to-dead-inventor=''">
													<xsl:text>deceased inventor.</xsl:text>
												</xsl:when> 
												<xsl:otherwise>
													<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
													(falecido/a) 
												</xsl:otherwise>
											</xsl:choose>
										</xsl:when>
										<xsl:when test="$lang='de'">		
											<xsl:call-template name="kind_ChoiceText">
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>                    
											von
											<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
											(falecido/a) 
										</xsl:when>										
										<xsl:otherwise>
											<xsl:call-template name="kind_ChoiceText">
												<xsl:with-param name="kind" select="@kind"></xsl:with-param>
											</xsl:call-template>                    
											da   
											<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
											(falecido/a) 
										</xsl:otherwise>										
									</xsl:choose>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:for-each>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>  
							<xsl:text>II-2</xsl:text>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>  
							Requerente para 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">  
							<fo:inline font-weight="bold">
								<xsl:call-template name="designation_ChoiceText">
									<xsl:with-param name="designation" select="."></xsl:with-param>
								</xsl:call-template>            
								<xsl:if test="($lang='ja' or $lang='ru' or $lang='zh' or $lang='ko') and (@designation != 'as-indicated')">(<xsl:call-template name="designationEn_ChoiceText">
										<xsl:with-param name="designation" select="."></xsl:with-param>
									</xsl:call-template>)</xsl:if>
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<!-- II-3 -->
				<xsl:if test="./designated-states-as-inventor//country/text()">
					<fo:table-row>  
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>  
								<xsl:text>II-3</xsl:text>
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>  
								Inventor para 
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">  
								<fo:inline font-weight="bold">
									<!-- do region: (countries); countries -->
									<xsl:for-each select="./designated-states-as-inventor/region">
										<xsl:sort select="."></xsl:sort>
										<xsl:variable name="pos" select="position() +1"></xsl:variable>
										<xsl:value-of select="concat(translate(normalize-space(.),'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ'),': ','(')"></xsl:value-of> 
										<xsl:for-each select="following-sibling::country[not(preceding-sibling::region[$pos])]">
											<xsl:sort select="."></xsl:sort>   
											<xsl:choose>   
												<xsl:when test="text()='ch' or text() = 'CH'">  
													<xsl:text>CH&amp;LI </xsl:text>   
												</xsl:when>   
												<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
												<xsl:otherwise>   
													<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
													<xsl:if test="following-sibling::country[not(preceding-sibling::region[$pos])]">
														<xsl:text> 
														</xsl:text>   
													</xsl:if>   
												</xsl:otherwise>   
											</xsl:choose>
										</xsl:for-each>);<xsl:text> </xsl:text>
									 </xsl:for-each>
									<xsl:for-each select="./designated-states-as-inventor/country[not(preceding-sibling::region)]">
										<xsl:sort select="."></xsl:sort>   
										<xsl:choose>   
											<xsl:when test="text()='ch' or text() = 'CH'">  
												<xsl:text>CH&amp;LI </xsl:text>   
											</xsl:when>   
											<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
											<xsl:otherwise>   
												<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
												<xsl:text> 
												</xsl:text>   
											</xsl:otherwise>   
										</xsl:choose>
									</xsl:for-each>  
								</fo:inline>
							</fo:block>  
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>    
				<!-- if text is all that's entered display that below in II-5 using 'showAddress' -->
				
				<!-- test for multi-language addressbooks (ru, ja, zh, ko only) -->
				<xsl:choose>
					<xsl:when test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">  
						<xsl:if test="not(./addressbook[1]/text)">  
							<!-- first native language, then english -->
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-4</xsl:text>
										<xsl:if test="./addressbook[@lang='en']">
											<xsl:value-of select="$lang"></xsl:value-of>
										</xsl:if>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC"> 
									<fo:block>
										<xsl:call-template name="nameType">
											<xsl:with-param name="nam" select="./addressbook[@lang=$lang]"></xsl:with-param>
										</xsl:call-template> 
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="format_name">  
												<xsl:with-param name="name_arg" select="./addressbook[@lang=$lang]"></xsl:with-param>   
											</xsl:call-template>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>  
							<!-- make sure that there is an English version to display -->
							<xsl:if test="./addressbook[@lang='en']">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>
											<xsl:text>II-4en</xsl:text>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											<xsl:choose>
												<xsl:when test="./addressbook[@lang='en']/name[@name-type='legal']">  
													<xsl:text>Name: </xsl:text>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Name (LAST, First): </xsl:text>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt"> 
											<fo:inline font-weight="bold">   
												<xsl:call-template name="format_name">  
													<xsl:with-param name="name_arg" select="./addressbook[@lang='en']"></xsl:with-param>   
												</xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
							</xsl:if>  
						</xsl:if>
					</xsl:when>
					<!-- application is en, de, es, or fr; only show one addressbook -->
					<xsl:otherwise>  
						<!-- if text is all that's entered display that below in II-5 using 'showAddress' -->
						<xsl:if test="not(./addressbook[1]/text)">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-4</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:call-template name="nameType">
											<xsl:with-param name="nam" select="./addressbook[1]"></xsl:with-param>
										</xsl:call-template>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="format_name">  
												<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>   
											</xsl:call-template>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>  
						</xsl:if> 
					</xsl:otherwise>
				</xsl:choose>
				<!-- test for multi-language addressbooks (ja only) -->
				<xsl:choose>
					<xsl:when test="$lang='ja'">  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<xsl:text>II-5</xsl:text>
									<xsl:if test="./addressbook[@lang='en']">
										<xsl:value-of select="$lang"></xsl:value-of>
									</xsl:if>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Endereço 
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showJaAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>  
						<xsl:if test="./addressbook[@lang='en']">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-5en</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:text>Address: </xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="showEnAddress"></xsl:call-template>   
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>   
						</xsl:if>
					</xsl:when>
					<!-- test for multi-language addressbooks (ru only) -->
					<xsl:when test="$lang='ru'">  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<xsl:text>II-5</xsl:text>
									<xsl:if test="./addressbook[@lang='en']">
										<xsl:value-of select="$lang"></xsl:value-of>
									</xsl:if>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Endereço 
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showNativeAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>  
						<xsl:if test="./addressbook[@lang='en']">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-5en</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:text>Address: </xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="showEnAddress"></xsl:call-template>   
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>   
						</xsl:if>
					</xsl:when>
					<!-- test for multi-language addressbooks (zh only) -->
					<xsl:when test="$lang='zh'">  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<xsl:text>II-5</xsl:text>
									<xsl:if test="./addressbook[@lang='en']">
										<xsl:value-of select="$lang"></xsl:value-of>
									</xsl:if>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Endereço 
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showZhAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>  
						<xsl:if test="./addressbook[@lang='en']">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-5en</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:text>Address </xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="showEnAddress"></xsl:call-template>   
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>   
						</xsl:if>
					</xsl:when>
					<!-- test for multi-language addressbooks (ko only) -->
					<xsl:when test="$lang='ko'">  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<xsl:text>II-5</xsl:text>
									<xsl:if test="./addressbook[@lang='en']">
										<xsl:value-of select="$lang"></xsl:value-of>
									</xsl:if>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Endereço 
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showKoAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>  
						<xsl:if test="./addressbook[@lang='en']">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>II-5en</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:text>Address: </xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:call-template name="showEnAddress"></xsl:call-template>   
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>   
						</xsl:if>
					</xsl:when>
					<!-- application is en, de, es, or fr; only show one addressbook -->
					<xsl:otherwise>  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<xsl:text>II-5</xsl:text>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Endereço 
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>
					</xsl:otherwise>
				</xsl:choose>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>  
							<xsl:text>II-6</xsl:text>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>  
							Nacionalidade (nome do Estado) 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">  
							<fo:inline font-weight="bold">
								<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">
									<xsl:call-template name="country_ChoiceText">
										<xsl:with-param name="country" select="./nationality/country"></xsl:with-param>
									</xsl:call-template>
								</xsl:if>
								<xsl:call-template name="uppercaser">  
									<xsl:with-param name="string" select="./nationality/country"></xsl:with-param>
								</xsl:call-template>  
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>  
							<xsl:text>II-7</xsl:text>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>  
							Domicílio (nome do Estado) 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">  
							<fo:inline font-weight="bold">
								<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">
									<xsl:call-template name="country_ChoiceText">
										<xsl:with-param name="country" select="./residence/country"></xsl:with-param>
									</xsl:call-template>
								</xsl:if>
								<xsl:value-of select="./residence/country"></xsl:value-of>
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="./addressbook[1]/phone">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-8</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								No. de telefone   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select="./addressbook[1]/phone"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test="./addressbook[1]/fax">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-9</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								No. de fax   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select="./addressbook[1]/fax"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test="./addressbook[1]/email">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-10</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Endereço de correio electrónico   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select="./addressbook[1]/email"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test="./addressbook[1]/email/@email-purpose='advance'">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-10(a)</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Autorização relativa ao correio electrónico   
							</fo:block>
							<fo:block>
								O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<fo:block>
										como notificações prévias por via electrónica seguidas de notificações em papel  
									</fo:block>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test="./addressbook[1]/email/@email-purpose='main'">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-10(a)</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Autorização relativa ao correio electrónico   
							</fo:block>
							<fo:block>
								O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<fo:block>
										<xsl:variable name="email-address" select="./addressbook[1]/email[@email-purpose='main']"/>
										<xsl:variable name="matching-pis" select="//node()[self::processing-instruction() and name() = 'communication_attachment' and contains(concat(' ', ., ' '), concat(' ', $email-address, ' '))]"/>
										<xsl:variable name="communication_method" select="substring-after($matching-pis, ' ')"/>
										<xsl:choose>
											<xsl:when test="starts-with($software_name, 'ePCT')">
												<xsl:choose>
													<xsl:when test="$communication_method='epct'">
														ePCT (e-mail com um link para visualizar e baixar o documento no ePCT)
													</xsl:when>
													<xsl:otherwise>
														E-mail (e-mail com anexo em PDF)
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:otherwise>
												exclusively in electronic form (no paper notifications will be sent)
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="./addressbook[1]/registered-number">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>II-11</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								No. do registo do requerente junto do Organismo   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select="./addressbook[1]/registered-number"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template>
	<xsl:template name="other_applicants">    
		<!-- applicant (not first), inventors, deceased inventors -->
		<!-- 20061204 : To avoid xalan2.4.1 bug, the following sentence is separated into 2 lines.
			<xsl:for-each select = ".//applicant[@sequence != '1'] | .//inventor | .//deceased-inventor[@sequence != following-sibling::deceased-inventor[1]/@sequence] | .//deceased-inventor[position() = last()]">
		-->
		<xsl:variable name="tmpQR" select=".//applicant[@sequence != '1'] | .//inventor | .//deceased-inventor[@sequence != following-sibling::deceased-inventor[1]/@sequence] | .//deceased-inventor[position() = last()]"></xsl:variable>
		<xsl:for-each select="$tmpQR">
			<xsl:variable name="seq" select="position()"></xsl:variable>      
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">         
				<fo:table-column column-width="12mm"></fo:table-column>         
				<fo:table-column column-width="53mm"></fo:table-column>         
				<fo:table-column column-width="105mm"></fo:table-column>        
				<fo:table-body>          
					<fo:table-row>            
						<fo:table-cell xsl:use-attribute-sets="tdTL">              
							<fo:block>                
								<fo:inline font-weight="bold">III-<xsl:value-of select="$seq"></xsl:value-of>
								</fo:inline>              
							</fo:block>            
						</fo:table-cell>            
						<fo:table-cell xsl:use-attribute-sets="tdTC">              
							<fo:block>                
								<fo:inline font-weight="bold">                  
									Requerente e/ou inventor                 
								</fo:inline>              
							</fo:block>            
						</fo:table-cell>            
						<fo:table-cell xsl:use-attribute-sets="tdBorderTop">              
							<fo:block></fo:block>            
						</fo:table-cell>          
					</fo:table-row>          
					<fo:table-row>            
						<fo:table-cell xsl:use-attribute-sets="tdL">              
							<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:block>            
						</fo:table-cell>            
						<fo:table-cell xsl:use-attribute-sets="tdC">              
							<fo:block>                
								Esta pessoa é:               
							</fo:block>            
						</fo:table-cell>            
						<fo:table-cell xsl:use-attribute-sets="tdR">              
							<fo:block padding-top="1pt">                
								<fo:inline font-weight="bold">                  
									<xsl:choose>                    
										<xsl:when test="name() = 'applicant'">  
											<xsl:call-template name="applicantType_ChoiceText">
												<xsl:with-param name="app-type" select="@app-type"></xsl:with-param>  
											</xsl:call-template>  
											<xsl:if test="$lang='ru' or $lang='ja' or $lang='zh' or $lang='ko'">(<xsl:call-template name="applicantTypeEn_ChoiceText">
													<xsl:with-param name="app-type" select="@app-type"></xsl:with-param>  	 						 
												</xsl:call-template>)					  </xsl:if>  
										</xsl:when>                    
										<xsl:when test="name() = 'inventor'">                      
											Apenas inventor   
											<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">(inventor only)</xsl:if>                  
										</xsl:when>                    
										<xsl:when test="name()='deceased-inventor'">                
											Apenas inventor (falecido/a)                       
										</xsl:when>                  
									</xsl:choose>                
								</fo:inline>              
							</fo:block>            
						</fo:table-cell>          
					</fo:table-row>          
					<xsl:for-each select="us-rights">            
						<fo:table-row>              
							<fo:table-cell>                
								<fo:block></fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block></fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">
										<xsl:choose>
											<xsl:when test="$lang='ja'">
												<!-- NOTE: order should be name deceased_Text @to-dead-inventor @kind -->
												<xsl:call-template name="inventorName">
													<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
												</xsl:call-template>
												(falecido/a) 
												<xsl:call-template name="kind_ChoiceText">
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>                    
												<!-- repeat info in English -->
												<fo:block></fo:block> 
												<xsl:choose>
													<xsl:when test="@to-dead-inventor=''">
														(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
													</xsl:when>
													<xsl:otherwise>
														(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:when test="$lang='ru'">
												<xsl:call-template name="kind_ChoiceText">
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>                    
												da 
												<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
												(falecido/a) 
												<!-- repeat info in English -->
												<fo:block></fo:block>
												<xsl:choose>
													<xsl:when test="@to-dead-inventor=''">
														(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
													</xsl:when>
													<xsl:otherwise>
														(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:when test="$lang='zh'">
												<xsl:call-template name="inventorName">	
													<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
												</xsl:call-template>	
													(falecido/a) 
													da 
												<xsl:call-template name="kind_ChoiceText">	
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>	
												<!-- repeat info in English -->	
												<fo:block></fo:block>	
												<xsl:choose>
													<xsl:when test="@to-dead-inventor=''">
														(<xsl:value-of select="@kind"></xsl:value-of> of deceased inventor.) 
													</xsl:when>
													<xsl:otherwise>
														(<xsl:value-of select="@kind"></xsl:value-of> of <xsl:value-of select="@to-dead-inventor"></xsl:value-of> (deceased)) 
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:when test="$lang='ko'">
												<xsl:call-template name="inventorName">	
													<xsl:with-param name="name" select="@to-dead-inventor"></xsl:with-param>
												</xsl:call-template>	
													(falecido/a) 
													da 
												<xsl:call-template name="kind_ChoiceText">	
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>
											</xsl:when>
											<xsl:when test="$lang='en'">
												<xsl:call-template name="kind_ChoiceText">
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>                    
												da 
												<xsl:choose>
													<xsl:when test="@to-dead-inventor=''">
														<xsl:text>deceased inventor.</xsl:text>
													</xsl:when> 
													<xsl:otherwise>
														<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
														(falecido/a) 
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:when test="$lang='de'">		
												<xsl:call-template name="kind_ChoiceText">
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>                    
												von
												<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
												(falecido/a) 
											</xsl:when>		
											<xsl:otherwise>
												<xsl:call-template name="kind_ChoiceText">
													<xsl:with-param name="kind" select="@kind"></xsl:with-param>
												</xsl:call-template>                    
												da 
												<xsl:value-of select="@to-dead-inventor"></xsl:value-of>                    
												(falecido/a) 
											</xsl:otherwise>											
										</xsl:choose>
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:for-each>          
          
					<xsl:if test="name() = 'applicant'">
						<fo:table-row>  
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>  
									Requerente para   
								</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">  
									<fo:inline font-weight="bold">
										<xsl:call-template name="designation_ChoiceText">
											<xsl:with-param name="designation" select="."></xsl:with-param>
										</xsl:call-template>
										<xsl:if test="($lang='ja' or $lang='ru' or $lang='zh' or $lang='ko') and (@designation != 'as-indicated')">(<xsl:call-template name="designationEn_ChoiceText">
												<xsl:with-param name="designation" select="."></xsl:with-param>
											</xsl:call-template>)</xsl:if>  
									</fo:inline>
								</fo:block>  
							</fo:table-cell>
						</fo:table-row>        
					</xsl:if> 
					<!-- III-3 Applicant-Inventor -->
					<xsl:if test="./designated-states-as-inventor//country/text()">
						<fo:table-row>  
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>  
									Inventor para 
								</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">  
									<fo:inline font-weight="bold">  
										<!-- do region: (countries); countries -->
										  
										<xsl:for-each select="./designated-states-as-inventor/region">  
											<xsl:sort select="."></xsl:sort>
											<xsl:variable name="pos" select="position() +1"></xsl:variable>
											<xsl:value-of select="concat(translate(normalize-space(.),'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ'),': ','(')"></xsl:value-of> 
											<xsl:for-each select="following-sibling::country[not(preceding-sibling::region[$pos])]">
												<xsl:sort select="."></xsl:sort>   
												<xsl:choose>   
													<xsl:when test="text()='ch' or text() = 'CH'">  
														<xsl:text>CH&amp;LI </xsl:text>   
													</xsl:when>   
													<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
													<xsl:otherwise>   
														<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
														<xsl:if test="following-sibling::country[not(preceding-sibling::region[$pos])]">
															<xsl:text> 
															</xsl:text>   
														</xsl:if>   
													</xsl:otherwise>   
												</xsl:choose>
											</xsl:for-each>);<xsl:text> 
											</xsl:text>
										</xsl:for-each>  
										<xsl:for-each select="./designated-states-as-inventor/country[not(preceding-sibling::region)]">  
											<xsl:sort select="."></xsl:sort>   
											<xsl:choose>   
												<xsl:when test="text()='ch' or text() = 'CH'">  
													<xsl:text>CH&amp;LI </xsl:text>   
												</xsl:when>   
												<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
												<xsl:otherwise>   
													<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
													<xsl:text> 
													</xsl:text>   
												</xsl:otherwise>   
											</xsl:choose>
										</xsl:for-each>  
									</fo:inline>
								</fo:block>  
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>    
					
					<!-- III-3 Inventor-->
					<xsl:if test="name() = 'inventor'">
						<fo:table-row>  
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>  
									Inventor para   
								</fo:block>  
							</fo:table-cell>  
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">  
									<fo:inline font-weight="bold">
										<xsl:call-template name="designation_ChoiceText">
											<xsl:with-param name="designation" select="."></xsl:with-param>
										</xsl:call-template>
										<xsl:if test="($lang='ja' or $lang='ru' or $lang='zh' or $lang='ko') and (@designation != 'as-indicated')">(<xsl:call-template name="designationEn_ChoiceText">
												<xsl:with-param name="designation" select="."></xsl:with-param>
											</xsl:call-template>)</xsl:if>  
									</fo:inline>
								</fo:block>  
							</fo:table-cell>
						</fo:table-row>        
					</xsl:if> 

					<!-- test for multi-language addressbooks (ru, ja, zh, ko only) -->
					<xsl:choose>  
						<xsl:when test="($lang='ja' or $lang='zh' or $lang='ru' or $lang='ko')                            or (name(.) = 'deceased-inventor' and $lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'                              and @sequence != following-sibling::deceased-inventor[1]/@sequence                                            or position() = last() and $lang='ja' or $lang='zh' or $lang='ru')">
							<xsl:if test="not(addressbook[1]/text)">  
								<!-- first native language, then english -->
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>
											<xsl:text>-4</xsl:text>
											<xsl:if test=".//addressbook[@lang='en'] or preceding-sibling::*[1]/@sequence = @sequence">
												<xsl:value-of select="$lang"></xsl:value-of>
											</xsl:if>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											<xsl:choose>
												<xsl:when test="name(.) = 'deceased-inventor'">
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="."></xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook[@lang=$lang]"></xsl:with-param>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">   
												<xsl:choose>
													<xsl:when test="name(.) = 'deceased-inventor'">
														<xsl:choose>
															<xsl:when test="./name">
																<xsl:value-of select="preceding-sibling::deceased-inventor[1][@sequence = @sequence]/name"></xsl:value-of>
															</xsl:when>
															<xsl:otherwise>
																<xsl:call-template name="format_name">  
																	<xsl:with-param name="name_arg" select="preceding-sibling::deceased-inventor[1][@sequence = @sequence][@lang = $lang]"></xsl:with-param>   
																</xsl:call-template>
															</xsl:otherwise>
														</xsl:choose>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="format_name">  
															<xsl:with-param name="name_arg" select="./addressbook[@lang=$lang]"></xsl:with-param>   
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
								<!-- make sure that there is an English version to display -->
								<xsl:if test="addressbook[@lang='en'] or @lang='en'">  
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-4en</fo:block>
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC"> 
											<fo:block>
												<xsl:choose>
													<xsl:when test="./addressbook[@lang='en']/name[@name-type='legal']">  
														<xsl:text>Name: </xsl:text>
													</xsl:when>
													<xsl:otherwise>
														<xsl:text>Name (LAST, First): </xsl:text>
													</xsl:otherwise>
												</xsl:choose>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR"> 
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">   
													<xsl:choose>
														<xsl:when test="name(.)= 'deceased-inventor'">
															<xsl:choose>
																<xsl:when test="./name">
																	<xsl:value-of select="./name"></xsl:value-of>
																</xsl:when>
																<xsl:otherwise>
																	<xsl:call-template name="format_name">  
																		<xsl:with-param name="name_arg" select="."></xsl:with-param>   
																	</xsl:call-template>
																</xsl:otherwise>
															</xsl:choose>
														</xsl:when>
														<xsl:otherwise>
															<xsl:call-template name="format_name">  
																<xsl:with-param name="name_arg" select="./addressbook[@lang='en']"></xsl:with-param>   
															</xsl:call-template>
														</xsl:otherwise>
													</xsl:choose>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>  
								</xsl:if>  
							</xsl:if>  
						</xsl:when>  
						<!-- application is en, de, es, or fr; only show one addressbook -->
						<xsl:otherwise>  
							<!-- if text is all that's entered display that below in III-5 using 'showAddress' -->
							<xsl:if test="not(addressbook[1]/text)">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-4</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											<xsl:choose>
												<xsl:when test="name()='deceased-inventor'">
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="."></xsl:with-param>
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="nameType">
														<xsl:with-param name="nam" select="./addressbook[1]"></xsl:with-param>
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:choose>
													<xsl:when test="name()='deceased-inventor'">  
														<xsl:choose>
															<xsl:when test="./name">
																<xsl:value-of select="./name"></xsl:value-of>
															</xsl:when>
															<xsl:otherwise>
																<xsl:call-template name="format_name">  
																	<xsl:with-param name="name_arg" select="."></xsl:with-param>   
																</xsl:call-template>
															</xsl:otherwise>
														</xsl:choose>
													</xsl:when>
													<xsl:otherwise>   
														<xsl:call-template name="format_name">  
															<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>   
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
							</xsl:if> 
						</xsl:otherwise>
					</xsl:choose>              
					<!-- test for multi-language addressbooks (ja only) -->
					<xsl:if test="name() = 'applicant' or name() = 'inventor'">
						<xsl:choose>
							<xsl:when test="$lang='ja'">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL"> 
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>
											<xsl:text>-5</xsl:text>
											<xsl:if test="./addressbook[@lang='en']">
												<xsl:value-of select="$lang"></xsl:value-of>
											</xsl:if>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											Endereço 
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">  
												<xsl:call-template name="showJaAddress"></xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
								<xsl:if test="./addressbook[@lang='en']">  
									<fo:table-row> 
										<fo:table-cell xsl:use-attribute-sets="tdL"> 
											<fo:block> 	III-<xsl:value-of select="$seq"></xsl:value-of>-5en</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC"> 
											<fo:block>
												<xsl:text>Address: </xsl:text>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR"> 
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">  
													<xsl:call-template name="showEnAddress"></xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>   
								</xsl:if>
							</xsl:when>
							<!-- test for multi-language addressbooks (ru only) -->
							<xsl:when test="$lang='ru'">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL"> 
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>
											<xsl:text>-5</xsl:text>
											<xsl:if test="./addressbook[@lang='en']">
												<xsl:value-of select="$lang"></xsl:value-of>
											</xsl:if>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											Endereço 
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">  
												<xsl:call-template name="showNativeAddress"></xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
								<xsl:if test="./addressbook[@lang='en']">  
									<fo:table-row> 
										<fo:table-cell xsl:use-attribute-sets="tdL"> 
											<fo:block> 	III-<xsl:value-of select="$seq"></xsl:value-of>-5en</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC"> 
											<fo:block>
												<xsl:text>Address: </xsl:text>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR"> 
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">  
													<xsl:call-template name="showEnAddress"></xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>   
								</xsl:if>
							</xsl:when>
							<!-- test for multi-language addressbooks (ko only) -->
							<xsl:when test="$lang='ko'">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL"> 
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>
											<xsl:text>-5</xsl:text>
											<xsl:if test="./addressbook[@lang='en']">
												<xsl:value-of select="$lang"></xsl:value-of>
											</xsl:if>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											Endereço 
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">  
												<xsl:call-template name="showKoAddress"></xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
								<xsl:if test="./addressbook[@lang='en']">  
									<fo:table-row> 
										<fo:table-cell xsl:use-attribute-sets="tdL"> 
											<fo:block> 	III-<xsl:value-of select="$seq"></xsl:value-of>-5en</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC"> 
											<fo:block>
												<xsl:text>Address: </xsl:text>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR"> 
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">  
													<xsl:call-template name="showEnAddress"></xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>   
								</xsl:if>
							</xsl:when>
							<!-- test for multi-language addressbooks (zh only) -->
							<xsl:when test="$lang='zh'">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL"> 
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>
											<xsl:text>-5</xsl:text>
											<xsl:if test="./addressbook[@lang='en']">
												<xsl:value-of select="$lang"></xsl:value-of>
											</xsl:if>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											Endereço 
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">  
												<xsl:call-template name="showZhAddress"></xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
								<xsl:if test="./addressbook[@lang='en']">  
									<fo:table-row> 
										<fo:table-cell xsl:use-attribute-sets="tdL"> 
											<fo:block> 	III-<xsl:value-of select="$seq"></xsl:value-of>-5en</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC"> 
											<fo:block>
												<xsl:text>Address </xsl:text>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR"> 
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">  
													<xsl:call-template name="showEnAddress"></xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>   
								</xsl:if>
							</xsl:when>
							<!-- application is en, de, es, or fr; only show one addressbook -->
							<xsl:otherwise>  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL"> 
										<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-5</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC"> 
										<fo:block>
											Endereço 
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR"> 
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">  
												<xsl:call-template name="showAddress"></xsl:call-template>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>
							</xsl:otherwise>
						</xsl:choose>         
					</xsl:if>          
					<xsl:if test="name() = 'applicant'">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-6</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									Nacionalidade (nome do Estado)                   
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">                  
										<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">
											<xsl:call-template name="country_ChoiceText">
												<xsl:with-param name="country" select="nationality/country"></xsl:with-param>
											</xsl:call-template>
										</xsl:if>
										<xsl:call-template name="uppercaser">                      
											<xsl:with-param name="string" select="nationality/country"></xsl:with-param>                    
										</xsl:call-template>                  
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<xsl:if test="name() = 'applicant'">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-7</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									Domicílio (nome do Estado)                   
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">    
										<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">
											<xsl:call-template name="country_ChoiceText">
												<xsl:with-param name="country" select="residence/country"></xsl:with-param>
											</xsl:call-template>
										</xsl:if>
										<xsl:value-of select="residence/country"></xsl:value-of>                    
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<xsl:if test="addressbook[1]/phone">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-8</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									No. de telefone                 
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">                    
										<xsl:value-of select="addressbook[1]/phone"></xsl:value-of>                  
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<xsl:if test="addressbook[1]/fax">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-9</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									No. de fax                 
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">                    
										<xsl:value-of select="addressbook[1]/fax"></xsl:value-of>                  
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<xsl:if test="addressbook[1]/email">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-10</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									Endereço de correio electrónico                 
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">                    
										<xsl:value-of select="addressbook[1]/email"></xsl:value-of>                  
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<xsl:if test="addressbook[1]/email/@email-purpose='advance'">            
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">  
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-10(a)</fo:block>              
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">  
								<fo:block>
									Autorização relativa ao correio electrónico   
								</fo:block>
								<fo:block>
									O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">  
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">  
										<fo:block>
											como notificações prévias por via electrónica seguidas de notificações em papel  
										</fo:block>
									</fo:inline>  
								</fo:block>
							</fo:table-cell>  
						</fo:table-row>
					</xsl:if>
					<xsl:if test="addressbook[1]/email/@email-purpose='main'">            
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">  
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-10(a)</fo:block>              
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">  
								<fo:block>
									Autorização relativa ao correio electrónico   
								</fo:block>
								<fo:block>
									O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<fo:block>
											<xsl:variable name="email-address" select="./addressbook[1]/email[@email-purpose='main']"/>
											<xsl:variable name="matching-pis" select="//node()[self::processing-instruction() and name() = 'communication_attachment' and contains(concat(' ', ., ' '), concat(' ', $email-address, ' '))]"/>
											<xsl:variable name="communication_method" select="substring-after($matching-pis, ' ')"/>
											<xsl:choose>
												<xsl:when test="starts-with($software_name, 'ePCT')">
													<xsl:choose>
														<xsl:when test="$communication_method='epct'">
															ePCT (e-mail com um link para visualizar e baixar o documento no ePCT)
														</xsl:when>
														<xsl:otherwise>
															E-mail (e-mail com anexo em PDF)
														</xsl:otherwise>
													</xsl:choose>
												</xsl:when>
												<xsl:otherwise>
													exclusively in electronic form (no paper notifications will be sent)
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test="addressbook[1]/registered-number">            
						<fo:table-row>              
							<fo:table-cell xsl:use-attribute-sets="tdL">                
								<fo:block>III-<xsl:value-of select="$seq"></xsl:value-of>-11</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdC">                
								<fo:block>                  
									No. do registo do requerente junto do Organismo                 
								</fo:block>              
							</fo:table-cell>              
							<fo:table-cell xsl:use-attribute-sets="tdR">                
								<fo:block padding-top="1pt">                  
									<fo:inline font-weight="bold">                    
										<xsl:value-of select="addressbook[1]/registered-number"></xsl:value-of>                  
									</fo:inline>                
								</fo:block>              
							</fo:table-cell>            
						</fo:table-row>          
					</xsl:if>          
					<fo:table-row>            
						<fo:table-cell border-top="solid black 0.25pt" number-columns-spanned="3">              
							<fo:block></fo:block>            
						</fo:table-cell>          
					</fo:table-row>        
				</fo:table-body>      
			</fo:table>      
			<!--  end other applicant's info  -->
		</xsl:for-each>  
	</xsl:template>
	<xsl:template name="first_agent">  
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always"> 
			<fo:table-column column-width="12mm"></fo:table-column> 
			<fo:table-column column-width="53mm"></fo:table-column> 
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>  
							<fo:inline font-weight="bold">
								<fo:inline font-weight="bold">IV-1</fo:inline>  
							</fo:inline>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>  
							<fo:inline font-weight="bold">
								Mandatário ou representante comun; ou endereço para a correspondência   
							</fo:inline>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block> 
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>  
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block> 
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>  
							<xsl:choose>
								<xsl:when test=".//agent">
									A pessoa abaixo-identificada é/foi, por este meio, designada para actuar em nome do(s) requerente(s) perante as Autoridades Internacionais competentes, na qualidade de: 
								</xsl:when>
								<xsl:when test=".//correspondence-address">
									
								</xsl:when>
							</xsl:choose>
						</fo:block>  
					</fo:table-cell>  
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block padding-top="1pt">  
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//agent">  
										<xsl:call-template name="agentType_ChoiceText">
											<xsl:with-param name="rep-type" select=".//agent[@sequence='1']/@rep-type"></xsl:with-param>  
										</xsl:call-template>            
										<xsl:if test="$lang='ja' or $lang='ru' or $lang='zh'"> (<xsl:call-template name="agentTypeEn_ChoiceText">
												<xsl:with-param name="rep-type" select=".//agent[@sequence='1']/@rep-type"></xsl:with-param> 
											</xsl:call-template>)</xsl:if>
									</xsl:when>
									<xsl:otherwise>
										Endereço para a correspondência 
											<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">(Address for correspondence)</xsl:if>
									</xsl:otherwise>
								</xsl:choose>  
							</fo:inline>
						</fo:block>  
					</fo:table-cell>
				</fo:table-row>
				<!-- test for multi-language addressbooks (ru, ja, zh, ko only) -->
				<xsl:choose>
					<xsl:when test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">  
						<xsl:if test="not(.//agent[@sequence='1']/addressbook[1]/text)">  
							<!-- first native language, then english -->
							  
							<fo:table-row>  
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IV-1-1</xsl:text>
										<xsl:if test=".//agent[@sequence='1']/addressbook[@lang='en'] or .//correspondence-address/addressbook[@lang='en']">
											<xsl:value-of select="$lang"></xsl:value-of>
										</xsl:if>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:choose>
											<xsl:when test=".//agent[@sequence='1']">
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select=".//agent[@sequence='1']/addressbook[@lang=$lang]"></xsl:with-param>
												</xsl:call-template>
											</xsl:when>
											<xsl:otherwise>
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select=".//correspondence-address/addressbook[@lang=$lang]"></xsl:with-param>
												</xsl:call-template>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:choose>
												<xsl:when test=".//agent[@sequence='1']">
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select=".//agent[@sequence='1']/addressbook[@lang=$lang]"></xsl:with-param>   
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select=".//correspondence-address/addressbook[@lang=$lang]"></xsl:with-param>   
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>  
							<!-- make sure that there is an English version to display -->
							  
							<xsl:if test=".//agent[@sequence='1']/addressbook[@lang='en'] or .//correspondence-address">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>
											<xsl:text>IV-1-1en</xsl:text>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											<xsl:choose>
												<xsl:when test=".//agent[@sequence='1']/addressbook[@lang='en']/name[@name-type='legal'] or .//correspondence-address/addressbook/name[@name-type='legal']">  
													<xsl:text>Name: </xsl:text>
												</xsl:when>
												<xsl:otherwise>
													<xsl:text>Name (LAST, First): </xsl:text>
												</xsl:otherwise>
											</xsl:choose>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">   
												<xsl:choose>
													<xsl:when test=".//agent[@sequence='1']">
														<xsl:call-template name="format_name">  
															<xsl:with-param name="name_arg" select=".//agent[@sequence='1']/addressbook[@lang='en']"></xsl:with-param>   
														</xsl:call-template>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="format_name">  
															<xsl:with-param name="name_arg" select=".//correspondence-address/addressbook[@lang='en']"></xsl:with-param>   
														</xsl:call-template>
													</xsl:otherwise>
												</xsl:choose>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>  
							</xsl:if>
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IV-1-2</xsl:text>
										<xsl:if test=".//agent[@sequence='1']/addressbook[@lang='en'] or .//correspondence-address/addressbook[@lang='en']">
											<xsl:value-of select="$lang"></xsl:value-of>
										</xsl:if>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										Endereço 
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:for-each select=".//agent[@sequence='1'] | .//correspondence-address">  
												<xsl:choose>
													<xsl:when test="$lang='zh'">  
														<xsl:call-template name="showZhAddress"></xsl:call-template>
													</xsl:when>  
													<xsl:when test="$lang='ko'">  
														<xsl:call-template name="showKoAddress"></xsl:call-template>
													</xsl:when>
													<xsl:otherwise>
														<xsl:call-template name="showNativeAddress"></xsl:call-template>   
													</xsl:otherwise>
												</xsl:choose>
											</xsl:for-each>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>  
							<xsl:if test=".//agent[@sequence='1']/addressbook[@lang='en'] or .//correspondence-address/addressbook[@lang='en']">  
								<fo:table-row> 
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>
											<xsl:text>IV-1-2en</xsl:text>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											<xsl:text>Address: </xsl:text>
										</fo:block> 
									</fo:table-cell> 
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">   
												<xsl:for-each select=".//agent[@sequence='1'] | .//correspondence-address">  
													<xsl:call-template name="showEnAddress"></xsl:call-template>   
												</xsl:for-each>
											</fo:inline>
										</fo:block> 
									</fo:table-cell>  
								</fo:table-row>   
							</xsl:if>  
						</xsl:if>
					</xsl:when>
					<!-- application is en, de, es, or fr; only show one addressbook -->
					<xsl:otherwise>  
						<!-- if text is all that's entered display that below in II-5 using 'showAddress' -->
						<xsl:if test="not(.//agent[@sequence='1']/addressbook[1]/text)">  
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IV-1-1</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										<xsl:choose>
											<xsl:when test=".//agent[@sequence='1']">
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select=".//agent[@sequence='1']/addressbook[1]"></xsl:with-param>
												</xsl:call-template>
											</xsl:when>
											<xsl:otherwise>
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select=".//correspondence-address/addressbook[1]"></xsl:with-param>
												</xsl:call-template>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:choose>
												<xsl:when test=".//agent[@sequence='1']">
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select=".//agent[@sequence='1']/addressbook[1]"></xsl:with-param>   
													</xsl:call-template>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select=".//correspondence-address/addressbook[1]"></xsl:with-param>   
													</xsl:call-template>
												</xsl:otherwise>
											</xsl:choose>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>
							<fo:table-row> 
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IV-1-2</xsl:text>
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										Endereço 
									</fo:block> 
								</fo:table-cell> 
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">   
											<xsl:for-each select=".//agent[@sequence='1'] | .//correspondence-address">  
												<xsl:call-template name="showAddress"></xsl:call-template>   
											</xsl:for-each>
										</fo:inline>
									</fo:block> 
								</fo:table-cell>  
							</fo:table-row>  
						</xsl:if> 
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test=".//agent[@sequence='1']//phone | .//correspondence-address//phone">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>IV-1-3</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								No. de telefone   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select=".//agent[@sequence='1']//phone | .//correspondence-address//phone"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//agent[@sequence='1']//fax | .//correspondence-address//fax">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>IV-1-4</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								No. de fax   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select=".//agent[@sequence='1']//fax | .//correspondence-address//fax"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//agent[@sequence='1']//email | .//correspondence-address//email">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>IV-1-5</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Endereço de correio electrónico   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select=".//agent[@sequence='1']//email | .//correspondence-address//email"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//agent[@sequence='1']//email/@email-purpose='advance' or .//correspondence-address//email/@email-purpose='advance'">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>IV-1-5(a)</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Autorização relativa ao correio electrónico   
							</fo:block>
							<fo:block>
								O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<fo:block>
										como notificações prévias por via electrónica seguidas de notificações em papel  
									</fo:block>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//agent[@sequence='1']//email/@email-purpose='main' or .//correspondence-address//email/@email-purpose='main'">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">  
							<fo:block>
								<xsl:text>IV-1-5(a)</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">  
							<fo:block>
								Autorização relativa ao correio electrónico   
							</fo:block>
							<fo:block>
								O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<fo:block>
										<xsl:variable name="email-address" select=".//agent[@sequence='1']//email | .//correspondence-address//email"/>
										<xsl:variable name="matching-pis" select="//node()[self::processing-instruction() and name() = 'communication_attachment' and contains(concat(' ', ., ' '), concat(' ', $email-address, ' '))]"/>
										<xsl:variable name="communication_method" select="substring-after($matching-pis, ' ')"/>
										<xsl:choose>
											<xsl:when test="starts-with($software_name, 'ePCT')">
												<xsl:choose>
													<xsl:when test="$communication_method='epct'">
														ePCT (e-mail com um link para visualizar e baixar o documento no ePCT)
													</xsl:when>
													<xsl:otherwise>
														E-mail (e-mail com anexo em PDF)
													</xsl:otherwise>
												</xsl:choose>
											</xsl:when>
											<xsl:otherwise>
												exclusively in electronic form (no paper notifications will be sent)
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//agent[@sequence='1']//registered-number | .//correspondence-address//registered-number">  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdBL">  
							<fo:block>
								<xsl:text>IV-1-6</xsl:text>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBC">  
							<fo:block>
								No. do registo do requerente junto do Organismo   
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">  
									<xsl:value-of select=".//agent[@sequence='1']//registered-number | .//correspondence-address//registered-number"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row>
				</xsl:if>  
				<fo:table-row>            
					<fo:table-cell border-top="solid black 0.25pt" number-columns-spanned="3">              
						<fo:block></fo:block>            
					</fo:table-cell>          
				</fo:table-row>        
			</fo:table-body>
		</fo:table>  
		<xsl:call-template name="testSameAgent"></xsl:call-template>
	</xsl:template><xsl:template name="testSameAgent">
		<xsl:variable name="firstAdd">
			<xsl:value-of select="concat(.//agent[1]//address-1,',',.//agent[1]//address-2,',',.//agent[1]//address-3,',',.//agent[1]//mailcode,',',.//agent[1]//pobox,',',.//agent[1]//room,',',.//agent[1]//address-floor,',',.//agent[1]//building,',',.//agent[1]//street,',',.//agent[1]//city,',',.//agent[1]//county,',',.//agent[1]//state,',',.//agent[1]//postcode,',',.//agent[1]//country,',',.//agent[1]//phone,',',.//agent[1]//fax,',',.//agent[1]//email)"></xsl:value-of>
		</xsl:variable>
		<xsl:variable name="firstAdd_en">
			<xsl:value-of select="concat(.//agent[1]/addressbook[@lang='en']//address-1,',',.//agent[1]/addressbook[@lang='en']//address-2,',',.//agent[1]/addressbook[@lang='en']//address-3,',',.//agent[1]/addressbook[@lang='en']//mailcode,',',.//agent[1]/addressbook[@lang='en']//pobox,',',.//agent[1]/addressbook[@lang='en']//room,',',.//agent[1]/addressbook[@lang='en']//address-floor,',',.//agent[1]/addressbook[@lang='en']//building,',',.//agent[1]/addressbook[@lang='en']//street,',',.//agent[1]/addressbook[@lang='en']//city,',',.//agent[1]/addressbook[@lang='en']//county,',',.//agent[1]/addressbook[@lang='en']//state,',',.//agent[1]/addressbook[@lang='en']//postcode,',',.//agent[1]/addressbook[@lang='en']//country,',',.//agent[1]/addressbook[@lang='en']//phone,',',.//agent[1]/addressbook[@lang='en']//fax,',',.//agent[1]/addressbook[@lang='en']//email)"></xsl:value-of>
		</xsl:variable>
		<xsl:variable name="difTest">
			<xsl:for-each select=".//agent[@sequence != '1']">
				<xsl:variable name="curAdd">
					<xsl:value-of select="concat(.//address-1,',',.//address-2,',',.//address-3,',',.//mailcode,',',.//pobox,',',.//room,',',.//address-floor,',',.//building,',',.//street,',',.//city,',',.//county,',',.//state,',',.//postcode,',',.//country,',',.//phone,',',.//fax,',',.//email)"></xsl:value-of>
				</xsl:variable>
				<xsl:variable name="curAdd_en">
					<xsl:value-of select="concat(.//addressbook[@lang='en']//address-1,',',.//addressbook[@lang='en']//address-2,',',.//addressbook[@lang='en']//address-3,',',.//addressbook[@lang='en']//mailcode,',',.//addressbook[@lang='en']//pobox,',',.//addressbook[@lang='en']//room,',',.//addressbook[@lang='en']//address-floor,',',.//addressbook[@lang='en']//building,',',.//addressbook[@lang='en']//street,',',.//addressbook[@lang='en']//city,',',.//addressbook[@lang='en']//county,',',.//addressbook[@lang='en']//state,',',.//addressbook[@lang='en']//postcode,',',.//addressbook[@lang='en']//country,',',.//addressbook[@lang='en']//phone,',',.//addressbook[@lang='en']//fax,',',.//addressbook[@lang='en']//email)"></xsl:value-of>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$curAdd=$firstAdd and $curAdd_en=$firstAdd_en">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="contains($difTest,1)">
				<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always"> 
					<fo:table-column column-width="12mm"></fo:table-column> 
					<fo:table-column column-width="53mm"></fo:table-column> 
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">IV-2</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Mandatário(s) adicional 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block>
									<fo:inline font-weight="bold">
										agente(s)  adicional/ais com o mesmo endereço do primeiro mandatário 
										<xsl:if test="$lang='ja' or $lang='ru' or $lang='zh'"> 
											<!-- repeat text in English -->
											<fo:block></fo:block>
											<xsl:text> (additional agent(s) with the same address as first named agent)</xsl:text>
										</xsl:if>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<xsl:call-template name="showSameAgentAddress"></xsl:call-template>
						<fo:table-row>
							<fo:table-cell border-top="solid black 0.25pt" number-columns-spanned="3">  
								<fo:block></fo:block>
							</fo:table-cell>  
						</fo:table-row>
					</fo:table-body>
				</fo:table>
			</xsl:when>
			<!--xsl:otherwise>  
				<xsl:call-template name = "agentType_ChoiceText">
					<xsl:with-param name = "rep-type" select = "@rep-type"/>  
				</xsl:call-template>  
				<xsl:if test = "$lang='ja' or $lang='ru' or $lang='zh'">(<xsl:call-template name = "agentTypeEn_ChoiceText">
						<xsl:with-param name = "rep-type" select = "@rep-type"/> 
					</xsl:call-template>)</xsl:if>
			</xsl:otherwise-->
		</xsl:choose>
	</xsl:template><xsl:template name="showSameAgentAddress">
		<!-- shows names of agents sharing address info -->
		<xsl:variable name="firstAdd">
			<xsl:value-of select="concat(.//agent[1]//address-1,',',.//agent[1]//address-2,',',.//agent[1]//address-3,',',.//agent[1]//mailcode,',',.//agent[1]//pobox,',',.//agent[1]//room,',',.//agent[1]//address-floor,',',.//agent[1]//building,',',.//agent[1]//street,',',.//agent[1]//city,',',.//agent[1]//county,',',.//agent[1]//state,',',.//agent[1]//postcode,',',.//agent[1]//country,',',.//agent[1]//phone,',',.//agent[1]//fax,',',.//agent[1]//email)"></xsl:value-of>
		</xsl:variable>
		<xsl:variable name="firstAdd_en">
			<xsl:value-of select="concat(.//agent[1]/addressbook[@lang='en']//address-1,',',.//agent[1]/addressbook[@lang='en']//address-2,',',.//agent[1]/addressbook[@lang='en']//address-3,',',.//agent[1]/addressbook[@lang='en']//mailcode,',',.//agent[1]/addressbook[@lang='en']//pobox,',',.//agent[1]/addressbook[@lang='en']//room,',',.//agent[1]/addressbook[@lang='en']//address-floor,',',.//agent[1]/addressbook[@lang='en']//building,',',.//agent[1]/addressbook[@lang='en']//street,',',.//agent[1]/addressbook[@lang='en']//city,',',.//agent[1]/addressbook[@lang='en']//county,',',.//agent[1]/addressbook[@lang='en']//state,',',.//agent[1]/addressbook[@lang='en']//postcode,',',.//agent[1]/addressbook[@lang='en']//country,',',.//agent[1]/addressbook[@lang='en']//phone,',',.//agent[1]/addressbook[@lang='en']//fax,',',.//agent[1]/addressbook[@lang='en']//email)"></xsl:value-of>
		</xsl:variable>
		<xsl:choose>
			<xsl:when test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IV-2-1</xsl:text>
							<xsl:value-of select="$lang"></xsl:value-of>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>
							Nome(s) 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:for-each select=".//agent[@sequence != 1][concat(.//address-1,',',              .//address-2,',',              .//address-3,',',              .//mailcode,',',              .//pobox,',',              .//room,',',              .//address-floor,',',              .//building,',',              .//street,',',              .//city,',',              .//county,',',              .//state,',',              .//postcode,',',              .//country,',',              .//phone,',',              .//fax,',',              .//email)=$firstAdd and concat(.//addressbook[@lang='en']//address-1,',',              .//addressbook[@lang='en']//address-2,',',              .//addressbook[@lang='en']//address-3,',',              .//addressbook[@lang='en']//mailcode,',',              .//addressbook[@lang='en']//pobox,',',              .//addressbook[@lang='en']//room,',',              .//addressbook[@lang='en']//address-floor,',',              .//addressbook[@lang='en']//building,',',              .//addressbook[@lang='en']//street,',',              .//addressbook[@lang='en']//city,',',              .//addressbook[@lang='en']//county,',',              .//addressbook[@lang='en']//state,',',              .//addressbook[@lang='en']//postcode,',',              .//addressbook[@lang='en']//country,',',              .//addressbook[@lang='en']//phone,',',              .//addressbook[@lang='en']//fax,',',              .//addressbook[@lang='en']//email)=$firstAdd_en]">
									<xsl:choose>
										<xsl:when test=".//last-name">
											<xsl:value-of select=".//addressbook[@lang = $lang]//last-name"></xsl:value-of>
											<xsl:choose>
												<xsl:when test=".//addressbook[@lang = 'zh']">
													<xsl:text> </xsl:text>            
												</xsl:when>
												<xsl:when test=".//addressbook[@lang = 'ko']">
													<xsl:text></xsl:text>            
												</xsl:when>
												<xsl:when test=".//addressbook[@lang = 'ja']">
													<xsl:text>　</xsl:text>            
												</xsl:when>
												<xsl:otherwise> 
													<xsl:text>, </xsl:text>            
												</xsl:otherwise>
											</xsl:choose>
											<xsl:value-of select=".//addressbook[@lang = $lang]//first-name"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>
											<xsl:value-of select=".//addressbook[@lang = $lang]//name"></xsl:value-of>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:if test=".//registered-number">(<xsl:value-of select=".//registered-number"></xsl:value-of>)</xsl:if>
									<xsl:if test="following-sibling::agent[concat(.//address-1,',',            .//address-2,',',            .//address-3,',',            .//mailcode,',',            .//pobox,',',            .//room,',',            .//address-floor,',',            .//building,',',            .//street,',',            .//city,',',            .//county,',',            .//state,',',            .//postcode,',',            .//country,',',            .//phone,',',            .//fax,',',            .//email) = $firstAdd]">
										<xsl:text>; </xsl:text>
									</xsl:if>
								</xsl:for-each>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IV-2-1en</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>Name(s)</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:for-each select=".//agent[@sequence != 1][concat(.//address-1,',',              .//address-2,',',              .//address-3,',',              .//mailcode,',',              .//pobox,',',              .//room,',',              .//address-floor,',',              .//building,',',              .//street,',',              .//city,',',              .//county,',',              .//state,',',              .//postcode,',',              .//country,',',              .//phone,',',              .//fax,',',              .//email)=$firstAdd and concat(.//addressbook[@lang='en']//address-1,',',              .//addressbook[@lang='en']//address-2,',',              .//addressbook[@lang='en']//address-3,',',              .//addressbook[@lang='en']//mailcode,',',              .//addressbook[@lang='en']//pobox,',',              .//addressbook[@lang='en']//room,',',              .//addressbook[@lang='en']//address-floor,',',              .//addressbook[@lang='en']//building,',',              .//addressbook[@lang='en']//street,',',              .//addressbook[@lang='en']//city,',',              .//addressbook[@lang='en']//county,',',              .//addressbook[@lang='en']//state,',',              .//addressbook[@lang='en']//postcode,',',              .//addressbook[@lang='en']//country,',',              .//addressbook[@lang='en']//phone,',',              .//addressbook[@lang='en']//fax,',',              .//addressbook[@lang='en']//email)=$firstAdd_en]">
									<xsl:choose>
										<xsl:when test=".//addressbook[@lang='en']//last-name">
											<xsl:value-of select=".//addressbook[@lang='en']//last-name"></xsl:value-of>, <xsl:value-of select=".//addressbook[@lang='en']//first-name"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>
											<xsl:value-of select=".//addressbook[@lang = 'en']//name"></xsl:value-of>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:if test=".//registered-number">(<xsl:value-of select=".//registered-number"></xsl:value-of>)</xsl:if>
									<xsl:if test="following-sibling::agent[concat(.//address-1,',',            .//address-2,',',            .//address-3,',',            .//mailcode,',',            .//pobox,',',            .//room,',',            .//address-floor,',',            .//building,',',            .//street,',',            .//city,',',            .//county,',',            .//state,',',            .//postcode,',',            .//country,',',            .//phone,',',            .//fax,',',            .//email) = $firstAdd]">
										<xsl:text>; </xsl:text>
									</xsl:if>
								</xsl:for-each>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</xsl:when>
			<xsl:otherwise>
				<!-- app is in en, de, es, fr; show one name -->
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>IV-2-1</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdC">
						<fo:block>
							Nome(s) 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdR">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:for-each select=".//agent[@sequence != 1][concat(.//address-1,',',              .//address-2,',',              .//address-3,',',              .//mailcode,',',              .//pobox,',',              .//room,',',              .//address-floor,',',              .//building,',',              .//street,',',              .//city,',',              .//county,',',              .//state,',',              .//postcode,',',              .//country,',',              .//phone,',',              .//fax,',',              .//email)=$firstAdd and concat(.//addressbook[@lang='en']//address-1,',',              .//addressbook[@lang='en']//address-2,',',              .//addressbook[@lang='en']//address-3,',',              .//addressbook[@lang='en']//mailcode,',',              .//addressbook[@lang='en']//pobox,',',              .//addressbook[@lang='en']//room,',',              .//addressbook[@lang='en']//address-floor,',',              .//addressbook[@lang='en']//building,',',              .//addressbook[@lang='en']//street,',',              .//addressbook[@lang='en']//city,',',              .//addressbook[@lang='en']//county,',',              .//addressbook[@lang='en']//state,',',              .//addressbook[@lang='en']//postcode,',',              .//addressbook[@lang='en']//country,',',              .//addressbook[@lang='en']//phone,',',              .//addressbook[@lang='en']//fax,',',              .//addressbook[@lang='en']//email)=$firstAdd_en]">
									<xsl:choose>
										<xsl:when test=".//last-name">
											<xsl:value-of select=".//last-name"></xsl:value-of>, <xsl:value-of select=".//first-name"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>
											<xsl:value-of select=".//addressbook//name"></xsl:value-of>
										</xsl:otherwise>
									</xsl:choose>
									<xsl:if test=".//registered-number">(<xsl:value-of select=".//registered-number"></xsl:value-of>)</xsl:if>
									<xsl:if test="following-sibling::agent[concat(.//address-1,',',            .//address-2,',',            .//address-3,',',            .//mailcode,',',            .//pobox,',',            .//room,',',            .//address-floor,',',            .//building,',',            .//street,',',            .//city,',',            .//county,',',            .//state,',',            .//postcode,',',            .//country,',',            .//phone,',',            .//fax,',',            .//email) = $firstAdd]">
										<xsl:text>; </xsl:text>
									</xsl:if>
								</xsl:for-each>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="matter">
		<!-- NOTE: there are many tests for text() nodes, as software implementation includes many empty elements to satisfy content model -->
		
		<!-- NOTE: Japanese and other languages use different markup for matter.  Should be standardized and/or usage made consistent.  This area of the DTD is quite bad -->
		<xsl:param name="matter"></xsl:param>   
		<!-- JA always shows date first -->
		<xsl:if test="./date and $lang='ja'">
			<xsl:call-template name="format_date"> 
				<xsl:with-param name="date" select="./date"></xsl:with-param> 
				<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
				<xsl:with-param name="show_date" select="1"></xsl:with-param> 
				<xsl:with-param name="text" select="1"></xsl:with-param> 
				<xsl:with-param name="date_too" select="1"></xsl:with-param>  
			</xsl:call-template>  
			<xsl:text>付で、</xsl:text>
			<fo:block></fo:block>
		</xsl:if>
		<xsl:if test="./date and $lang='ko'">
			<xsl:call-template name="format_date"> 
				<xsl:with-param name="date" select="./date"></xsl:with-param> 
				<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
				<xsl:with-param name="show_date" select="1"></xsl:with-param> 
				<xsl:with-param name="text" select="1"></xsl:with-param> 
				<xsl:with-param name="date_too" select="1"></xsl:with-param>  
			</xsl:call-template>  
				com data de 
			<fo:block></fo:block>
		</xsl:if>
		<xsl:choose>  
			<xsl:when test="$matter='i'">
				<!-- inventor -->
				<xsl:choose>
					<xsl:when test="$lang='ja'">
						<!-- show address then name in JA (possibly others) -->
						<xsl:if test="./addressbook">
							<xsl:if test="./addressbook//address-1/text()">
								<xsl:choose>
									<xsl:when test="not(./addressbook//country/text())">
										<xsl:value-of select="./addressbook//address-1"></xsl:value-of><fo:block></fo:block>
									</xsl:when>
									<xsl:otherwise>
										<xsl:call-template name="showAddress"></xsl:call-template>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</xsl:if>
						<!-- 2019.09.30 Transliteration address for Declaration 2(i) for non-latin language(added following 4lines) -->
						<xsl:if test=".//addressbook[2][@lang='en']/address">
							<xsl:call-template name="showEnAddress">															
							</xsl:call-template>
						</xsl:if>
						<xsl:if test="./addressbook/name/text()">
							<xsl:text>在住の</xsl:text>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name/text()">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:otherwise>
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:otherwise>
						</xsl:choose>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								<xsl:text>は、</xsl:text>
								<fo:block></fo:block>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$lang='ko'">
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:when>
						</xsl:choose>
						<xsl:if test=".//addressbook/address/*/text()">
							<fo:block></fo:block>
								<xsl:choose>
									<xsl:when test="not(./addressbook//country/text())">
<!-- 2019.05.31 braket removed
										<xsl:text> (</xsl:text>
-->
										<xsl:for-each select=".//addressbook/address/*">
										<xsl:value-of select="."></xsl:value-of>
										</xsl:for-each>
<!-- 2019.05.31 braket removed
										<xsl:text>) </xsl:text>
-->
									</xsl:when>
									<xsl:otherwise>
<!-- 2019.05.31 braket removed
										<xsl:text> (</xsl:text>									
-->
											<xsl:call-template name="showAddress"></xsl:call-template>
<!-- 2019.05.31 braket removed
										<xsl:text>) </xsl:text>
-->
									</xsl:otherwise>
								</xsl:choose>
							<fo:block></fo:block>
						</xsl:if>
						<!-- 2019.09.30 Transliteration address for Declaration 2(i) for non-latin language(added following 4lines) -->
						<xsl:if test=".//addressbook[2][@lang='en']/address">
							<xsl:call-template name="showEnAddress">															
							</xsl:call-template>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$lang='zh'">
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:if test="parent::entitlement-to-be-granted-patent">
									<xsl:call-template name="format_name">   
										<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
									</xsl:call-template>
								</xsl:if>
							</xsl:when>
						</xsl:choose>
						<xsl:if test="parent::entitlement-to-be-granted-patent">
							<xsl:if test=".//addressbook/address/*/text()">
									<xsl:text> 住在</xsl:text>
									<fo:block></fo:block>
									<xsl:choose>
										<xsl:when test="not(./addressbook//country/text())">
											<xsl:for-each select=".//addressbook/address/*">
												<xsl:value-of select="."></xsl:value-of>
											</xsl:for-each>
										</xsl:when>
										<xsl:otherwise>
											<xsl:call-template name="showAddress"></xsl:call-template>
										</xsl:otherwise>
									</xsl:choose>
							</xsl:if>
							<!-- 2019.09.30 Transliteration address for Declaration 2(i) for non-latin language(added following 4lines) -->
							<xsl:if test=".//addressbook[2][@lang='en']/address">
								<xsl:call-template name="showEnAddress">															
								</xsl:call-template>
							</xsl:if>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$lang='ru'">
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:when>
						</xsl:choose>
						<xsl:if test=".//addressbook/address/*/text()">
							<fo:block></fo:block>
							<xsl:choose>
								<xsl:when test="not(./addressbook//country/text())">
									<xsl:for-each select=".//addressbook/address/*">
									<xsl:value-of select="."></xsl:value-of>
								</xsl:for-each>
								</xsl:when>
								<xsl:otherwise>
									<xsl:call-template name="showAddress"></xsl:call-template>
								</xsl:otherwise>
							</xsl:choose>
						</xsl:if>
						<!-- 2019.09.30 Transliteration address for Declaration 2(i) for non-latin language(added following 4lines) -->
						<xsl:if test=".//addressbook[2][@lang='en']/address">
							<xsl:call-template name="showEnAddress">															
							</xsl:call-template>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="$lang='pt'">
						<xsl:text>o facto de </xsl:text>
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:when>
						</xsl:choose>
						<xsl:if test=".//addressbook/address/*/text()">
							<xsl:if test="$lang != 'de'">
								da 
							</xsl:if>
							<fo:block></fo:block>
							<xsl:call-template name="showAddress"></xsl:call-template>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<!-- 2019.09.30 Transliteration address for Declaration 2(i) for non-latin language -->
					<xsl:when test="$lang='ar'">					
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:when>
						</xsl:choose>
						<xsl:if test=".//addressbook/address/*/text()">
							da 
							<fo:block></fo:block>
							<xsl:call-template name="showAddress"></xsl:call-template>
						</xsl:if>
						<xsl:if test=".//addressbook[2][@lang='en']/address">
							<xsl:call-template name="showEnAddress">															
							</xsl:call-template>
						</xsl:if>						
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>	
					</xsl:when>				
					<xsl:otherwise>
						<xsl:choose>
							<xsl:when test="./matter-name[1]/name">
								<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
							</xsl:when>
							<xsl:when test="./addressbook[1]">
								<xsl:call-template name="format_name">   
									<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
								</xsl:call-template>
							</xsl:when>
						</xsl:choose>
						<xsl:if test=".//addressbook/address/*/text()">
							da 
							<fo:block></fo:block>
							<xsl:call-template name="showAddress"></xsl:call-template>
						</xsl:if>
						<xsl:choose>
							<xsl:when test="parent::entitlement-to-claim-priority">
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:when>
							<xsl:otherwise>
								ser o inventor do objecto para o qual se procura protecção mediante este pedido internacional 
							</xsl:otherwise>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$matter='ii'">
				<!-- employer -->
				<xsl:if test="$lang='fr'">
					<!-- same text for is/was in FR version -->
					ter esse direito como patrão do inventor 
				</xsl:if>
				<xsl:if test="$lang='pt'">
					<!-- same text for is/was in FR version -->
					<xsl:text>o facto de </xsl:text>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./matter-name[2]/name and $lang='ja'">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
					<xsl:when test="./addressbook[2] and $lang='ja'">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="parent::entitlement-to-be-granted-patent/name and $lang != 'ja'">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
					<xsl:when test="parent::entitlement-to-claim-priority/name and $lang != 'ja'">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="@tense='was' and not($lang='fr')">
						ter tido esse direito como patrão do inventor 
					</xsl:when>
					<xsl:when test="@tense='is' and not($lang='fr')">
						ter esse direito como patrão do inventor 
					</xsl:when>
					<xsl:when test="@tense='was' and $lang='fr'">
						
					</xsl:when>
					<xsl:when test="@tense='is' and $lang='fr'">
						
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./matter-name[2]/name and $lang = 'ja'">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
					<xsl:when test="./addressbook[2] and $lang = 'ja'">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name and $lang != 'ja'">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
					<xsl:when test="./addressbook[2] and $lang != 'ja'">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang='ja' or $lang='zh' or $lang='ko'">
					<xsl:choose>
						<xsl:when test="@tense='was'">
							
						</xsl:when>
						<xsl:otherwise>
							
						</xsl:otherwise>
					</xsl:choose>
				</xsl:if>
			</xsl:when> 
			<xsl:when test="$matter='iii'">
				<!-- agreement -->
				<xsl:if test="not($lang='ja' or $lang='ko' or $lang='zh')">
					um acordo entre    
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="$lang='ja'">
						<xsl:text>と</xsl:text>
						<fo:block></fo:block>
					</xsl:when>
					<xsl:otherwise>
						e 
					</xsl:otherwise>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="./date and $lang='zh'">
					com data de 
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				<xsl:if test="$lang='zh'">
					um acordo entre    
				</xsl:if>
				<xsl:if test="$lang='ja' or $lang='ko'">
					<fo:block></fo:block>
					um acordo entre    
				</xsl:if>
			</xsl:when>  
			<xsl:when test="$matter='iv'">
				<!-- assignment -->
				<xsl:if test="not($lang='ja' or $lang='ko' or $lang='zh')">
					uma cessão de 
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name/name[1]"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="./date and $lang='zh'">
					com data de 
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				a 
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang='zh'">
					uma cessão de 
				</xsl:if>
				<xsl:if test="$lang='ja' or $lang='ko'">
					<fo:block></fo:block>
					uma cessão de 
				</xsl:if>
			</xsl:when>
			<xsl:when test="$matter='v'">
				<!-- consent -->
				<xsl:if test="not($lang='ja' or $lang='ko' or $lang='zh')">
					uma autorização de 
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="./date and $lang='zh'">
					com data de 
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				em favor de 
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang='zh'">
					uma autorização de 
				</xsl:if>
				<xsl:if test="$lang='ja' or $lang='ko'">
					<fo:block></fo:block>
					uma autorização de 
				</xsl:if>
			</xsl:when>  
			<xsl:when test="$matter='vi'">
				<!-- court order -->
				<xsl:if test="not($lang='ja' or $lang='ko' or $lang='zh')">
					uma decisão de justiça tomada por 
				</xsl:if>
				<xsl:value-of select="./court-name"></xsl:value-of>
				<xsl:if test="$lang='en'">
					<xsl:text>, </xsl:text>
				</xsl:if>
				<xsl:if test="./date and ($lang='zh' or $lang='de')">
					com data de 
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				ordenando uma transferência de 
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="$lang='ru'">
						a 
					</xsl:when>
					<xsl:otherwise>
						para 
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang = 'de'">
					
				</xsl:if>
				<xsl:if test="$lang='ja' or $lang='ko' or $lang='zh'">
					<fo:block></fo:block>
					uma decisão de justiça tomada por 
				</xsl:if>
			</xsl:when>  
			<xsl:when test="$matter='vii'">
				<!-- transfer -->
				<xsl:if test="./date and $lang='zh'">
					com data de 
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				<xsl:choose>
					<xsl:when test="$lang='ja' or $lang='ko'">
						<xsl:value-of select="./kind-of-transfer"></xsl:value-of>
						sob a forma de 
						<fo:block></fo:block>
					</xsl:when>
					<xsl:when test="$lang='zh'">
						sob a forma de 
					</xsl:when>
					<xsl:otherwise>
						uma transferência do direito de 
					</xsl:otherwise>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				para 
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="$lang='ja' or $lang='ko'">
						<fo:block></fo:block>
						uma transferência do direito de 
					</xsl:when>
					<xsl:when test="$lang='zh'">
						uma transferência do direito de 
						<xsl:text>(</xsl:text>
						<xsl:value-of select="./kind-of-transfer"></xsl:value-of>
						<xsl:text>)</xsl:text>
					</xsl:when>
					<xsl:otherwise>
						sob a forma de 
						<xsl:value-of select="./kind-of-transfer"></xsl:value-of>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when>
			<xsl:when test="$matter='viii'">
				<!-- name change -->
				<xsl:if test="./date and $lang='zh'">
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
				</xsl:if>
				a mudança do nome do requerente de 
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:if test="$lang ='de'">
					<xsl:call-template name="format_date"> 
						<xsl:with-param name="date" select="./date"></xsl:with-param> 
						<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
						<xsl:with-param name="show_date" select="1"></xsl:with-param> 
						<xsl:with-param name="text" select="1"></xsl:with-param> 
						<xsl:with-param name="date_too" select="1"></xsl:with-param>  
					</xsl:call-template>  
					von
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[1]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[1]/name">
						<xsl:value-of select="./matter-name[1]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="$lang='zh'">
						em 
					</xsl:when>
					<xsl:when test="$lang='de'">
						in
					</xsl:when>
					<xsl:when test="$lang='fr'">
						en
					</xsl:when>
					<xsl:otherwise>
						para 
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="./addressbook[2]">
						<xsl:call-template name="format_name">   
							<xsl:with-param name="name_arg" select="./addressbook[2]"></xsl:with-param>
						</xsl:call-template>
					</xsl:when>
					<xsl:when test="./matter-name[2]/name">
						<xsl:value-of select="./matter-name[2]/name"></xsl:value-of>
					</xsl:when>
				</xsl:choose>
				<xsl:if test="$lang='ja'">
					<fo:block></fo:block>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="$lang='de'">
						
					</xsl:when>
					<xsl:when test="$lang='zh'"></xsl:when>
					<xsl:when test="$lang='es'">
						
					</xsl:when>
					<xsl:otherwise>
						em 
					</xsl:otherwise>
				</xsl:choose>
			</xsl:when> 
		</xsl:choose>  
		<xsl:if test="./date and not($lang='ja' or $lang='ko' or $lang='zh')">
			<xsl:if test="not($matter='vi' and $lang='de') and not($matter='viii' and $lang='de')">
				<xsl:if test="not($matter='viii')"> 
					<xsl:text>, </xsl:text>
					<xsl:choose>
						<xsl:when test="$lang='ru' and $matter='vi'">
							com data de 
						</xsl:when>
						<xsl:otherwise>
							com data de 
						</xsl:otherwise>
					</xsl:choose>
				</xsl:if>  
				<xsl:call-template name="format_date"> 
					<xsl:with-param name="date" select="./date"></xsl:with-param> 
					<xsl:with-param name="lang" select="$lang"></xsl:with-param> 
					<xsl:with-param name="show_date" select="1"></xsl:with-param> 
					<xsl:with-param name="text" select="1"></xsl:with-param> 
					<xsl:with-param name="date_too" select="1"></xsl:with-param>  
				</xsl:call-template>  
			</xsl:if>
		</xsl:if>
	</xsl:template>
	<xsl:template name="testSameAddress">
		<xsl:param name="seq"></xsl:param>
		<!-- test for multi-language addressbooks (ru, ja, zh, ko only) -->
		<xsl:choose>
			<xsl:when test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">  
				<xsl:if test="not(./addressbook[1]/text)">  
					<!-- first native language, then english -->
					<fo:table-row> 
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>
								<xsl:text>-2</xsl:text>
								<xsl:if test="./addressbook[@lang='en']">
									<xsl:value-of select="$lang"></xsl:value-of>
								</xsl:if>
							</fo:block> 
						</fo:table-cell> 
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Endereço 
							</fo:block> 
						</fo:table-cell> 
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">   
									<xsl:choose>
										<xsl:when test="$lang='zh'">  
											<xsl:call-template name="showZhAddress"></xsl:call-template>
										</xsl:when>  
										<xsl:when test="$lang='ko'">  
											<xsl:call-template name="showKoAddress"></xsl:call-template>
										</xsl:when>
										<xsl:otherwise>
											<xsl:call-template name="showNativeAddress"></xsl:call-template>   
										</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block> 
						</fo:table-cell>  
					</fo:table-row>  
					<xsl:if test="./addressbook[@lang='en']">  
						<fo:table-row> 
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-2en</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									<xsl:text>Address: </xsl:text>
								</fo:block> 
							</fo:table-cell> 
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">   
										<xsl:call-template name="showEnAddress"></xsl:call-template>   
									</fo:inline>
								</fo:block> 
							</fo:table-cell>  
						</fo:table-row>   
					</xsl:if>  
				</xsl:if>
			</xsl:when>
			<!-- application is en, de, es, or fr; only show one addressbook -->
			<xsl:otherwise>  
				<!-- if text is all that's entered display that below in IV-5 using 'showAddress' -->
				<xsl:if test="not(.//agent[@sequence='1']/addressbook[1]/text)">  
					<fo:table-row> 
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block> 
						</fo:table-cell> 
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Endereço 
							</fo:block> 
						</fo:table-cell> 
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">   
									<xsl:call-template name="showAddress"></xsl:call-template>   
								</fo:inline>
							</fo:block> 
						</fo:table-cell>  
					</fo:table-row>  
				</xsl:if> 
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template name="other_agents">
		<!-- get first named agent's info -->
		<xsl:variable name="firstAdd">
			<xsl:value-of select="concat(.//agent[1]//address-1,',',.//agent[1]//address-2,',',.//agent[1]//address-3,',',.//agent[1]//mailcode,',',.//agent[1]//pobox,',',.//agent[1]//room,',',.//agent[1]//address-floor,',',.//agent[1]//building,',',.//agent[1]//street,',',.//agent[1]//city,',',.//agent[1]//county,',',.//agent[1]//state,',',.//agent[1]//postcode,',',.//agent[1]//country,',',.//agent[1]//phone,',',.//agent[1]//fax,',',.//agent[1]//email)"></xsl:value-of>
		</xsl:variable>
		<xsl:variable name="firstAdd_en">
			<xsl:value-of select="concat(.//agent[1]/addressbook[@lang='en']//address-1,',',.//agent[1]/addressbook[@lang='en']//address-2,',',.//agent[1]/addressbook[@lang='en']//address-3,',',.//agent[1]/addressbook[@lang='en']//mailcode,',',.//agent[1]/addressbook[@lang='en']//pobox,',',.//agent[1]/addressbook[@lang='en']//room,',',.//agent[1]/addressbook[@lang='en']//address-floor,',',.//agent[1]/addressbook[@lang='en']//building,',',.//agent[1]/addressbook[@lang='en']//street,',',.//agent[1]/addressbook[@lang='en']//city,',',.//agent[1]/addressbook[@lang='en']//county,',',.//agent[1]/addressbook[@lang='en']//state,',',.//agent[1]/addressbook[@lang='en']//postcode,',',.//agent[1]/addressbook[@lang='en']//country,',',.//agent[1]/addressbook[@lang='en']//phone,',',.//agent[1]/addressbook[@lang='en']//fax,',',.//agent[1]/addressbook[@lang='en']//email)"></xsl:value-of>
		</xsl:variable>
		<!-- compare with each following agent's info -->
		<xsl:variable name="difTest">
			<xsl:for-each select=".//agent[@sequence != '1']">
				<xsl:variable name="curAdd">
					<xsl:value-of select="concat(.//address-1,',',.//address-2,',',.//address-3,',',.//mailcode,',',.//pobox,',',.//room,',',.//address-floor,',',.//building,',',.//street,',',.//city,',',.//county,',',.//state,',',.//postcode,',',.//country,',',.//phone,',',.//fax,',',.//email)"></xsl:value-of>
				</xsl:variable>
				<xsl:variable name="curAdd_en">
					<xsl:value-of select="concat(.//addressbook[@lang='en']//address-1,',',.//addressbook[@lang='en']//address-2,',',.//addressbook[@lang='en']//address-3,',',.//addressbook[@lang='en']//mailcode,',',.//addressbook[@lang='en']//pobox,',',.//addressbook[@lang='en']//room,',',.//addressbook[@lang='en']//address-floor,',',.//addressbook[@lang='en']//building,',',.//addressbook[@lang='en']//street,',',.//addressbook[@lang='en']//city,',',.//addressbook[@lang='en']//county,',',.//addressbook[@lang='en']//state,',',.//addressbook[@lang='en']//postcode,',',.//addressbook[@lang='en']//country,',',.//addressbook[@lang='en']//phone,',',.//addressbook[@lang='en']//fax,',',.//addressbook[@lang='en']//email)"></xsl:value-of>
				</xsl:variable>
				<xsl:choose>
					<xsl:when test="$curAdd=$firstAdd and $curAdd_en=$firstAdd_en">1</xsl:when>
					<xsl:otherwise>0</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:variable>
		<!-- determine what to display in box (e.g, IV-2 or IV-3) -->
		<xsl:variable name="seqtest">
			<xsl:choose>
				<xsl:when test="contains($difTest,'1')">2</xsl:when>
				<xsl:otherwise>1</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:for-each select=".//agent[@sequence != '1'][concat(.//address-1,',',.//address-2,',',.//address-3,',',.//mailcode,',',.//pobox,',',.//room,',',.//address-floor,',',.//building,',',.//street,',',.//city,',',.//county,',',.//state,',',.//postcode,',',.//country,',',.//phone,',',.//fax,',',.//email) != $firstAdd or concat(.//addressbook[@lang='en']//address-1,',',.//addressbook[@lang='en']//address-2,',',.//addressbook[@lang='en']//address-3,',',.//addressbook[@lang='en']//mailcode,',',.//addressbook[@lang='en']//pobox,',',.//addressbook[@lang='en']//room,',',.//addressbook[@lang='en']//address-floor,',',.//addressbook[@lang='en']//building,',',.//addressbook[@lang='en']//street,',',.//addressbook[@lang='en']//city,',',.//addressbook[@lang='en']//county,',',.//addressbook[@lang='en']//state,',',.//addressbook[@lang='en']//postcode,',',.//addressbook[@lang='en']//country,',',.//addressbook[@lang='en']//phone,',',.//addressbook[@lang='en']//fax,',',.//addressbook[@lang='en']//email)!= $firstAdd_en]">
			<xsl:variable name="seq">
				<xsl:value-of select="position() + $seqtest"></xsl:value-of>
			</xsl:variable>
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">         
				<fo:table-column column-width="12mm"></fo:table-column>         
				<fo:table-column column-width="53mm"></fo:table-column>         
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>  
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">  
							<fo:block>
								<fo:inline font-weight="bold">IV-<xsl:value-of select="$seq"></xsl:value-of>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">  
							<fo:block>
								<fo:inline font-weight="bold">  
									Mandatário(s) adicional 
								</fo:inline>  
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">  
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:call-template name="agentType_ChoiceText">
										<xsl:with-param name="rep-type" select="@rep-type"></xsl:with-param>  
									</xsl:call-template>  
									<xsl:if test="$lang='ja' or $lang='ru' or $lang='zh'">(<xsl:call-template name="agentTypeEn_ChoiceText">
											<xsl:with-param name="rep-type" select="@rep-type"></xsl:with-param> 
										</xsl:call-template>)</xsl:if>
								</fo:inline>  
							</fo:block>
						</fo:table-cell>  
					</fo:table-row> 
					<!-- If <addressbook><text> has been used, will have been displayed in Name area above -->
					  
					<xsl:if test="not(./addressbook[1]/text)">
						<!-- test for multi-language addressbooks (ru, ja, zh only) -->
						<xsl:choose>
							<xsl:when test="$lang='ja' or $lang='zh' or $lang='ru' or $lang='ko'">  
								<xsl:if test="not(.//agent[@sequence='1']/addressbook[1]/text)">  
									<!-- first native language, then english -->
									<fo:table-row>  
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>
												<xsl:text>-1</xsl:text>
												<xsl:if test="./addressbook[@lang='en']">
													<xsl:value-of select="$lang"></xsl:value-of>
												</xsl:if>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select="./addressbook[@lang=$lang]"></xsl:with-param>
												</xsl:call-template>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">   
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select="./addressbook[@lang=$lang]"></xsl:with-param>   
													</xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>  
									<!-- make sure that there is an English version to display -->
									<xsl:if test="./addressbook[@lang='en']">  
										<fo:table-row> 
											<fo:table-cell xsl:use-attribute-sets="tdL">
												<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-1en</fo:block> 
											</fo:table-cell> 
											<fo:table-cell xsl:use-attribute-sets="tdC">
												<fo:block>
													<xsl:choose>
														<xsl:when test="./addressbook[@lang='en']/name[@name-type='legal']">  
															<xsl:text>Name: </xsl:text>
														</xsl:when>
														<xsl:otherwise>
															<xsl:text>Name (LAST, First): </xsl:text>
														</xsl:otherwise>
													</xsl:choose>
												</fo:block> 
											</fo:table-cell> 
											<fo:table-cell xsl:use-attribute-sets="tdR">
												<fo:block padding-top="1pt">
													<fo:inline font-weight="bold">   
														<xsl:call-template name="format_name">  
															<xsl:with-param name="name_arg" select="./addressbook[@lang='en']"></xsl:with-param>   
														</xsl:call-template>
													</fo:inline>
												</fo:block> 
											</fo:table-cell>  
										</fo:table-row>  
									</xsl:if>
								</xsl:if>
							</xsl:when>
							<!-- application is en, de, es, or fr; only show one addressbook -->
							<xsl:otherwise>  
								<!-- if text is all that's entered display that below in IV-5 using 'showAddress' -->
								<xsl:if test="not(./addressbook[1]/text)">  
									<fo:table-row> 
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												<xsl:call-template name="nameType">
													<xsl:with-param name="nam" select="./addressbook[1]"></xsl:with-param>
												</xsl:call-template>
											</fo:block> 
										</fo:table-cell> 
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">   
													<xsl:call-template name="format_name">  
														<xsl:with-param name="name_arg" select="./addressbook[1]"></xsl:with-param>   
													</xsl:call-template>
												</fo:inline>
											</fo:block> 
										</fo:table-cell>  
									</fo:table-row>
								</xsl:if> 
							</xsl:otherwise>
						</xsl:choose>  
					</xsl:if>  
					<!-- get address info -->
					  
					<xsl:call-template name="testSameAddress"> 
						<xsl:with-param name="seq" select="$seq"></xsl:with-param>  
					</xsl:call-template>  
					<!--xsl:if test = "addressbook[1]/phone and addressbook[1]/phone/text() != //agent[1]/addressbook[1]/phone/text()"-->
					<fo:table-row>  
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>  
								No. de telefone 
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">  
								<fo:inline font-weight="bold">
									<xsl:value-of select="addressbook[1]/phone"></xsl:value-of>  
								</fo:inline>
							</fo:block>  
						</fo:table-cell>
					</fo:table-row>  
					<!--/xsl:if>  
					<xsl:if test = "addressbook[1]/fax and addressbook[1]/fax/text() != //agent[1]/addressbook[1]/fax/text()"-->
					<fo:table-row>  
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-4</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>  
								No. de fax 
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">  
								<fo:inline font-weight="bold">
									<xsl:value-of select="addressbook[1]/fax"></xsl:value-of>  
								</fo:inline>
							</fo:block>  
						</fo:table-cell>
					</fo:table-row>  
					<!--/xsl:if>  
					<xsl:if test = "addressbook[1]/email and addressbook[1]/email/text() != //agent[1]/addressbook[1]/email/text()"-->
					<fo:table-row>  
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-5</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>  
								Endereço de correio electrónico 
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">  
								<fo:inline font-weight="bold">
									<xsl:value-of select="addressbook[1]/email"></xsl:value-of>  
								</fo:inline>
							</fo:block>  
						</fo:table-cell>
					</fo:table-row>  
					<!--/xsl:if>  
					<xsl:if test = "addressbook[1]/email and addressbook[1]/email/text() != //agent[1]/addressbook[1]/email/text()"-->
					<xsl:if test="addressbook[1]/email/@email-purpose='advance'">            
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">  
								<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-5(a)</fo:block>  
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">  
								<fo:block>
									Autorização relativa ao correio electrónico   
								</fo:block>
								<fo:block>
									O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">  
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">  
										<fo:block>
											como notificações prévias por via electrónica seguidas de notificações em papel  
										</fo:block>
									</fo:inline>  
								</fo:block>
							</fo:table-cell>  
						</fo:table-row>
					</xsl:if>
					<xsl:if test="addressbook[1]/email/@email-purpose='main'">            
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">  
								<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-5(a)</fo:block>  
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">  
								<fo:block>
									Autorização relativa ao correio electrónico   
								</fo:block>
								<fo:block>
									O Organismo receptor, a Autoridade responsável pela pesquisa internacional, a Secretaria Internacional e a Autoridade responsável pelo exame preliminar internacional têm autorização para utilizar este endereço de correio electrónico para enviar, se tal desejarem esses organismos, notificações relativas a este pedido internacional:  
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<fo:block>
											<xsl:variable name="email-address" select="./addressbook[1]/email[@email-purpose='main']"/>
											<xsl:variable name="matching-pis" select="//node()[self::processing-instruction() and name() = 'communication_attachment' and contains(concat(' ', ., ' '), concat(' ', $email-address, ' '))]"/>
											<xsl:variable name="communication_method" select="substring-after($matching-pis, ' ')"/>
											<xsl:choose>
												<xsl:when test="starts-with($software_name, 'ePCT')">
													<xsl:choose>
														<xsl:when test="$communication_method='epct'">
															ePCT (e-mail com um link para visualizar e baixar o documento no ePCT)
														</xsl:when>
														<xsl:otherwise>
															E-mail (e-mail com anexo em PDF)
														</xsl:otherwise>
													</xsl:choose>
												</xsl:when>
												<xsl:otherwise>
													exclusively in electronic form (no paper notifications will be sent)
												</xsl:otherwise>
											</xsl:choose>
										</fo:block>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<!--/xsl:if>  
					<xsl:if test = "addressbook[1]/registered-number and addressbook[1]/registered-number/text() != //agent[1]/addressbook[1]/registered-number/text()"-->
					<fo:table-row>  
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>IV-<xsl:value-of select="$seq"></xsl:value-of>-6</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								No. do registo do requerente junto do Organismo 
							</fo:block>  
						</fo:table-cell>  
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">  
								<fo:inline font-weight="bold">
									<xsl:value-of select="addressbook[1]/registered-number"></xsl:value-of>  
								</fo:inline>
							</fo:block>  
						</fo:table-cell>
					</fo:table-row>  
					<!--/xsl:if-->
					<fo:table-row>  
						<fo:table-cell border-top="solid black 0.25pt" number-columns-spanned="3">
							<fo:block></fo:block>  
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>  
		</xsl:for-each>    
	</xsl:template>
	<xsl:template match="request">
		<xsl:choose>
			<xsl:when test="./doc-page">
				<xsl:apply-templates select="./doc-page"></xsl:apply-templates>
			</xsl:when>
			<xsl:otherwise>
				<xsl:if test="not($officeUse='1')">
					<fo:table table-layout="fixed" border-collapse="separate" padding-bottom="5mm">
						<fo:table-column column-width="12mm"></fo:table-column>
						<fo:table-column column-width="53mm"></fo:table-column>
						<fo:table-column column-width="105mm"></fo:table-column>
						<fo:table-body>
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdTL">
									<fo:block padding-after="1mm">
										<fo:inline font-weight="bold">0</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block padding-after="1mm">
										<fo:inline font-weight="bold">
											Reservado para o Organismo receptor 
										</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
									<fo:block></fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block padding-after="2.5mm">
										<fo:inline font-weight="bold">0-1</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block padding-after="2.5mm">
										Pedido internacional No. 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block>
									<xsl:choose>
										<xsl:when test="document($rrri_doc)//doc-number">
												<fo:inline font-weight="bold">
													<xsl:value-of select="document($rrri_doc)//doc-number"></xsl:value-of>
												</fo:inline>
										</xsl:when>
										<xsl:when test="$ia_number">
												<fo:inline font-weight="bold">
													<xsl:value-of select="$ia_number"></xsl:value-of>
												</fo:inline>
										</xsl:when>
									</xsl:choose>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdTL">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:text>0-2</xsl:text>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block padding-bottom="8mm">
										Data do depósito internacional 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTR">
									<fo:block padding-bottom="5mm">
										<xsl:if test="document($rrri_doc)//document-id/date">
											<fo:inline font-weight="bold">
												<xsl:call-template name="format_date">
													<xsl:with-param name="date" select="document($rrri_doc)//document-id/date"></xsl:with-param>
													<xsl:with-param name="lang" select="$lang"></xsl:with-param>
													<xsl:with-param name="show_date" select="1"></xsl:with-param>
													<xsl:with-param name="text" select="1"></xsl:with-param>
													<xsl:with-param name="date_too" select="1"></xsl:with-param>
												</xsl:call-template>
											</fo:inline>
										</xsl:if>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdTBL">
									<fo:block>
										<fo:inline font-weight="bold">0-3</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTBC">
									<fo:block padding-bottom="5mm">
										Nome do Organismo receptor e “Pedido internacional PCT” 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTBR">
									<fo:block>
										<xsl:if test="$rrri != ''">
										<!--20191008 show office name in full text and added "PCT International Application" for RO/KR-->
											<xsl:choose>
												<xsl:when test="document($rrri_doc)//@ro='KR'">
													<fo:inline font-weight="bold">
														<xsl:call-template name="officeName_ChoiceText">
															<xsl:with-param name="office" select=".//@ro"></xsl:with-param>
														</xsl:call-template>											
													</fo:inline>
													<fo:block></fo:block>
													<fo:inline font-weight="bold">	
														
													</fo:inline>
												</xsl:when>
												<xsl:otherwise>
													<fo:inline font-weight="bold">
														<xsl:text>RO/</xsl:text>
														<xsl:value-of select="document($rrri_doc)//@ro"></xsl:value-of>
													</fo:inline>
												</xsl:otherwise>
											</xsl:choose>
										</xsl:if>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</xsl:if>
				<fo:table table-layout="fixed" border-collapse="separate">
					<fo:table-column column-width="12mm"></fo:table-column>
					<fo:table-column column-width="53mm"></fo:table-column>
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>0-4</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Formulário PCT/RO/101 Requerimento PCT 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block padding-before="1mm">
									<xsl:text>0-4-1</xsl:text>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block padding-before="1mm">
									Preparado Utilizando 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-before="1mm">
									<fo:inline font-weight="bold">
										<xsl:value-of select="$software_name"></xsl:value-of>
										<fo:block></fo:block>
										<xsl:value-of select="$software_version"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>0-5</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftNoCenter" number-columns-spanned="2">
								<fo:block wrap-option="wrap">
									<fo:inline font-weight="bold" padding-bottom="2mm">
										Petição 
									</fo:inline>
								</fo:block>
								<fo:block padding-before="1.5mm">
									<xsl:choose>
										<xsl:when test="./request-petition/text()">
											<xsl:value-of select="./request-petition"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>
											O abaixo assinado solicita que o presente pedido internacional seja processado de acordo com o Tratado de Cooperação em matéria de Patentes
										</xsl:otherwise>
									</xsl:choose>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>0-6</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Organismo receptor (especificado pelo requerente)
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:choose>
											<xsl:when test="$lang='ar'">
												<fo:bidi-override unicode-bidi="embed" direction="rtl">
													<xsl:call-template name="officeName_ChoiceText">
														<xsl:with-param name="office" select=".//@ro"></xsl:with-param>
													</xsl:call-template>
												</fo:bidi-override>
											</xsl:when>
											<xsl:otherwise>
												<xsl:call-template name="officeName_ChoiceText">
													<xsl:with-param name="office" select=".//@ro"></xsl:with-param>
												</xsl:call-template>
											</xsl:otherwise>
										</xsl:choose>
										<fo:inline keep-together.within-line="always">
											<xsl:text>(RO/</xsl:text>
											<xsl:value-of select="translate(.//@ro,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
											<xsl:text>)</xsl:text>
										</fo:inline>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>0-7</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Referência do processo do requerente ou do mandatário 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:value-of select="./file-reference-id"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
								<fo:block></fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>
				<fo:table table-layout="fixed" border-collapse="separate">
					<fo:table-column column-width="12mm"></fo:table-column>
					<fo:table-column column-width="53mm"></fo:table-column>
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTBL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>I</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTBC">
								<fo:block>
									<fo:inline font-weight="bold">
										Título da invenção 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTBR" hyphenate="false">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:apply-templates select="./invention-title"></xsl:apply-templates>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</fo:table-body>
				</fo:table>
				<!-- GET FIRST APPLICANT -->
				<xsl:apply-templates select=".//applicant[@sequence='1']"></xsl:apply-templates>
				<!-- OTHER APPLICANTS/INVENTORS -->
				<xsl:if test=".//inventors | .//applicant[position() &gt; 1] | .//deceased-inventor">
					<xsl:call-template name="other_applicants"></xsl:call-template>
				</xsl:if>
				<!-- FIRST ATTORNEY OR AGENT -->
				<xsl:if test=".//agents | .//correspondence-address">
					<xsl:call-template name="first_agent"></xsl:call-template>
				</xsl:if>
				<!-- OTHER AGENTS -->
				<xsl:if test="count(//agent) &gt; 1">
					<xsl:call-template name="other_agents"></xsl:call-template>
				</xsl:if>
				<xsl:choose>
					<xsl:when test="not($mode='v1.0' or $mode='v1.1')">
						<xsl:apply-templates select="./designation-of-states" mode="v1.2"></xsl:apply-templates>
					</xsl:when>
					<xsl:otherwise>
						<xsl:apply-templates select="./designation-of-states"></xsl:apply-templates>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:choose>
					<xsl:when test="./priority-claims">
						<xsl:call-template name="priority_claims"></xsl:call-template>
					</xsl:when>
					<xsl:otherwise>
						<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
							<fo:table-column column-width="12mm"></fo:table-column>
							<fo:table-column column-width="53mm"></fo:table-column>
							<fo:table-column column-width="105mm"></fo:table-column>
							<fo:table-body>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdTBL">
										<fo:block>
											<fo:inline font-weight="bold">
												<xsl:text>VI-1</xsl:text>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTBC">
										<fo:block>
											<fo:inline font-weight="bold">
												Reivindicação de prioridade 
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTBR">
										<fo:block>
											<fo:inline font-weight="bold">
												NENHUMA(S) 
												<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru'">
													<xsl:text> (NONE)</xsl:text>
												</xsl:if>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
							</fo:table-body>
						</fo:table>
					</xsl:otherwise>
				</xsl:choose>
				<xsl:if test="./search-authority">
					<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
						<fo:table-column column-width="12mm"></fo:table-column>
						<fo:table-column column-width="53mm"></fo:table-column>
						<fo:table-column column-width="105mm"></fo:table-column>
						<fo:table-body>
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdTBL">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:text>VII-1</xsl:text>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTBC">
									<fo:block>
										<fo:inline font-weight="bold">
											Autoridade Responsável pela Pesquisa Internacional Escolhida 
										</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTBR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">
											<xsl:choose>
												<xsl:when test="$lang='ar'">
													<fo:bidi-override unicode-bidi="embed" direction="rtl">
														<xsl:call-template name="officeName_ChoiceText">
															<xsl:with-param name="office" select="./search-authority/isa/country"></xsl:with-param>
														</xsl:call-template>
													</fo:bidi-override>
												</xsl:when>
												<xsl:otherwise>
													<xsl:call-template name="officeName_ChoiceText">
														<xsl:with-param name="office" select="./search-authority/isa/country"></xsl:with-param>
													</xsl:call-template>											
												</xsl:otherwise>
											</xsl:choose>
											<fo:inline keep-together.within-line="always">
												<xsl:text>(ISA/</xsl:text>
												<xsl:value-of select="translate(./search-authority/isa/country,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
												<xsl:text>)</xsl:text>
											</fo:inline>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</fo:table-body>
					</fo:table>
				</xsl:if>
				<xsl:if test=".//earlier-search-request">
					<fo:table table-layout="fixed" border-collapse="separate">
						<fo:table-column column-width="12mm"></fo:table-column>
						<fo:table-column column-width="53mm"></fo:table-column>
						<fo:table-column column-width="105mm"></fo:table-column>
						<fo:table-body>
							<xsl:for-each select=".//earlier-search-request/document-id">
								<xsl:variable name="seq" select="position() + 1"></xsl:variable>
								<xsl:variable name="seq_id" select="position()"></xsl:variable>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdTL">
										<fo:block>
											<fo:inline font-weight="bold">VII-<xsl:value-of select="$seq"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTC">
										<fo:block>
											<fo:inline font-weight="bold">
												Pedido para que se tenha em conta os resultados da(s) pesquisa(s) anterior(es); referência a tal/tais pesquisa(s) 
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTR">
										<fo:block></fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>
											<fo:inline font-weight="bold">VII-<xsl:value-of select="$seq"></xsl:value-of>-1
						  
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											Data do depósito 
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:call-template name="format_date">
													<xsl:with-param name="date" select="normalize-space(date)"></xsl:with-param>
													<xsl:with-param name="show_date" select="1"></xsl:with-param>
													<xsl:with-param name="text" select="1"></xsl:with-param>
													<xsl:with-param name="lang" select="substring(translate(ancestor::request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
													<xsl:with-param name="date_too" select="1"></xsl:with-param>
												</xsl:call-template>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											Número do pedido
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:value-of select="doc-number"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											País (ou Organismo regional) 
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru'">
													<xsl:call-template name="country_ChoiceText">
														<xsl:with-param name="country" select="country"></xsl:with-param>
													</xsl:call-template>
												</xsl:if>
												<xsl:value-of select="country"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<xsl:if test="name(following-sibling::*[position()=1])='substantially-equivalent'">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-4</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												Declaração (Regra 4.12.ii)): 
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block padding-top="1pt">
												<fo:inline font-weight="bold">
													O pedido internacional é o mesmo, ou fundamentalmente o mesmo, que o pedido a respeito do qual foi efectuada a pesquisa anterior excepto, se for caso disso, que está depositado numa língua diferente. 
												</fo:inline>
											</fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<xsl:if test="../earlier-search-documents[$seq_id]/@available-at-isa = 'yes'">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-5</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												Documentos podem ser obtidos pela ISA sob uma forma e de uma maneira aceitáveis para ela, e portanto não é necessário que o requerente os forneça ao Organismo receptor ou à ISA (Regra 12bis.1.c) e d) e 12bis.2.b)):
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<xsl:if test="../earlier-search-documents[$seq_id]/@results-of-earlier-search = 'yes'">
												<fo:block padding-top="1pt">
													<fo:inline font-weight="bold">
														Uma cópia dos resultados da pesquisa anterior  
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@earlier-application = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma cópia do pedido anterior 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@translation-of-earlier-application = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma tradução do pedido anterior numa língua admitida pela ISA 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@translation-of-results-of-earlier-search = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma tradução dos resultados da pesquisa anterior numa língua admitida pela ISA 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@documents-cited-in-earlier-search-results = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma cópia de qualquer documento mencionado nos resultados da pesquisa anterior 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="not(../earlier-search-documents[$seq_id]/@results-of-earlier-search = 'yes' or ../earlier-search-documents[$seq_id]/@earlier-application = 'yes' or ../earlier-search-documents[$seq_id]/@translation-of-earlier-application = 'yes' or ../earlier-search-documents[$seq_id]/@translation-of-results-of-earlier-search = 'yes' or ../earlier-search-documents[$seq_id]/@documents-cited-in-earlier-search-results = 'yes')">
												<fo:block></fo:block>
											</xsl:if>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<xsl:if test="../earlier-search-documents[$seq_id]/@request-ro-to-transmit-to-isa = 'yes'">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-6</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												O requerente solicita que o Organismo receptor prepare e transmita à ISA uma cópia dos resultados de uma pesquisa anterior (Regra 12bis.1.b) e d)).
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<xsl:if test="../earlier-search-documents[$seq_id]/@results-of-earlier-search = 'yes'">
												<fo:block padding-top="1pt">
													<fo:inline font-weight="bold">
														Uma cópia dos resultados da pesquisa anterior  
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@earlier-application = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma cópia do pedido anterior 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="../earlier-search-documents[$seq_id]/@documents-cited-in-earlier-search-results = 'yes'">
												<fo:block padding-top="3pt">
													<fo:inline font-weight="bold">
														Uma cópia de qualquer documento mencionado nos resultados da pesquisa anterior 
													</fo:inline>
												</fo:block>
											</xsl:if>
											<xsl:if test="not(../earlier-search-documents[$seq_id]/@results-of-earlier-search = 'yes' or ../earlier-search-documents[$seq_id]/@earlier-application = 'yes' or ../earlier-search-documents[$seq_id]/@documents-cited-in-earlier-search-results = 'yes')">
												<fo:block></fo:block>
											</xsl:if>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdBL">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdBC">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdBR">
										<fo:block></fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:for-each>
						</fo:table-body>
					</fo:table>
				</xsl:if>
				<xsl:if test=".//earlier-search-authorization">
					<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
						<fo:table-column column-width="12mm"></fo:table-column>
						<fo:table-column column-width="53mm"></fo:table-column>
						<fo:table-column column-width="105mm"></fo:table-column>
						<fo:table-body>
							<xsl:for-each select=".//earlier-search-authorization">
								<xsl:variable name="seq" select="count(/request//earlier-search-request/document-id) + position() + 1"></xsl:variable>
								<xsl:variable name="seq_id" select="position()"></xsl:variable>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdTL">
										<fo:block>
											<fo:inline font-weight="bold">VII-<xsl:value-of select="$seq"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTC" hyphenate="false">
										<fo:block>
											<fo:inline font-weight="bold">
												Utilização dos resultados de uma pesquisa e classificação anteriores
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdTR">
										<fo:block></fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>
											<fo:inline font-weight="bold">VII-<xsl:value-of select="$seq"></xsl:value-of>-1
						  
											</fo:inline>
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											Data do depósito 
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:call-template name="format_date">
													<xsl:with-param name="date" select="normalize-space(./document-id/date)"></xsl:with-param>
													<xsl:with-param name="show_date" select="1"></xsl:with-param>
													<xsl:with-param name="text" select="1"></xsl:with-param>
													<xsl:with-param name="lang" select="substring(translate(ancestor::request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
													<xsl:with-param name="date_too" select="1"></xsl:with-param>
												</xsl:call-template>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											Número do pedido
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:value-of select="./document-id/doc-number"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdL">
										<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdC">
										<fo:block>
											País (ou Organismo regional) 
										</fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdR">
										<fo:block padding-top="1pt">
											<fo:inline font-weight="bold">
												<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru'">
													<xsl:call-template name="country_ChoiceText">
														<xsl:with-param name="country" select="./document-id/country"></xsl:with-param>
													</xsl:call-template>
												</xsl:if>
												<xsl:value-of select="./document-id/country"></xsl:value-of>
											</fo:inline>
										</fo:block>
									</fo:table-cell>
								</fo:table-row>
								<xsl:if test="./@request-ro-not-transmit = 'yes'">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-7</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												O requerente solicita que o Organismo receptor NÃO transmita os resultados da pesquisa anterior à ISA (Regra 23bis.2.e)).
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<xsl:if test="./@applicant-authorizes-ro-transmit = 'yes' and not(starts-with(./document-id/doc-number/text(), 'PCT') or ./document-id/country = 'IB' or ./document-idcountry = 'WO')">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-8</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												O requerente autoriza o Organismo receptor a transmitir os resultados da pesquisa e classificação anteriores à ISA (Regra 23bis.2.e)).
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<xsl:if test="./@applicant-authorizes-ro-transmit = 'yes' and (starts-with(./document-id/doc-number/text(), 'PCT') or ./document-id/country = 'IB' or ./document-idcountry = 'WO')">
									<fo:table-row>
										<fo:table-cell xsl:use-attribute-sets="tdL">
											<fo:block>VII-<xsl:value-of select="$seq"></xsl:value-of>-9</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdC">
											<fo:block>
												O requerente autoriza o Organismo receptor a transmitir os resultados da pesquisa internacional e classificação anteriores à ISA (Regra 23bis.2.a) e Artigo 30.2)a) e 30.3)).
											</fo:block>
										</fo:table-cell>
										<fo:table-cell xsl:use-attribute-sets="tdR">
											<fo:block></fo:block>
										</fo:table-cell>
									</fo:table-row>
								</xsl:if>
								<fo:table-row>
									<fo:table-cell xsl:use-attribute-sets="tdBL">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdBC">
										<fo:block></fo:block>
									</fo:table-cell>
									<fo:table-cell xsl:use-attribute-sets="tdBR">
										<fo:block></fo:block>
									</fo:table-cell>
								</fo:table-row>
							</xsl:for-each>
						</fo:table-body>
					</fo:table>
				</xsl:if>
				<!-- INSERT DECLARATIONS -->
				<xsl:call-template name="declarations"></xsl:call-template>
				<!-- INSERT CHECK LIST -->
				<xsl:call-template name="checklist"></xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template><xsl:template match="designation-of-states">
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>V</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
				<!-- IF ITS A REGIONAL PATENT APP -->
				<xsl:if test=".//designation-pct/regional">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdBL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-1</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								Patente Regional 
								<fo:block></fo:block>
								
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-top="1pt">
								<xsl:for-each select=".//designation-pct/regional">
									<xsl:sort select="."></xsl:sort>
									<xsl:variable name="lookup" select="document('')"></xsl:variable>
									<!-- count of countries making up Org in document instance -->
									<xsl:variable name="countries" select="./country"></xsl:variable>
									<xsl:variable name="docOrgCount" select="count(./country)"></xsl:variable>
									<xsl:variable name="organization" select="./region/country"></xsl:variable>
									<xsl:variable name="org-state" select="$lookup//LU:organization[@name=$organization]"></xsl:variable>
									<!-- count of countries that make up Organization -->
									<xsl:variable name="lookupOrgCount" select="count($org-state/LU:state)"></xsl:variable>
									<fo:inline font-weight="bold">
										<xsl:value-of select="translate(./region/country,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>: 
										<!-- loop through countries in XML document -->
										<xsl:for-each select="./region/following-sibling::country">
											<xsl:call-template name="caseCH"></xsl:call-template>
										</xsl:for-each>
										<xsl:if test="./any-other-state">
											e qualquer outro Estado, o qual é 
											<xsl:choose>
												<xsl:when test="$organization='AP'">
													Estado membro do Protocolo de Harare e 
												</xsl:when>
												<xsl:when test="$organization='EA'">
													Estado membro da Convenção Eurasiática de Patentes e 
												</xsl:when>
												<xsl:when test="$organization='EP'">
													Estado membro da Convenção Europeia de Patentes e 
												</xsl:when>
												<xsl:when test="$organization='OA'">
													Estado membro da OAPI e Estado Contratante 
												</xsl:when>
											</xsl:choose>
											<xsl:text>
											</xsl:text>
											do PCT 
										</xsl:if>
										<!-- test here to show "(except {state code})" if a state 
							  is missing from the organization -->
										<xsl:if test="$docOrgCount != $lookupOrgCount">(excepto 
											<xsl:for-each select="$org-state//LU:state[not(@name=$countries)]">
												<xsl:choose>
													<xsl:when test="@name='ch' or @name = 'CH'">
														<xsl:text>CH&amp;LI</xsl:text>
													</xsl:when>
													<xsl:when test="@name = 'li' or @name = 'LI'"></xsl:when>
													<xsl:otherwise>
														<xsl:value-of select="translate(@name,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>
													</xsl:otherwise>
												</xsl:choose>
												<xsl:if test="not(position()=last())">
													<xsl:text>
													</xsl:text>
												</xsl:if>
											</xsl:for-each>
											<xsl:text>)</xsl:text>
										</xsl:if>
										<xsl:text>
										</xsl:text>
										<xsl:if test=".//protection-request">(
											<xsl:call-template name="kind-of-protection">
												<xsl:with-param name="kind-text">
													<xsl:value-of select=".//protection-request/kind-of-protection"></xsl:value-of>
												</xsl:with-param>
											</xsl:call-template>
										)</xsl:if>
										<xsl:text>
										</xsl:text>
									</fo:inline>
									<fo:block></fo:block>
								</xsl:for-each>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<!-- NATIONAL APP -->
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>V-2</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							Patente Nacional 
							<fo:block></fo:block>
							
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//designation-pct/national">
										<xsl:for-each select=".//designation-pct/national/country | .//designation-pct/new-designation-country">
											<xsl:sort select="."></xsl:sort>
											<!--xsl:for-each select = "."-->
											<xsl:call-template name="caseCH"></xsl:call-template>
											<xsl:if test="name(following-sibling::*)='protection-request'">(
											<xsl:call-template name="kind-of-protection">
													<xsl:with-param name="kind-text">
														<xsl:value-of select="following-sibling::protection-request/kind-of-protection"></xsl:value-of>
													</xsl:with-param>
												</xsl:call-template>											
											)</xsl:if>
										</xsl:for-each>
									</xsl:when>
									<xsl:otherwise>
										<xsl:text>--</xsl:text>
									</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<!-- V-3 -->
				<xsl:if test=".//designation-pct/new-designation-country">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-3</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								Patente Nacional 
								<fo:block></fo:block>
								
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:for-each select=".//designation-pct/new-designation-country">
										<xsl:sort select="."></xsl:sort>
										<xsl:call-template name="uppercaser">
											<xsl:with-param name="string" select="."></xsl:with-param>
										</xsl:call-template>
										<xsl:text>
										</xsl:text>
									</xsl:for-each>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
		<xsl:for-each select=".//regional[child::protection-request] | .//national[child::protection-request]">
			<xsl:variable name="seq" select="position()"></xsl:variable>
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-4</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								<fo:inline font-weight="bold">
									Identificação do pedido de patente aparentado ou da concessão de patente 
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<fo:block>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<fo:inline font-weight="bold"> V-4-<xsl:value-of select="$seq"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								<fo:inline font-weight="bold">
									Designação 
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:value-of select=".//country"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block> V-4-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Tipo de pedido aparentado ou concessão 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:call-template name="kind-of-protection">
										<xsl:with-param name="kind-text">
											<xsl:value-of select=".//kind-of-protection"></xsl:value-of>
										</xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>V-4-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Número do pedido original ou da patente original 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:value-of select=".//doc-number"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdBL">
							<fo:block>   V-4-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBC">
							<fo:block>
								Data do pedido aparentado ou da concessão 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="normalize-space(.//date)"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="lang" select="substring(translate(ancestor::request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:for-each>
		<xsl:if test=".//precautionary-designation-statement">
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-5</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								<fo:inline font-weight="bold">
									
								</fo:inline>
							</fo:block>
							<fo:block padding-before="2mm">
								
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-6</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								<fo:inline font-weight="bold">
									
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test=".//exclusion-from-designation">
											<xsl:for-each select=".//exclusion-from-designation/*">
												<xsl:choose>
													<xsl:when test="name(.)='regional'">
														<xsl:call-template name="uppercaser">
															<xsl:with-param name="string" select="./region/country"></xsl:with-param>
														</xsl:call-template>
														<xsl:text>: </xsl:text>
														<xsl:for-each select="./region/following-sibling::country">(<xsl:call-template name="uppercaser">
																<xsl:with-param name="string" select="."></xsl:with-param>
															</xsl:call-template>
															<xsl:if test="following-sibling::country">
																<xsl:text>
																</xsl:text>
															</xsl:if>);</xsl:for-each>
													</xsl:when>
													<xsl:when test="name(.)='national'">
														<xsl:call-template name="uppercaser">
															<xsl:with-param name="string" select="./country"></xsl:with-param>
														</xsl:call-template>
													</xsl:when>
												</xsl:choose>
											</xsl:for-each>
										</xsl:when>
										<xsl:otherwise>
											NENHUMA(S) 
											<xsl:if test="$lang='ja' or $lang='ru' or $lang='zh'">(NONE) </xsl:if>
										</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.5pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
	</xsl:template><xsl:template match="designation-of-states" mode="v1.2">
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>V</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								DESIGNAÇÕES 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>V-1</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftNoCenter" number-columns-spanned="2">
						<fo:block>
							<fo:inline font-weight="bold">
								O depósito deste requerimento constitui, de acordo com a Regra 4.9.a), a designação de todos os Estados Contratantes vinculados pelo PCT na data do depósito internacional, para os fins da concessão de qualquer tipo de protecção disponível e, se for caso disso, para os fins da concessão tanto de patentes regionais como de patentes nacionais. 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<!--  V-2 EXCLUSIONS (IN 2004 VERSION) -->
				<xsl:if test=".//exclusion-from-designation">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>V-2</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC_hyp">
							<fo:block>
								<fo:inline font-weight="bold">
									<!--inc file = "commonText.xml" toTranslate = "exclusions_Text"/-->
									A casa No V-2 só pode ser utilizada para fins de exclusão (irreversível) das designações em questão se, no momento do depósito, ou posteriormente, de acordo com a Regra 26bis.1, o pedido internacional reivindicar, no Quadro VI, a prioridade de um pedido nacional anterior depositado no Estado em questão, para evitar que esse pedido nacional anterior deixe de produzir efeitos, em virtude da legislação nacional.
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:for-each select=".//exclusion-from-designation/*">
										<xsl:choose>
											<xsl:when test="name(.)='regional'">
												<xsl:call-template name="uppercaser">
													<xsl:with-param name="string" select="./region/country"></xsl:with-param>
												</xsl:call-template>
												<xsl:text>: </xsl:text>
												<xsl:for-each select="./region/following-sibling::country">(<xsl:call-template name="uppercaser">
														<xsl:with-param name="string" select="."></xsl:with-param>
													</xsl:call-template>
													<xsl:if test="following-sibling::country">
														<xsl:text>
														</xsl:text>
													</xsl:if>);</xsl:for-each>
											</xsl:when>
											<xsl:when test="name(.)='national'">
												<xsl:for-each select="./country">
													<xsl:call-template name="uppercaser">
														<xsl:with-param name="string" select="."></xsl:with-param>
													</xsl:call-template>
													<xsl:text>
													</xsl:text>
												</xsl:for-each>
											</xsl:when>
										</xsl:choose>
									</xsl:for-each>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell number-columns-spanned="3" border-top="solid black 0.5pt">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
		<!-- V-3 NATIONAL APP (PROTECTION REQUESTS IN 2004 VERSION) -->
		<xsl:for-each select=".//designation-pct/regional">
			<xsl:if test="./region/country[text()='OA']">
				<xsl:variable name="seq">
					<xsl:value-of select="position()"></xsl:value-of>
				</xsl:variable>
				<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
					<fo:table-column column-width="12mm"></fo:table-column>
					<fo:table-column column-width="53mm"></fo:table-column>
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>V-3</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Identificação do pedido de patente aparentado ou da concessão de patente 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<fo:inline font-weight="bold"> V-3-<xsl:value-of select="$seq"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									<fo:inline font-weight="bold">
										Designação 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:value-of select=".//country"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block> V-3-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Tipo de pedido aparentado ou concessão 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:call-template name="kind-of-protection">
											<xsl:with-param name="kind-text">
												<xsl:value-of select=".//kind-of-protection"></xsl:value-of>
											</xsl:with-param>
										</xsl:call-template>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<xsl:if test=".//doc-number/text()">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>V-3-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										Número do pedido original ou da patente original 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">
											<xsl:value-of select=".//doc-number"></xsl:value-of>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:if>
						<!--xsl:if test = "./designation-pct/regional//date"-->
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdBL">
								<fo:block>V-3-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBC">
								<fo:block>
									Data do pedido aparentado ou da concessão 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBR">
								<fo:block padding-top="1pt">
									<xsl:if test=".//date">
										<fo:inline font-weight="bold">
											<xsl:call-template name="format_date">
												<xsl:with-param name="date" select="normalize-space(.//date)"></xsl:with-param>
												<xsl:with-param name="show_date" select="1"></xsl:with-param>
												<xsl:with-param name="text" select="1"></xsl:with-param>
												<xsl:with-param name="lang" select="substring(translate(ancestor::request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
												<xsl:with-param name="date_too" select="1"></xsl:with-param>
											</xsl:call-template>
										</fo:inline>
									</xsl:if>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<!--/xsl:if-->
					</fo:table-body>
				</fo:table>
			</xsl:if>
		</xsl:for-each>
		<xsl:if test=".//protection-request[not(parent::regional)]">
			<xsl:for-each select=".//protection-request[not(parent::regional)]">
				<xsl:variable name="seq">
					<xsl:choose>
						<xsl:when test="ancestor::national/preceding-sibling::regional/region/country[text()='OA']">
							<xsl:value-of select="position() + count(ancestor::national/preceding-sibling::regional[./region/country[text()='OA']])"></xsl:value-of>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="position()"></xsl:value-of>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:variable>
				<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
					<fo:table-column column-width="12mm"></fo:table-column>
					<fo:table-column column-width="53mm"></fo:table-column>
					<fo:table-column column-width="105mm"></fo:table-column>
					<fo:table-body>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdTL">
								<fo:block>
									<fo:inline font-weight="bold">
										<xsl:text>V-3</xsl:text>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTC">
								<fo:block>
									<fo:inline font-weight="bold">
										Identificação do pedido de patente aparentado ou da concessão de patente 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdTR">
								<fo:block>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>
									<fo:inline font-weight="bold"> V-3-<xsl:value-of select="$seq"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									<fo:inline font-weight="bold">
										Designação 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:value-of select="preceding-sibling::country[1]"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block> V-3-<xsl:value-of select="$seq"></xsl:value-of>-1</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Tipo de pedido aparentado ou concessão 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:call-template name="kind-of-protection">
											<xsl:with-param name="kind-text">
												<xsl:value-of select=".//kind-of-protection"></xsl:value-of>
											</xsl:with-param>
										</xsl:call-template>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<xsl:if test=".//doc-number">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>V-3-<xsl:value-of select="$seq"></xsl:value-of>-2</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdC">
									<fo:block>
										Número do pedido original ou da patente original 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdR">
									<fo:block padding-top="1pt">
										<fo:inline font-weight="bold">
											<xsl:value-of select=".//doc-number"></xsl:value-of>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:if>
						<!--xsl:if test=".//date"-->
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdBL">
								<fo:block>V-3-<xsl:value-of select="$seq"></xsl:value-of>-3</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBC">
								<fo:block>
									Data do pedido aparentado ou da concessão 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdBR">
								<fo:block padding-top="1pt">
									<xsl:if test=".//date">
										<fo:inline font-weight="bold">
											<xsl:call-template name="format_date">
												<xsl:with-param name="date" select="normalize-space(.//date)"></xsl:with-param>
												<xsl:with-param name="show_date" select="1"></xsl:with-param>
												<xsl:with-param name="text" select="1"></xsl:with-param>
												<xsl:with-param name="lang" select="substring(translate(ancestor::request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
												<xsl:with-param name="date_too" select="1"></xsl:with-param>
											</xsl:call-template>
										</fo:inline>
									</xsl:if>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
						<!--/xsl:if-->
					</fo:table-body>
				</fo:table>
			</xsl:for-each>
		</xsl:if>
	</xsl:template><xsl:template name="declarations">
		<!-- creates declarations table in request -->
		<fo:table table-layout="fixed" keep-together.within-page="always">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="52mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>VIII</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Declarações 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRight">
						<fo:block>
							Número de declarações 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								Ficheiro(s) electrónico(s) anexado(s) 
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>VIII-1</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Declaração relativa à identidade do inventor 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//declaration1">
										<xsl:value-of select=".//declaration1/@quantity"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								<xsl:choose>
									<xsl:when test="/processing-instruction('attached_declaration1_quantity') &gt; 0">
										<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold" font-size="12pt" font-family="{$courier_font}">-</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>VIII-2</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Declaração relativa ao direito do requerente, na data do depósito internacional, de pedir e obter uma patente 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//declaration2">
										<xsl:value-of select=".//declaration2/@quantity"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								<xsl:choose>
									<xsl:when test="/processing-instruction('attached_declaration2_quantity') &gt; 0">
										<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold" font-size="12pt" font-family="{$courier_font}">-</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>VIII-3</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Declaração relativa ao direito do requerente, na data do depósito internacional, de reivindicar a prioridade do pedido anterior 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//declaration3">
										<xsl:value-of select=".//declaration3/@quantity"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								<xsl:choose>
									<xsl:when test="/processing-instruction('attached_declaration3_quantity') &gt; 0">
										<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold" font-size="12pt" font-family="{$courier_font}">-</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>VIII-4</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Declaração de autoria da invenção (apenas para os fins da designação dos Estados Unidos da América) 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//declaration4">
										<xsl:value-of select=".//declaration4/@quantity"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								<xsl:choose>
									<xsl:when test="/processing-instruction('attached_declaration4_quantity') &gt; 0">
										<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold" font-size="12pt" font-family="{$courier_font}">-</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdBL">
						<fo:block>
							<xsl:text>VIII-5</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							Declaração relativa a divulgações não prejudiciais ou excepções à falta de novidade 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell border-bottom="solid black 0.5pt" xsl:use-attribute-sets="tdBorderTopRightData">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//declaration5">
										<xsl:value-of select=".//declaration5/@quantity"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>-</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTB" font-size="8pt" vertical-align="top" padding="1pt" text-align="center">
						<fo:block>
							<xsl:if test="/processing-instruction('attached_declaration1_quantity') or&#xA;  												 /processing-instruction('attached_declaration2_quantity') or &#xA;  												 /processing-instruction('attached_declaration3_quantity') or &#xA;  												 /processing-instruction('attached_declaration4_quantity') or &#xA;  												 /processing-instruction('attached_declaration5_quantity')">
								<xsl:choose>
									<xsl:when test="/processing-instruction('attached_declaration5_quantity') &gt; 0">
										<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold" font-size="12pt" font-family="{$courier_font}">-</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<!-- GET INFO FROM DECLARATIONS DOCUMENT(S) IF SUPPLIED AS PARAMETER -->
		<!-- NOTE: $declarations will be a parameter that stores a 
	               document with multiple declarations -->
		<!--fo:block id="declarationSec"/-->
		<xsl:if test="$declarations != ''">
			<xsl:call-template name="declaration_info"></xsl:call-template>
		</xsl:if>
		<xsl:if test="$declaration1 != ''">
			<xsl:call-template name="declaration_1"></xsl:call-template>
		</xsl:if>
		<xsl:if test="$declaration2 != ''">
			<xsl:call-template name="declaration_2"></xsl:call-template>
		</xsl:if>
		<xsl:if test="$declaration3 != ''">
			<xsl:call-template name="declaration_3"></xsl:call-template>
		</xsl:if>
		<xsl:if test="$declaration4 != ''">
			<xsl:call-template name="declaration_4"></xsl:call-template>
		</xsl:if>
		<xsl:if test="$declaration5 != ''">
			<xsl:call-template name="declaration_5"></xsl:call-template>
		</xsl:if>
	</xsl:template><xsl:template name="declaration_info">
		<xsl:call-template name="declaration_1"></xsl:call-template>
		<xsl:call-template name="declaration_2"></xsl:call-template>
		<xsl:call-template name="declaration_3"></xsl:call-template>
		<xsl:call-template name="declaration_4"></xsl:call-template>
		<xsl:call-template name="declaration_5"></xsl:call-template>
	</xsl:template><xsl:template name="declaration_1">
		<xsl:if test="$dec_doc != '' or $dec1_doc != ''">
			<xsl:if test="document($dec_doc)//identity-of-inventor                or document($dec1_doc)//identity-of-inventor">
				<fo:block id="declarationSec"></fo:block>
			</xsl:if>
			<!-- TODO: get page breaking beyond first declaration1 doc working -->
			<xsl:if test="document($dec_doc)//identity-of-inventor                or document($dec1_doc)//identity-of-inventor">
				<xsl:for-each select="document($dec_doc)//identity-of-inventor | document($dec1_doc)//identity-of-inventor">
					<xsl:choose>
						<xsl:when test="./doc-page">
							<xsl:apply-templates select="doc-page"></xsl:apply-templates>
						</xsl:when>
						<xsl:otherwise>
							<fo:block break-before="page"></fo:block>
							<xsl:call-template name="process_dec1"></xsl:call-template>
						</xsl:otherwise>
					</xsl:choose>
				</xsl:for-each>
			</xsl:if>
		</xsl:if>
	</xsl:template><xsl:template name="declaration_2">
		<xsl:if test="(document($dec_doc)//entitlement-to-be-granted-patent      or document($dec2_doc)//entitlement-to-be-granted-patent)">
			<!-- if there is no dec1, insert bookmark here -->
			<xsl:if test="not(document($dec_doc)//identity-of-inventor          or document($dec1_doc)//identity-of-inventor)        and (document($dec_doc)//entitlement-to-be-granted-patent          or document($dec2_doc)//entitlement-to-be-granted-patent)">
				<fo:block id="declarationSec"></fo:block>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$dec_doc != '' or $dec2_doc != ''">
			<xsl:for-each select="document($dec_doc)//entitlement-to-be-granted-patent | document($dec2_doc)//entitlement-to-be-granted-patent">
				<xsl:choose>
					<xsl:when test="./doc-page">
						<xsl:apply-templates select="doc-page"></xsl:apply-templates>
					</xsl:when>
					<xsl:otherwise>
						<fo:block break-before="page">
							<xsl:call-template name="process_dec2"></xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:if>
	</xsl:template><xsl:template name="declaration_3">
		<xsl:if test="(document($dec_doc)//entitlement-to-claim-priority                    or document($dec3_doc)//entitlement-to-claim-priority)">
			<!-- if no prior declarations, insert bookmark here -->
			<xsl:if test="not(document($dec_doc)//identity-of-inventor          or document($dec1_doc)//identity-of-inventor          or document($dec_doc)//entitlement-to-be-granted-patent          or document($dec2_doc)//entitlement-to-be-granted-patent)        and (document($dec_doc)//entitlement-to-claim-priority          or document($dec3_doc)//entitlement-to-claim-priority)">
				<fo:block id="declarationSec"></fo:block>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$dec_doc != '' or $dec3_doc != '' ">
			<xsl:for-each select="document($dec_doc)//entitlement-to-claim-priority | document($dec3_doc)//entitlement-to-claim-priority">
				<xsl:choose>
					<xsl:when test="./doc-page">
						<xsl:apply-templates select="doc-page"></xsl:apply-templates>
					</xsl:when>
					<xsl:otherwise>
						<fo:block break-before="page">
							<xsl:call-template name="process_dec3"></xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:if>
	</xsl:template><xsl:template name="declaration_4">
		<xsl:if test="(document($dec_doc)//inventorship      or document($dec4_doc)//inventorship)">
			<!-- if there is no prior declaration, insert bookmark here -->
			<xsl:if test="not(document($dec_doc)//identity-of-inventor          or document($dec1_doc)//identity-of-inventor          or document($dec_doc)//entitlement-to-be-granted-patent          or document($dec2_doc)//entitlement-to-be-granted-patent          or document($dec_doc)//entitlement-to-claim-priority          or document($dec3_doc)//entitlement-to-claim-priority)        and (document($dec_doc)//inventorship          or document($dec4_doc)//inventorship)">
				<fo:block id="declarationSec"></fo:block>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$dec_doc != '' or $dec4_doc != ''">
			<xsl:for-each select="document($dec_doc)//inventorship | document($dec4_doc)//inventorship">
				<xsl:choose>
					<xsl:when test="./doc-page">
						<xsl:apply-templates select="doc-page"></xsl:apply-templates>
					</xsl:when>
					<xsl:otherwise>
						<fo:block break-before="page">
							<xsl:call-template name="process_dec4"></xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:if>
	</xsl:template><xsl:template name="declaration_5">
		<xsl:if test="(document($dec_doc)//lack-of-novelty                  or document($dec5_doc)//lack-of-novelty)">
			<!-- if there is no prior declaration, insert bookmark here -->
			<xsl:if test="not(document($dec_doc)//identity-of-inventor          or document($dec1_doc)//identity-of-inventor          or document($dec_doc)//entitlement-to-be-granted-patent          or document($dec2_doc)//entitlement-to-be-granted-patent          or document($dec_doc)//entitlement-to-claim-priority          or document($dec3_doc)//entitlement-to-claim-priority          or document($dec_doc)//inventorship          or document($dec4_doc)//inventorship)        and (document($dec_doc)//lack-of-novelty          or document($dec5_doc)//lack-of-novelty)">
				<fo:block id="declarationSec"></fo:block>
			</xsl:if>
		</xsl:if>
		<xsl:if test="$dec_doc != '' or $dec5_doc != ''">
			<xsl:for-each select="document($dec_doc)//lack-of-novelty | document($dec5_doc)//lack-of-novelty">
				<xsl:choose>
					<xsl:when test="./doc-page">
						<xsl:apply-templates select="doc-page"></xsl:apply-templates>
					</xsl:when>
					<xsl:otherwise>
						<fo:block break-before="page">
							<xsl:call-template name="process_dec5">
								<xsl:with-param name="lack_seq" select="position()"></xsl:with-param>
							</xsl:call-template>
						</fo:block>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:for-each>
		</xsl:if>
	</xsl:template><xsl:template name="checklist">
		<fo:table table-layout="fixed" keep-together.within-page="always">
			<xsl:if test="$declarations != '' or $declaration1 != '' or $declaration2 != '' or $declaration3 != '' or $declaration4 != '' or $declaration5 != '' ">
				<xsl:attribute name="break-before">page</xsl:attribute>
			</xsl:if>
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="52mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>IX</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Lista de controle 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC" text-align="center">
						<fo:block>
							Número de folhas 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">
						<fo:block>
							Ficheiro(s) electrónico(s) anexado(s) 
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IX-1</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Requerimento (incluindo as folhas de declaração) 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//cl-request">
										<xsl:value-of select=".//cl-request/@page-count"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>0</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IX-2</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Descrição 
							<xsl:if test=".//cl-sequence-listing[@page-count] or .//processing-instruction('seqlist')">
								(excluindo a listagem de sequências) 
							</xsl:if>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//cl-description">
										<xsl:value-of select=".//cl-description/@page-count"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>0</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<fo:block>
							<xsl:choose>
								<xsl:when test="$EASY != 1 and .//cl-description">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IX-3</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Reivindicações 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//cl-claims">
										<xsl:value-of select=".//cl-claims/@page-count"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>0</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<fo:block>
							<xsl:choose>
								<xsl:when test="$EASY != 1 and .//cl-claims">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IX-4</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Resumo 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//cl-abstract">
										<xsl:value-of select=".//cl-abstract/@page-count"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>0</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<xsl:choose>
							<xsl:when test="$EASY = 1 and .//cl-abstract">
								<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
							</xsl:when>
							<xsl:otherwise>
								<fo:block>
									<xsl:choose>
										<xsl:when test="$EASY != 1 and .//cl-abstract">
											<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block>
												<fo:inline font-weight="bold">-</fo:inline>
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</fo:block>
							</xsl:otherwise>
						</xsl:choose>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdL">
						<fo:block>
							<xsl:text>IX-5</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							Desenhos 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:choose>
									<xsl:when test=".//cl-drawings">
										<xsl:value-of select=".//cl-drawings/@page-count"></xsl:value-of>
									</xsl:when>
									<xsl:otherwise>0</xsl:otherwise>
								</xsl:choose>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<fo:block>
							<xsl:choose>
								<xsl:when test="$EASY != 1 and .//cl-drawings and .//cl-drawings/@page-count &gt; 0">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test=".//cl-sequence-listing[@page-count] or .//cl-sequence-listing-table[@page-count]">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-7a</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Subtotal de folhas 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:value-of select="sum(.//*[not(name()='cl-sequence-listing' or name()='cl-sequence-listing-table' or name()='cl-other-document')]/@page-count[. != ''])"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<!--20191003 Always show Sequence listing in the checklist 
				<xsl:if test="$seqlist != 0 or .//cl-sequence-listing[@page-count] or .//cl-sequence-listing/@for-search-only = 'no'"> -->
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<xsl:choose>
								<xsl:when test=".//cl-sequence-listing[@page-count]">
									<fo:block>
										<xsl:text>IX-6</xsl:text>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<xsl:text>IX-6a</xsl:text>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<!-- 20090701 RuleChange
										<xsl:call-template name = "seq_ChoiceText">
											<xsl:with-param name = "sequence" select = ".//cl-sequence-listing"/>
										</xsl:call-template>
-->
										<xsl:choose>
											<xsl:when test=".//cl-sequence-listing[@page-count]">
												<fo:block>
													Listagem de sequências parte da descrição
												</fo:block>
											</xsl:when>
											<xsl:otherwise>
												<fo:block>
													Listagem de sequências fazendo parte da descrição
												</fo:block>
											</xsl:otherwise>
										</xsl:choose>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test=".//cl-sequence-listing[@page-count]">
											<fo:block>
												Listagem de sequências parte da descrição
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block>
												Listagem de sequências fazendo parte da descrição
											</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test=".//cl-sequence-listing/@page-count != 0">
											<xsl:value-of select=".//cl-sequence-listing/@page-count"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>-</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$seqlist != '0'">
									<xsl:choose>
										<xsl:when test="$EASY = '1'">
											<fo:block>
												<!-- 20090701 RuleChange
												<fo:inline font-weight = "bold">
													<xsl:value-of select = "$seqlist"/>
												</fo:inline>
-->
												<xsl:choose>
													<xsl:when test="$seqlist = ''">
														<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
													</xsl:when>
													<xsl:otherwise>
														<fo:inline font-weight="bold">
															<xsl:value-of select="$seqlist"></xsl:value-of>
														</fo:inline>
													</xsl:otherwise>
												</xsl:choose>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:when>
								<xsl:when test=".//cl-sequence-listing and $EASY = '1' and .//cl-sequence-listing/@carriers-type and not(.//cl-sequence-listing/@page-count) and .//cl-sequence-listing/@carriers = 'external-electronic' and .//cl-sequence-listing/@for-search-only = 'no'">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:call-template name="carriersInfo_ChoiceText">
												<xsl:with-param name="carriers_type" select=".//cl-sequence-listing/@carriers-type"></xsl:with-param>
												<xsl:with-param name="carriers_quantity" select=".//cl-sequence-listing/@carriers-quantity"></xsl:with-param>
											</xsl:call-template>
										</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:when test=".//cl-sequence-listing and $EASY != '1'">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:when test=".//cl-sequence-listing and not(.//cl-sequence-listing[@page-count]) and $EFSWEB = '1'">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				<!--20191003 Always show Sequence listing in the checklist 
				</xsl:if>-->
				<xsl:if test="$seqtab != 0 or .//cl-sequence-listing-table[@page-count]">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-6b</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										Tabelas em forma electrónica relacionadas com a listagem de sequências 
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										Tabelas relativas a listagem de sequências, parte da descrição 
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopRightData" text-align="center">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test=".//cl-sequence-listing-table/@page-count">
											<xsl:value-of select=".//cl-sequence-listing-table/@page-count"></xsl:value-of>
										</xsl:when>
										<xsl:otherwise>-</xsl:otherwise>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$seqtab != '0'">
									<xsl:choose>
										<xsl:when test="$EASY = '1'">
											<fo:block>
												<fo:inline font-weight="bold">
													<xsl:value-of select="$seqtab"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:when>
								<xsl:when test=".//cl-sequence-listing-table and $EASY != '1'">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdBL">
						<fo:block>
							<xsl:text>IX-7</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block start-indent="3mm">
							TOTAL 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="1" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:value-of select="sum(.//*[not(name()='cl-other-document')]/@page-count[. != ''])"></xsl:value-of>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTB" number-columns-spanned="1" text-align="center">
						<fo:block>
							<fo:inline font-weight="bold">
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<!--<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
						<fo:block>
							<fo:inline/>
						</fo:block>
					</fo:table-cell>-->
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell number-columns-spanned="3" border-top="solid black 0.25pt">
						<fo:block></fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<!-- NOTE: PCT-SAFE only allows for electronic file attachments; therefore, all
           documents will appear in the 'electronic files attached' column UNLESS
           filing in EASY mode ($EASY = 1) -->
		<fo:table table-layout="fixed" keep-together.within-page="always">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="52mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<xsl:text>
							</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Itens anexos 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTL" text-align="center">
						<fo:block>
							Documento(s) em papel anexado(s) 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeft">
						<fo:block>
							Ficheiro(s) electrónico(s) anexado(s) 
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test=".//cl-fee-calculation">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-8</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Folha de cálculo das taxas 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-separate-power-of-attorney">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-9</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Procuração separada original 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-general-power-of-attorney">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-10</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Procuração geral original 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:for-each select=".//cl-copy-general-power-of-attorney/ref-number">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-11</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Cópia da procuração geral 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<xsl:choose>
										<xsl:when test="string-length(text()) &gt; 0">
											<fo:block>
												<fo:inline font-weight="bold">
													Número de referência 
													<xsl:value-of select="text()"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center">
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
									<!--fo:block font-size = "10pt" font-family = "ZapfDingbats">✓</fo:block-->
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<xsl:choose>
										<xsl:when test="string-length(text()) &gt; 0">
											<fo:block>
												<fo:inline font-weight="bold">
													Número de referência 
													<xsl:value-of select="text()"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block font-size="10pt" font-family="ZapfDingbats" text-align="center">✓</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:for-each>
				<xsl:if test=".//cl-lack-of-signature">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-12</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Declaração explicativa da falta de assinatura 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-priority-document">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-13</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Documento(s) de prioridade 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:if test=".//cl-priority-document/sequence-number">
												Item/Itens 
												<xsl:for-each select=".//cl-priority-document/sequence-number">
													VI-<xsl:value-of select="."></xsl:value-of>
													<xsl:text>
													</xsl:text>
												</xsl:for-each>
											</xsl:if>
										</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center">
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:if test=".//cl-priority-document/sequence-number">
												Item/Itens 
												<xsl:for-each select=".//cl-priority-document/sequence-number">
													VI-<xsl:value-of select="."></xsl:value-of>
													<xsl:text>
													</xsl:text>
												</xsl:for-each>
											</xsl:if>
										</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-restore-rights-reason">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-13(A)</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
									Declaração relativa ao restabelecimento do direito de prioridade 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-translation-of-application">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-14</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Tradução do pedido internacional em 
								<xsl:text>
								</xsl:text>
								<fo:inline font-weight="bold">
									<xsl:call-template name="language_ChoiceText">
										<xsl:with-param name="lang" select="substring(translate(.//cl-translation-of-application/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-biological-material">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-15</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Indicações separadas relativas a microrganismos depositados ou a outro material biológico
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<!-- 20090701 RuleChange
				<xsl:if test = "$seqlist-search != 0 or .//processing-instruction('seqlist-additional') or .//cl-sequence-listing/@for-search-only = 'yes' or .//cl-sequence-listing/@additional-copies-including-search-copy = 'yes' or .//cl-sequence-listing/@with-identity-statement = 'yes'">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets = "tdL">
							<fo:block>
								<xsl:text>IX-16(A)</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets = "tdTC">
							<xsl:choose>
								<xsl:when test = "$EASY='1'">
									<fo:block>
										<inc file = "commonText.xml" toTranslate = "seqList_Text"/>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<inc file = "commonText.xml" toTranslate = "seqListElec_Text"/>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets = "tdTR" text-align = "center">
							<xsl:choose>
								<xsl:when test = "$EASY = '1'">
									<fo:block> </fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight = "bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets = "tdBorderTopLeftData" text-align = "center">
							<xsl:choose>
								<xsl:when test = "$EASY = '1'">
									<fo:block> </fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align = "center" font-size = "10pt" font-family = "ZapfDingbats" padding-top = "1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>          
					</fo:table-row>
				</xsl:if>
-->
<!-- bug fix 20170928: When there are two SLs IX16 appear even though those SL are submitted as a part of IAs.
				<xsl:if test="$seqlist-search != 0 or .//cl-sequence-listing/@for-search-only = 'yes' or .//cl-sequence-listing/@quantity = '2'">
-->
				<xsl:if test="$seqlist-search != 0 or .//cl-sequence-listing/@for-search-only = 'yes'">
					<!-- 20090701 RuleChange
					<xsl:choose>
						<xsl:when test = "$EASY='1'">
-->
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-16</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<!-- 20090701 RuleChange
									<fo:block start-indent = "3mm">
										<inc file = "commonText.xml" toTranslate = "seqlistSearchOnly_Text"/>
									</fo:block>
-->
							<xsl:choose>
								<xsl:when test=".//cl-sequence-listing/@for-search-only = 'yes'">
									<fo:block>
										Listagem de sequências em formato eletrónico ( Anexo C/ST.25 ) fornecida sómente para fins da pesquisa internacional, sob a Regra 13ter
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										Listagem de sequências fornecida para fins de pesquisa internacional, sob a Regra 13ter
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<fo:block>
								<fo:inline font-weight="bold">-</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<!-- 20090701 RuleChange
										<xsl:when test="$seqlist-search = '0'">
-->
								<xsl:when test=".//cl-sequence-listing[@carriers-type] and $EASY = '1' and .//cl-sequence-listing/@carriers = 'external-electronic' and (.//cl-sequence-listing[@page-count] or .//cl-sequence-listing/@for-search-only = 'yes')">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:call-template name="carriersInfo_ChoiceText">
												<xsl:with-param name="carriers_type" select=".//cl-sequence-listing/@carriers-type"></xsl:with-param>
												<xsl:with-param name="carriers_quantity" select=".//cl-sequence-listing/@carriers-quantity"></xsl:with-param>
											</xsl:call-template>
										</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:when test="$seqlist-search = '0' or $seqlist-search = ''">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:value-of select="$seqlist-search"></xsl:value-of>
										</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
					<!-- 20090701 RuleChange
						</xsl:when>
						<xsl:otherwise/>
					</xsl:choose>
-->
				</xsl:if>
				<xsl:if test=".//processing-instruction('seqlist-additional') or .//cl-sequence-listing/@additional-copies-including-search-copy = 'yes'">
					<xsl:choose>
						<xsl:when test="$EASY='1'">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IX-16(A)-(ii)</xsl:text>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block start-indent="3mm">
										Cópias suplementares inclusive, se for caso disso, a cópia destinada à pesquisa internacional segundo a Regra 13ter 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
									<xsl:choose>
										<xsl:when test=".//processing-instruction('seqlist-additional')">
											<fo:block>
												<fo:inline font-weight="bold">
													<xsl:value-of select=".//processing-instruction('seqlist-additional')"></xsl:value-of>
												</fo:inline>
											</fo:block>
										</xsl:when>
										<xsl:otherwise>
											<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
										</xsl:otherwise>
									</xsl:choose>
								</fo:table-cell>
							</fo:table-row>
						</xsl:when>
						<xsl:otherwise></xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:if test=".//cl-sequence-listing/@with-identity-statement = 'yes'">
					<xsl:choose>
						<xsl:when test="$EASY='1'">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IX-16(A)-(iii)</xsl:text>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block start-indent="3mm">
										the information recorded in electronic form is identical to the sequence listing as contained in the application
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:when>
						<xsl:otherwise></xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:if test="$seqtab-search != 0 or .//processing-instruction('seqtab-additional')">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-16(B)</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block>
										Tabelas em forma electrónica relacionadas com a listagem de sequências 
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										Tabelas relativas a listagem de sequências apresentadas em relação ao item IX-16(A) 
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block> </fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block> </fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="$seqtab-search != 0">
					<xsl:choose>
						<xsl:when test="$EASY='1'">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IX-16(B)-(i)</xsl:text>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block start-indent="3mm">
										Cópia fornecida para os fins a da pesquisa internacional segundo a Regra 13ter apenas (e não como parte do pedido internacional) 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:value-of select="$seqtab-search"></xsl:value-of>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:when>
						<xsl:otherwise></xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:if test=".//processing-instruction('seqtab-additional')">
					<xsl:choose>
						<xsl:when test="$EASY='1'">
							<fo:table-row>
								<fo:table-cell xsl:use-attribute-sets="tdL">
									<fo:block>
										<xsl:text>IX-16(B)-(ii)</xsl:text>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTC">
									<fo:block start-indent="3mm">
										Cópias suplementares inclusive, se for caso disso, a cópia destinada à pesquisa internacional 
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</fo:table-cell>
								<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
									<fo:block>
										<fo:inline font-weight="bold">
											<xsl:value-of select=".//processing-instruction('seqtab-additional')"></xsl:value-of>
										</fo:inline>
									</fo:block>
								</fo:table-cell>
							</fo:table-row>
						</xsl:when>
						<xsl:otherwise></xsl:otherwise>
					</xsl:choose>
				</xsl:if>
				<xsl:if test=".//cl-earlier-search-document">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-17</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Cópia dos resultados da pesquisa anterior 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test="$EFSWEB != '1' and $EASY='1'">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-18</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								Suporte físico PCT-SAFE 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR" text-align="center">
							<fo:block>
								<fo:inline font-weight="bold">-</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopBottomLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY='1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block text-align="center">
										<fo:inline font-weight="bold">-
											<!--xsl:value-of select = "$physical_media"/-->
										</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:if test=".//cl-sequence-listing and .//cl-sequence-listing/@with-identifying-statement = 'yes'">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-19</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								Uma declaração confirmando que “as informações em forma electrónica conforme o formato Anexo C/ST.25, submetidas de acordo com a Regra 13ter, são idênticas à listagem de sequências contida no pedido internacional”
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTR" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftData" text-align="center">
							<xsl:choose>
								<xsl:when test="$EASY = '1'">
									<fo:block>
										<fo:inline font-weight="bold">-</fo:inline>
									</fo:block>
								</xsl:when>
								<xsl:otherwise>
									<fo:block font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
								</xsl:otherwise>
							</xsl:choose>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
				<xsl:for-each select=".//cl-other-document">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>
								<xsl:text>IX-19</xsl:text>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								Outro
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:value-of select="."></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopBottomLeftData" text-align="center">
							<fo:block>
							<xsl:if test="not($EASY = '1')">
								<fo:block font-size="10pt" font-family="ZapfDingbats">✓</fo:block>
							</xsl:if>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:for-each>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>IX-20</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Figura dos desenhos que deve acompanhar o resumo 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR" number-columns-spanned="2">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:value-of select="./figure-to-publish/fig-number"></xsl:value-of>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>IX-21</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							<fo:inline font-weight="bold">
								Língua do depósito do pedido internacional 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="2">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:call-template name="language_ChoiceText">
									<xsl:with-param name="lang" select="substring(translate(./language-of-filing,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
								</xsl:call-template>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<xsl:if test="./store-in-digital-library">
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:text>IX-22</xsl:text>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								<fo:inline font-weight="bold">
									Pede-se que o Organismo receptor forneça este pedido internacional ao serviço de acesso digital aos documentos de prioridade (DAS) (desde que um número de pedido internacional e uma data de depósito internacional sejam atribuídos a este alegado pedido internacional).
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR" number-columns-spanned="2">
							<fo:block>
								<fo:inline font-weight="bold">
									Sim
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</xsl:if>
			</fo:table-body>
		</fo:table>
		<xsl:if test=".//signatory">
			<xsl:for-each select=".//signatory">
				<xsl:call-template name="signatory">
					<xsl:with-param name="sig_seq" select="position()"></xsl:with-param>
					<xsl:with-param name="box">X</xsl:with-param>
				</xsl:call-template>
			</xsl:for-each>
			<xsl:if test="not($officeUse='1')">
				<xsl:call-template name="office_info"></xsl:call-template>
			</xsl:if>
		</xsl:if>
	</xsl:template><xsl:template name="office_info">
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always" space-before="5mm">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell font-size="10pt" vertical-align="top" padding="1.5pt" number-columns-spanned="3" space-before="5mm" padding-top="4mm" padding-bottom="4mm">
						<fo:block text-align="center">
							<fo:inline font-weight="bold">
								RESERVADO PARA O ORGANISMO RECEPTOR 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-1</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block padding-bottom="5mm">
							<fo:inline font-weight="bold">
								Data efectiva de recepção do alegado pedido internacional 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<xsl:if test="document($rrri_doc)//date-of-actual-receipt/date">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="document($rrri_doc)//date-of-actual-receipt/date"></xsl:with-param>
										<xsl:with-param name="lang" select="$lang"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-2</xsl:text>
							</fo:inline>
						</fo:block>
						<fo:block padding-before="1.5mm">
							<xsl:text>10-2-1</xsl:text>
						</fo:block>
						<fo:block padding-before="1.5mm">
							<xsl:text>10-2-2</xsl:text>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Desenhos: 
							</fo:inline>
						</fo:block>
						<fo:block padding-before="1.5mm">
							Recebida 
						</fo:block>
						<fo:block padding-before="1.5mm">
							Não recebida 
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
						<fo:block>
						<xsl:if test="document($rrri_doc)//drawings-not-received">
							<fo:block text-align="left" font-size="10pt" font-family="ZapfDingbats" padding-before="9mm">✓</fo:block>
						</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-3</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Data efectiva de recepção, corrigida devido à recepção ulterior, mas dentro do prazo, de documentos ou desenhos que completam o alegado pedido internacional 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<xsl:if test="document($rrri_doc)//corrected-date-receipt/date">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="document($rrri_doc)//corrected-date-receipt/date"></xsl:with-param>
										<xsl:with-param name="lang" select="$lang"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-4</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Data da recepção, dentro do prazo, das correcções exigidas de acordo com o Artigo 11.2) do PCT  
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block>
							<xsl:if test="document($rrri_doc)//receipt-pct11-2/date">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="document($rrri_doc)//receipt-pct11-2/date"></xsl:with-param>
										<xsl:with-param name="lang" select="$lang"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</xsl:if>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-5</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTC">
						<fo:block>
							<fo:inline font-weight="bold">
								Autoridade responsável pela pesquisa internacional 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTR">
						<fo:block padding-top="1pt">
							<fo:inline font-weight="bold">                ISA/<xsl:call-template name="uppercaser">
									<xsl:with-param name="string" select=".//isa/country"></xsl:with-param>
								</xsl:call-template>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">
								<xsl:text>10-6</xsl:text>
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							<fo:inline font-weight="bold">
								Transmissão da cópia de pesquisa diferida até ao pagamento da taxa de pesquisa 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTB">
					<fo:block>
						<xsl:if test="document($rrri_doc)//search-copy-delayed">
							<fo:block text-align="left" font-size="10pt" font-family="ZapfDingbats" padding-top="1pt">✓</fo:block>
						</xsl:if>
					</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
		<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
			<fo:table-column column-width="12mm"></fo:table-column>
			<fo:table-column column-width="53mm"></fo:table-column>
			<fo:table-column column-width="105mm"></fo:table-column>
			<fo:table-body>
				<fo:table-row>
					<fo:table-cell font-size="10pt" vertical-align="top" padding="1.5pt" number-columns-spanned="3" padding-top="4mm" padding-bottom="4mm">
						<fo:block text-align="center">
							<fo:inline font-weight="bold">
								RESERVADO PARA A SECRETARIA INTERNACIONAL 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
				<fo:table-row>
					<fo:table-cell xsl:use-attribute-sets="tdTBL">
						<fo:block>
							<fo:inline font-weight="bold">11-1</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBC">
						<fo:block>
							<fo:inline font-weight="bold">
								Data da recepção da via original pela Secretaria Internacional 
							</fo:inline>
						</fo:block>
					</fo:table-cell>
					<fo:table-cell xsl:use-attribute-sets="tdTBR" padding="4mm">
						<fo:block>
							<xsl:text>
							</xsl:text>
						</fo:block>
					</fo:table-cell>
				</fo:table-row>
			</fo:table-body>
		</fo:table>
	</xsl:template><xsl:template name="priority_claims">
		<xsl:for-each select=".//priority-claim">
			<xsl:variable name="prio_claims_seq" select="position()"></xsl:variable>
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTL">
							<fo:block>
								<fo:inline font-weight="bold">VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTC">
							<fo:block>
								<fo:inline font-weight="bold">
									<xsl:choose>
										<xsl:when test="@kind='regional'">
											Reivindicação de prioridade de um pedido regional anterior 
										</xsl:when>
										<xsl:when test="@kind='national'">
											Reivindicação de prioridade de um pedido nacional anterior 
										</xsl:when>
										<xsl:when test="@kind='international'">
											Reivindicação de prioridade de um pedido internacional anterior 
										</xsl:when>
									</xsl:choose>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTop">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>-1</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								Data do depósito 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:call-template name="format_date">
										<xsl:with-param name="date" select="normalize-space(date)"></xsl:with-param>
										<xsl:with-param name="show_date" select="1"></xsl:with-param>
										<xsl:with-param name="text" select="1"></xsl:with-param>
										<xsl:with-param name="lang" select="substring(translate(//request/@lang,'ABCDEFGHIJKLMNOPQRSTUVWXYZ','abcdefghijklmnopqrstuvwxyz'),1,2)"></xsl:with-param>
										<xsl:with-param name="date_too" select="1"></xsl:with-param>
									</xsl:call-template>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<xsl:if test=".//doc-number">
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>-2</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Número 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:value-of select=".//doc-number"></xsl:value-of>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdL">
							<fo:block>VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>-3</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdC">
							<fo:block>
								<xsl:choose>
									<xsl:when test="@kind='international'">
										Organismo receptor PCT  
									</xsl:when>
									<xsl:when test="@kind='national'">
										País ou membro da OMC 
									</xsl:when>
									<xsl:when test="@kind='regional'">
										Organismo regional 
									</xsl:when>
								</xsl:choose>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdR">
							<fo:block padding-top="1pt">
								<fo:inline font-weight="bold">
									<xsl:if test="$lang='ja' or $lang='zh' or $lang='ru'">
										<xsl:call-template name="country_ChoiceText">
											<xsl:with-param name="country" select=".//country"></xsl:with-param>
										</xsl:call-template>
									</xsl:if>
									<xsl:value-of select=".//country"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
					<xsl:if test="./office-of-filing">
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>-4</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Estado Contratante da Convenção de Paris para a Proteção da Propriedade Industrial ou Estado-Membro da Organização Mundial do Comércio, para o qual um pedido anterior foi depositado 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										<xsl:call-template name="uppercaser">
											<xsl:with-param name="string" select="./office-of-filing//country"></xsl:with-param>
										</xsl:call-template>
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<xsl:if test=".//restore-rights">
						<fo:table-row>
							<fo:table-cell xsl:use-attribute-sets="tdL">
								<fo:block>VI-<xsl:value-of select="$prio_claims_seq"></xsl:value-of>-5</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdC">
								<fo:block>
									Restabelecimento do direito de prioridade 
								</fo:block>
							</fo:table-cell>
							<fo:table-cell xsl:use-attribute-sets="tdR">
								<fo:block padding-top="1pt">
									<fo:inline font-weight="bold">
										Pede-se que o Organismo receptor restaure o direito de prioridade 
									</fo:inline>
								</fo:block>
							</fo:table-cell>
						</fo:table-row>
					</xsl:if>
					<fo:table-row>
						<fo:table-cell border-top="solid black 0.5pt" number-columns-spanned="3">
							<fo:block></fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:for-each>
		<xsl:if test=".//priority-doc-from-library[@action-by='IB']">
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 1"></xsl:value-of>
								</fo:inline>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								<fo:inline font-weight="bold">
									Pedido de documento de prioridade 
								</fo:inline>
							</fo:block>
							<fo:block padding-before="2mm">
								O Organismo receptor deve obter junto de uma biblioteca digital e transmitir à  Secretaria Internacional uma cópia autenticada do(s) pedido(s) anterior(es) acima identificado(s) no(s) ponto(s):
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-before="6mm">
								<xsl:for-each select=".//priority-doc-from-library[@action-by='IB']">
									<fo:block font-weight="bold">
										VI-<xsl:value-of select="parent::priority-claim/@sequence"></xsl:value-of>
										<xsl:if test="./@priority-doc-access-code">
											Access code: 
											<xsl:value-of select="./@priority-doc-access-code"></xsl:value-of>
										</xsl:if>
									</fo:block>
								</xsl:for-each>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
		<xsl:if test=".//priority-doc-from-library[@action-by='RO']">
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<xsl:if test=".//priority-doc-from-library[@action-by='IB']">
									<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 2"></xsl:value-of>
									</fo:inline>
								</xsl:if>
								<xsl:if test="not(.//priority-doc-from-library[@action-by='IB'])">
									<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 1"></xsl:value-of>
									</fo:inline>
								</xsl:if>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								<fo:inline font-weight="bold">
									Pedido de documento de prioridade 
								</fo:inline>
							</fo:block>
							<fo:block padding-before="2mm">
								O Organismo receptor deve obter junto de uma biblioteca digital e transmitir à  Secretaria Internacional uma cópia autenticada do(s) pedido(s) anterior(es) acima identificado(s) no(s) ponto(s):
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-before="6mm">
								<xsl:for-each select=".//priority-doc-from-library[@action-by='RO']">
									<fo:block font-weight="bold">
										VI-<xsl:value-of select="parent::priority-claim/@sequence"></xsl:value-of>
										<xsl:if test="./@priority-doc-access-code">
											Access code: 
											<xsl:value-of select="./@priority-doc-access-code"></xsl:value-of>
										</xsl:if>
									</fo:block>
								</xsl:for-each>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
		<xsl:if test=".//priority-doc-requested">
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<xsl:choose>
									<xsl:when test="not(.//priority-doc-from-library)">
										<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 1"></xsl:value-of>
										</fo:inline>
									</xsl:when>
									<xsl:when test="(.//priority-doc-from-library[@action-by='IB']) and (.//priority-doc-from-library[@action-by='RO'])">
										<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 3"></xsl:value-of>
										</fo:inline>
									</xsl:when>
									<xsl:otherwise>
										<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 2"></xsl:value-of>
										</fo:inline>
									</xsl:otherwise>
								</xsl:choose>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBC">
							<fo:block>
								<fo:inline font-weight="bold">
									Pedido de documento de prioridade 
								</fo:inline>
							</fo:block>
							<fo:block padding-before="2mm">
								Pede-se ao Organismo receptor que prepare e transmita à Secretaria Internacional uma cópia certificada do(s) pedido(s) anterior(es) acima identificado(s) como item/itens: 
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdTBR">
							<fo:block padding-before="6mm">
								<xsl:for-each select=".//priority-doc-requested">
									<fo:block font-weight="bold">
										VI-<xsl:value-of select="parent::priority-claim/@sequence"></xsl:value-of>
									</fo:block>
								</xsl:for-each>
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
		<xsl:if test=".//incorporation-by-reference">
			<fo:table table-layout="fixed" border-collapse="separate" keep-together.within-page="always">
				<fo:table-column column-width="12mm"></fo:table-column>
				<fo:table-column column-width="53mm"></fo:table-column>
				<fo:table-column column-width="105mm"></fo:table-column>
				<fo:table-body>
					<fo:table-row>
						<fo:table-cell xsl:use-attribute-sets="tdTBL">
							<fo:block>
								<xsl:if test=".//priority-doc-requested">
									<xsl:choose>
										<xsl:when test="not(.//priority-doc-from-library)">
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 2"></xsl:value-of>
											</fo:inline>
										</xsl:when>
										<xsl:when test="(.//priority-doc-from-library[@action-by='IB']) and (.//priority-doc-from-library[@action-by='RO'])">
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 4"></xsl:value-of>
											</fo:inline>
										</xsl:when>
										<xsl:otherwise>
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 3"></xsl:value-of>
											</fo:inline>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:if>
								<xsl:if test="not(.//priority-doc-requested)">
									<xsl:choose>
										<xsl:when test="not(.//priority-doc-from-library)">
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 1"></xsl:value-of>
											</fo:inline>
										</xsl:when>
										<xsl:when test="(.//priority-doc-from-library[@action-by='IB']) and (.//priority-doc-from-library[@action-by='RO'])">
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 3"></xsl:value-of>
											</fo:inline>
										</xsl:when>
										<xsl:otherwise>
											<fo:inline font-weight="bold">VI-<xsl:value-of select="count(.//priority-claim) + 2"></xsl:value-of>
											</fo:inline>
										</xsl:otherwise>
									</xsl:choose>
								</xsl:if>
							</fo:block>
						</fo:table-cell>
						<fo:table-cell xsl:use-attribute-sets="tdBorderTopLeftNoCenter" number-columns-spanned="2">
							<fo:block>
								<fo:inline font-weight="bold">
									Incorporação por referência: 
								</fo:inline>
							</fo:block>
							<fo:block padding-before="2mm">
								quando um elemento do pedido internacional mencionado no Artigo 11.1)iii)d) ou e) ou uma parte da descrição, das reivindicações ou dos desenhos mencionados na Regra 20.5.a) ou um elemento ou parte da descrição, das reivindicações ou dos desenhos mencionados na Regra 20.5​​bis​.a), não estiver de outro modo incluído no pedido internacional mas estiver totalmente incluído no pedido anterior cuja prioridade é reivindicada na data em que um ou mais elementos mencionados no Artigo 11.1)iii) tenham sido recebidos pela primeira vez pelo Organismo receptor, esse elemento ou parte é, sob reserva de confirmação de acordo com a Regra 20.6, incorporada por referência neste pedido internacional para os fins da Regra 20.6.
							</fo:block>
						</fo:table-cell>
					</fo:table-row>
				</fo:table-body>
			</fo:table>
		</xsl:if>
	</xsl:template><xsl:template name="kind-of-protection">
		<xsl:param name="kind-text"></xsl:param>
		<xsl:choose>
			<xsl:when test="$kind-text = 'continuation-in-part'">
				continuation-in-part
			</xsl:when>
			<xsl:when test="$kind-text = 'certificate-of-addition'">
				certificado de adição
			</xsl:when>
			<xsl:when test="$kind-text = 'continuation'">
				continuation
			</xsl:when>
			<xsl:when test="$kind-text = 'inventors-certificate-of-addition'">
				certificado de autor de invenção de adição
			</xsl:when>
			<xsl:when test="$kind-text = 'patent-of-addition'">
				patente de adição
			</xsl:when>
			<xsl:when test="$kind-text = 'utility-certificate-of-addition'">
				certificado de utilidade de adição
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$kind-text"></xsl:value-of>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template match="i">      
		<fo:inline>
			<xsl:if test="not(name(preceding-sibling::node()[1])='i') and not(ancestor::i)">
				<xsl:attribute name="font-style">italic</xsl:attribute>
			</xsl:if>
			<xsl:attribute name="vertical-align">
				<xsl:choose>
					<xsl:when test="name(ancestor::sup2)">
						<xsl:choose>
							<xsl:when test="name(ancestor::sub)">baseline</xsl:when>
							<xsl:otherwise>super</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="name(ancestor::sub2)">
						<xsl:choose>
							<xsl:when test="name(ancestor::sup)">baseline</xsl:when>
							<xsl:otherwise>sub</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>
						<xsl:choose>
							<xsl:when test="name(ancestor::sup)">super</xsl:when>
							<xsl:when test="name(ancestor::sub)">sub</xsl:when>
							<xsl:otherwise>baseline</xsl:otherwise>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>
		</fo:inline>
	</xsl:template><xsl:template match="sub">
		<fo:inline>
			<xsl:attribute name="vertical-align">sub</xsl:attribute>
			<xsl:attribute name="font-size">7pt</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>
		</fo:inline>
	</xsl:template><xsl:template match="sup">
		<fo:inline>
			<xsl:attribute name="vertical-align">super</xsl:attribute>
			<xsl:attribute name="font-size">7pt</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>
		</fo:inline>
	</xsl:template><xsl:template match="sub2">
		<fo:inline>
			<xsl:attribute name="vertical-align">
				<xsl:choose>
					<xsl:when test="name(ancestor::sup)">baseline</xsl:when>
					<xsl:when test="name(ancestor::sub)">sub</xsl:when>
					<xsl:otherwise>sub</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<xsl:attribute name="font-size">5pt</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>
		</fo:inline>
	</xsl:template><xsl:template match="sup2">
		<fo:inline>
			<xsl:attribute name="vertical-align">
				<xsl:choose>
					<xsl:when test="name(ancestor::sub)">baseline</xsl:when>
					<xsl:when test="name(ancestor::sup)">super</xsl:when>
					<xsl:otherwise>super</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<xsl:attribute name="font-size">5pt</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>
		</fo:inline>
	</xsl:template><xsl:template match="u">   	  
		<xsl:param name="renderer"></xsl:param>      
		<fo:inline>
			<!-- Note: FOP does not support all '@style' values for underline -->
			         
			<xsl:choose>            
				<xsl:when test="$renderer='FOP'">               
					<xsl:attribute name="text-decoration">underline</xsl:attribute>            
				</xsl:when>            
				<xsl:otherwise>               
					<xsl:choose>                  
						<xsl:when test="@style='double'">                     
							<xsl:attribute name="text-decoration">underline</xsl:attribute>                     
							<xsl:attribute name="border-bottom-style">solid</xsl:attribute>                     
							<xsl:attribute name="border-bottom-width">0.1mm</xsl:attribute>                  
						</xsl:when>                  
						<xsl:when test="@style='dash'">                     
							<xsl:attribute name="border-bottom-style">dashed</xsl:attribute>                     
							<xsl:attribute name="border-bottom-width">0.3mm</xsl:attribute>                  
						</xsl:when>                  
						<xsl:when test="@style='dots'">                     
							<xsl:attribute name="border-bottom-style">dotted</xsl:attribute>                     
							<xsl:attribute name="border-bottom-width">0.3mm</xsl:attribute>                  
						</xsl:when>                  
						<xsl:otherwise>                     
							<xsl:attribute name="text-decoration">underline</xsl:attribute>                  
						</xsl:otherwise>               
					</xsl:choose>            
				</xsl:otherwise>         
			</xsl:choose>
			<xsl:attribute name="vertical-align">
				<xsl:choose>
					<xsl:when test="name(ancestor::sup2)">
						<xsl:choose>
							<xsl:when test="name(ancestor::sub)">baseline</xsl:when>
							<xsl:otherwise>super</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:when test="name(ancestor::sub2)">
						<xsl:choose>
							<xsl:when test="name(ancestor::sup)">baseline</xsl:when>
							<xsl:otherwise>sub</xsl:otherwise>
						</xsl:choose>
					</xsl:when>
					<xsl:otherwise>
						<xsl:choose>
							<xsl:when test="name(ancestor::sup)">super</xsl:when>
							<xsl:when test="name(ancestor::sub)">sub</xsl:when>
							<xsl:otherwise>baseline</xsl:otherwise>
						</xsl:choose>
					</xsl:otherwise>
				</xsl:choose>
			</xsl:attribute>
			<xsl:apply-templates></xsl:apply-templates>      
		</fo:inline>
	</xsl:template>
	<LU:organizations>
		<LU:organization name="AP">
			<LU:state name="BW"></LU:state>
			<LU:state name="GH"></LU:state>
			<LU:state name="GM"></LU:state>
			<LU:state name="KE"></LU:state>
			<LU:state name="LR"></LU:state>
			<LU:state name="LS"></LU:state>
			<LU:state name="MW"></LU:state>
			<LU:state name="MZ"></LU:state>
			<LU:state name="NA"></LU:state>
			<LU:state name="SD"></LU:state>
			<LU:state name="SL"></LU:state>
			<LU:state name="SZ"></LU:state>
			<LU:state name="TZ"></LU:state>
			<LU:state name="UG"></LU:state>
			<LU:state name="ZM"></LU:state>
			<LU:state name="ZW"></LU:state>
		</LU:organization>
		<LU:organization name="EA">
			<LU:state name="AM"></LU:state>
			<LU:state name="AZ"></LU:state>
			<LU:state name="BY"></LU:state>
			<LU:state name="KG"></LU:state>
			<LU:state name="KZ"></LU:state>
			<LU:state name="MD"></LU:state>
			<LU:state name="RU"></LU:state>
			<LU:state name="TJ"></LU:state>
			<LU:state name="TM"></LU:state>
		</LU:organization>
		<LU:organization name="EP">
			<LU:state name="AL"></LU:state>
			<LU:state name="AT"></LU:state>
			<LU:state name="BE"></LU:state>
			<LU:state name="BG"></LU:state>
			<LU:state name="CH"></LU:state>
			<LU:state name="LI"></LU:state>
			<LU:state name="CY"></LU:state>
			<LU:state name="CZ"></LU:state>
			<LU:state name="DE"></LU:state>
			<LU:state name="DK"></LU:state>
			<LU:state name="EE"></LU:state>
			<LU:state name="ES"></LU:state>
			<LU:state name="FI"></LU:state>
			<LU:state name="FR"></LU:state>
			<LU:state name="GB"></LU:state>
			<LU:state name="GR"></LU:state>
			<LU:state name="HR"></LU:state>
			<LU:state name="HU"></LU:state>
			<LU:state name="IE"></LU:state>
			<LU:state name="IS"></LU:state>
			<LU:state name="IT"></LU:state>
			<LU:state name="LT"></LU:state>
			<LU:state name="LU"></LU:state>
			<LU:state name="LV"></LU:state>
			<LU:state name="MC"></LU:state>
			<LU:state name="MK"></LU:state>
			<LU:state name="MT"></LU:state>
			<LU:state name="NL"></LU:state>
			<LU:state name="NO"></LU:state>
			<LU:state name="PL"></LU:state>
			<LU:state name="PT"></LU:state>
			<LU:state name="RO"></LU:state>
			<LU:state name="RS"></LU:state>
			<LU:state name="SE"></LU:state>
			<LU:state name="SI"></LU:state>
			<LU:state name="SK"></LU:state>
			<LU:state name="TR"></LU:state>
		</LU:organization>
		<LU:organization name="OA">
			<LU:state name="BF"></LU:state>
			<LU:state name="BJ"></LU:state>
			<LU:state name="CF"></LU:state>
			<LU:state name="CG"></LU:state>
			<LU:state name="CI"></LU:state>
			<LU:state name="CM"></LU:state>
			<LU:state name="GA"></LU:state>
			<LU:state name="GN"></LU:state>
			<LU:state name="GQ"></LU:state>
			<LU:state name="GW"></LU:state>
			<LU:state name="ML"></LU:state>
			<LU:state name="MR"></LU:state>
			<LU:state name="NE"></LU:state>
			<LU:state name="SN"></LU:state>
			<LU:state name="TD"></LU:state>
			<LU:state name="TG"></LU:state>
		</LU:organization>
	</LU:organizations>
	<xsl:template name="nameType">
   	<xsl:param name="nam"></xsl:param>
   	      <xsl:choose>
	         <xsl:when test="$nam//name[@name-type='legal']">
	         	Nome 
	         </xsl:when>
	         <xsl:otherwise>
	         	Nome (APELIDO, nome próprio) 
	         </xsl:otherwise>
	      </xsl:choose>
   </xsl:template>
	<xsl:template name="enCountry_ChoiceText">
		<xsl:param name="country"></xsl:param>
		<xsl:choose>
			<xsl:when test="$country='AD'">
				<xsl:text>Andorra </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AE'">
				<xsl:text>United Arab Emirates </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AF'">
				<xsl:text>Afghanistan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AG'">
				<xsl:text>Antigua and Barbuda </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AI'">
				<xsl:text>Anguilla </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AL'">
				<xsl:text>Albania </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AM'">
				<xsl:text>Armenia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AO'">
				<xsl:text>Angola </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AQ'">
				<xsl:text>Antarctica </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AR'">
				<xsl:text>Argentina </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AS'">
				<xsl:text>American Samoa </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AT'">
				<xsl:text>Austria </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AU'">
				<xsl:text>Australia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AW'">
				<xsl:text>Aruba </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AX'">
				<xsl:text>Aland Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='AZ'">
				<xsl:text>Azerbaijan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BA'">
				<xsl:text>Bosnia and Herzegovina </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BB'">
				<xsl:text>Barbados </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BD'">
				<xsl:text>Bangladesh </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BE'">
				<xsl:text>Belgium </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BF'">
				<xsl:text>Burkina Faso </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BG'">
				<xsl:text>Bulgaria </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BH'">
				<xsl:text>Bahrain </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BI'">
				<xsl:text>Burundi </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BJ'">
				<xsl:text>Benin </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BM'">
				<xsl:text>Bermuda </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BN'">
				<xsl:text>Brunei Darussalam </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BO'">
				<xsl:text>Bolivia (Plurinational State of) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BQ'">
				<xsl:text>Bonaire, Saint Eustatius and Saba </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BR'">
				<xsl:text>Brazil </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BS'">
				<xsl:text>Bahamas </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BT'">
				<xsl:text>Bhutan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BV'">
				<xsl:text>Bouvet Island </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BW'">
				<xsl:text>Botswana </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BY'">
				<xsl:text>Belarus </xsl:text>
			</xsl:when>
			<xsl:when test="$country='BZ'">
				<xsl:text>Belize </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CA'">
				<xsl:text>Canada </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CC'">
				<xsl:text>Cocos (Keeling) Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CD'">
				<xsl:text>Democratic Republic of Congo </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CF'">
				<xsl:text>Central African Republic </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CG'">
				<xsl:text>Congo </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CH'">
				<xsl:text>Switzerland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CI'">
				<xsl:text>Côte d'Ivoire </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CK'">
				<xsl:text>Cook Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CL'">
				<xsl:text>Chile </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CM'">
				<xsl:text>Cameroon </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CN'">
				<xsl:text>China </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CO'">
				<xsl:text>Colombia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CR'">
				<xsl:text>Costa Rica </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CU'">
				<xsl:text>Cuba </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CV'">
				<xsl:text>Cabo Verde </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CW'">
				<xsl:text>Curaçao </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CX'">
				<xsl:text>Christmas Island </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CY'">
				<xsl:text>Cyprus </xsl:text>
			</xsl:when>
			<xsl:when test="$country='CZ'">
				<xsl:text>Czechia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DE'">
				<xsl:text>Germany </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DJ'">
				<xsl:text>Djibouti </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DK'">
				<xsl:text>Denmark </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DM'">
				<xsl:text>Dominica </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DO'">
				<xsl:text>Dominican Republic </xsl:text>
			</xsl:when>
			<xsl:when test="$country='DZ'">
				<xsl:text>Algeria </xsl:text>
			</xsl:when>
			<xsl:when test="$country='EC'">
				<xsl:text>Ecuador </xsl:text>
			</xsl:when>
			<xsl:when test="$country='EE'">
				<xsl:text>Estonia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='EG'">
				<xsl:text>Egypt </xsl:text>
			</xsl:when>
			<xsl:when test="$country='EH'">
				<xsl:text>Western Sahara </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ER'">
				<xsl:text>Eritrea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ES'">
				<xsl:text>Spain </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ET'">
				<xsl:text>Ethiopia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FI'">
				<xsl:text>Finland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FJ'">
				<xsl:text>Fiji </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FK'">
				<xsl:text>Falkland Islands (Malvinas) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FM'">
				<xsl:text>Micronesia (Federated States of) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FO'">
				<xsl:text>Faroe Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='FR'">
				<xsl:text>France </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GA'">
				<xsl:text>Gabon </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GB'">
				<xsl:text>United Kingdom </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GD'">
				<xsl:text>Grenada </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GE'">
				<xsl:text>Georgia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GF'">
				<xsl:text>French Guiana </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GG'">
				<xsl:text>Guernsey </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GH'">
				<xsl:text>Ghana </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GI'">
				<xsl:text>Gibraltar </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GL'">
				<xsl:text>Greenland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GM'">
				<xsl:text>Gambia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GN'">
				<xsl:text>Guinea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GP'">
				<xsl:text>Guadeloupe </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GQ'">
				<xsl:text>Equatorial Guinea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GR'">
				<xsl:text>Greece </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GS'">
				<xsl:text>South Georgia and the South Sandwich Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GT'">
				<xsl:text>Guatemala </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GU'">
				<xsl:text>Guam </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GW'">
				<xsl:text>Guinea-Bissau </xsl:text>
			</xsl:when>
			<xsl:when test="$country='GY'">
				<xsl:text>Guyana </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HK'">
				<xsl:text>Hong Kong, China </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HM'">
				<xsl:text>Heard Island and McDonald Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HN'">
				<xsl:text>Honduras </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HR'">
				<xsl:text>Croatia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HT'">
				<xsl:text>Haiti </xsl:text>
			</xsl:when>
			<xsl:when test="$country='HU'">
				<xsl:text>Hungary </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ID'">
				<xsl:text>Indonesia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IE'">
				<xsl:text>Ireland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IL'">
				<xsl:text>Israel </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IM'">
				<xsl:text>Isle of Man </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IN'">
				<xsl:text>India </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IO'">
				<xsl:text>British Indian Ocean Territory </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IQ'">
				<xsl:text>Iraq </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IR'">
				<xsl:text>Iran (Islamic Republic of) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IS'">
				<xsl:text>Iceland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='IT'">
				<xsl:text>Italy </xsl:text>
			</xsl:when>
			<xsl:when test="$country='JE'">
				<xsl:text>Jersey </xsl:text>
			</xsl:when>
			<xsl:when test="$country='JM'">
				<xsl:text>Jamaica </xsl:text>
			</xsl:when>
			<xsl:when test="$country='JO'">
				<xsl:text>Jordan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='JP'">
				<xsl:text>Japan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KE'">
				<xsl:text>Kenya </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KG'">
				<xsl:text>Kyrgyzstan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KH'">
				<xsl:text>Cambodia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KI'">
				<xsl:text>Kiribati </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KM'">
				<xsl:text>Comoros </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KN'">
				<xsl:text>Saint Kitts and Nevis </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KP'">
				<xsl:text>Democratic People's Republic of Korea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KR'">
				<xsl:text>Republic of Korea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KW'">
				<xsl:text>Kuwait </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KY'">
				<xsl:text>Cayman Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='KZ'">
				<xsl:text>Kazakhstan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LA'">
				<xsl:text>Lao People's Democratic Republic </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LB'">
				<xsl:text>Lebanon </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LC'">
				<xsl:text>Saint Lucia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LI'">
				<xsl:text>Liechtenstein </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LK'">
				<xsl:text>Sri Lanka </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LR'">
				<xsl:text>Liberia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LS'">
				<xsl:text>Lesotho </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LT'">
				<xsl:text>Lithuania </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LU'">
				<xsl:text>Luxembourg </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LV'">
				<xsl:text>Latvia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='LY'">
				<xsl:text>Libya </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MA'">
				<xsl:text>Morocco </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MC'">
				<xsl:text>Monaco </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MD'">
				<xsl:text>Republic of Moldova </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ME'">
				<xsl:text>Montenegro </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MG'">
				<xsl:text>Madagascar </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MH'">
				<xsl:text>Marshall Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MK'">
				<xsl:text>North Macedonia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ML'">
				<xsl:text>Mali </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MM'">
				<xsl:text>Myanmar </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MN'">
				<xsl:text>Mongolia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MO'">
				<xsl:text>Macao, China </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MP'">
				<xsl:text>Northern Mariana Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MQ'">
				<xsl:text>Martinique </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MR'">
				<xsl:text>Mauritania </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MS'">
				<xsl:text>Montserrat </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MT'">
				<xsl:text>Malta </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MU'">
				<xsl:text>Mauritius </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MV'">
				<xsl:text>Maldives </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MW'">
				<xsl:text>Malawi </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MX'">
				<xsl:text>Mexico </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MY'">
				<xsl:text>Malaysia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='MZ'">
				<xsl:text>Mozambique </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NA'">
				<xsl:text>Namibia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NC'">
				<xsl:text>New Caledonia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NE'">
				<xsl:text>Niger </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NF'">
				<xsl:text>Norfolk Island </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NG'">
				<xsl:text>Nigeria </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NI'">
				<xsl:text>Nicaragua </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NL'">
				<xsl:text>Netherlands (Kingdom of the) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NO'">
				<xsl:text>Norway </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NP'">
				<xsl:text>Nepal </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NR'">
				<xsl:text>Nauru </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NU'">
				<xsl:text>Niue </xsl:text>
			</xsl:when>
			<xsl:when test="$country='NZ'">
				<xsl:text>New Zealand </xsl:text>
			</xsl:when>
			<xsl:when test="$country='OM'">
				<xsl:text>Oman </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PA'">
				<xsl:text>Panama </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PE'">
				<xsl:text>Peru </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PF'">
				<xsl:text>French Polynesia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PG'">
				<xsl:text>Papua New Guinea </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PH'">
				<xsl:text>Philippines </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PK'">
				<xsl:text>Pakistan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PL'">
				<xsl:text>Poland </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PM'">
				<xsl:text>Saint Pierre and Miquelon </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PN'">
				<xsl:text>Pitcairn </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PR'">
				<xsl:text>Puerto Rico </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PS'">
				<xsl:text>Palestine </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PT'">
				<xsl:text>Portugal </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PW'">
				<xsl:text>Palau </xsl:text>
			</xsl:when>
			<xsl:when test="$country='PY'">
				<xsl:text>Paraguay </xsl:text>
			</xsl:when>
			<xsl:when test="$country='QA'">
				<xsl:text>Qatar </xsl:text>
			</xsl:when>
			<xsl:when test="$country='RE'">
				<xsl:text>Réunion </xsl:text>
			</xsl:when>
			<xsl:when test="$country='RO'">
				<xsl:text>Romania </xsl:text>
			</xsl:when>
			<xsl:when test="$country='RS'">
				<xsl:text>Serbia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='RU'">
				<xsl:text>Russian Federation </xsl:text>
			</xsl:when>
			<xsl:when test="$country='RW'">
				<xsl:text>Rwanda </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SA'">
				<xsl:text>Saudi Arabia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SB'">
				<xsl:text>Solomon Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SC'">
				<xsl:text>Seychelles </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SD'">
				<xsl:text>Sudan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SE'">
				<xsl:text>Sweden </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SG'">
				<xsl:text>Singapore </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SH'">
				<xsl:text>Saint Helena, Ascension and Tristan da Cunha </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SI'">
				<xsl:text>Slovenia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SJ'">
				<xsl:text>Svalbard and Jan Mayen </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SK'">
				<xsl:text>Slovakia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SL'">
				<xsl:text>Sierra Leone </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SM'">
				<xsl:text>San Marino </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SN'">
				<xsl:text>Senegal </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SO'">
				<xsl:text>Somalia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SR'">
				<xsl:text>Suriname </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SS'">
				<xsl:text>South Sudan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ST'">
				<xsl:text>Sao Tome and Principe </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SV'">
				<xsl:text>El Salvador </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SX'">
				<xsl:text>Sint Maarten (Dutch part) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SY'">
				<xsl:text>Syrian Arab Republic </xsl:text>
			</xsl:when>
			<xsl:when test="$country='SZ'">
				<xsl:text>Eswatini </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TC'">
				<xsl:text>Turks and Caicos Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TD'">
				<xsl:text>Chad </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TF'">
				<xsl:text>French Southern Territories </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TG'">
				<xsl:text>Togo </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TH'">
				<xsl:text>Thailand </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TJ'">
				<xsl:text>Tajikistan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TK'">
				<xsl:text>Tokelau </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TL'">
				<xsl:text>Timor–Leste </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TM'">
				<xsl:text>Turkmenistan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TN'">
				<xsl:text>Tunisia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TO'">
				<xsl:text>Tonga </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TP'">
				<xsl:text>East Timor </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TR'">
				<xsl:text>Türkiye </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TT'">
				<xsl:text>Trinidad and Tobago </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TV'">
				<xsl:text>Tuvalu </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TW'">
				<xsl:text>Taiwan, Province of China </xsl:text>
			</xsl:when>
			<xsl:when test="$country='TZ'">
				<xsl:text>United Republic of Tanzania </xsl:text>
			</xsl:when>
			<xsl:when test="$country='UA'">
				<xsl:text>Ukraine </xsl:text>
			</xsl:when>
			<xsl:when test="$country='UG'">
				<xsl:text>Uganda </xsl:text>
			</xsl:when>
			<xsl:when test="$country='UM'">
				<xsl:text>United States Minor Outlying Islands </xsl:text>
			</xsl:when>
			<xsl:when test="$country='US'">
				<xsl:text>United States of America </xsl:text>
			</xsl:when>
			<xsl:when test="$country='UY'">
				<xsl:text>Uruguay </xsl:text>
			</xsl:when>
			<xsl:when test="$country='UZ'">
				<xsl:text>Uzbekistan </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VA'">
				<xsl:text>Holy See </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VC'">
				<xsl:text>Saint Vincent and the Grenadines </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VE'">
				<xsl:text>Venezuela (Bolivarian Republic of) </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VG'">
				<xsl:text>Virgin Islands, British </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VI'">
				<xsl:text>Virgin Islands, U.S. </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VN'">
				<xsl:text>Viet Nam </xsl:text>
			</xsl:when>
			<xsl:when test="$country='VU'">
				<xsl:text>Vanuatu </xsl:text>
			</xsl:when>
			<xsl:when test="$country='WF'">
				<xsl:text>Wallis and Futuna </xsl:text>
			</xsl:when>
			<xsl:when test="$country='WS'">
				<xsl:text>Samoa </xsl:text>
			</xsl:when>
			<xsl:when test="$country='YE'">
				<xsl:text>Yemen </xsl:text>
			</xsl:when>
			<xsl:when test="$country='YT'">
				<xsl:text>Mayotte </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ZA'">
				<xsl:text>South Africa </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ZM'">
				<xsl:text>Zambia </xsl:text>
			</xsl:when>
			<xsl:when test="$country='ZW'">
				<xsl:text>Zimbabwe </xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$country"></xsl:value-of>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="designation_ChoiceText">   
		<xsl:param name="designation"></xsl:param>   
		<xsl:choose>   
			<xsl:when test="$designation/@designation='all'">   
				Todos os Estados designados    
			</xsl:when>   
			<xsl:when test="$designation/@designation='all-except-us'">   
				Todos os Estados designados excepto os Estados Unidos da América    
			</xsl:when>   
			<xsl:when test="$designation/@designation='us-only'">   
				Apenas os Estados Unidos da América    
			</xsl:when>   
			<xsl:when test="$designation/@designation='as-indicated'">
				<!-- do region: (countries); countries -->
				<xsl:for-each select="$designation/designated-states/region">
					<xsl:sort select="."></xsl:sort>
					<xsl:variable name="pos" select="position() +1"></xsl:variable>
					<xsl:value-of select="concat(translate(normalize-space(.),'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ'),': ','(')"></xsl:value-of> 
					<xsl:for-each select="following-sibling::country[not(preceding-sibling::region[$pos])]">
						<xsl:sort select="."></xsl:sort>   
						<xsl:choose>   
							<xsl:when test="text()='ch' or text() = 'CH'">  
								<xsl:text>CH&amp;LI </xsl:text>   
							</xsl:when>   
							<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
							<xsl:otherwise>   
								<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
								<xsl:if test="following-sibling::country[not(preceding-sibling::region[$pos])]">
									<xsl:text> 
									</xsl:text>   
								</xsl:if>   
							</xsl:otherwise>   
						</xsl:choose>
					</xsl:for-each>);<xsl:text> 
					</xsl:text>
				</xsl:for-each>
				<xsl:for-each select="$designation/designated-states/country[not(preceding-sibling::region)]">
					<xsl:sort select="."></xsl:sort>   
					<xsl:choose>   
						<xsl:when test="text()='ch' or text() = 'CH'">  
							<xsl:text>CH&amp;LI </xsl:text>   
						</xsl:when>   
						<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
						<xsl:otherwise>   
							<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
							<xsl:text> 
							</xsl:text>   
						</xsl:otherwise>   
					</xsl:choose>
				</xsl:for-each>   
			</xsl:when>   
		</xsl:choose>   
	</xsl:template><xsl:template name="designationEn_ChoiceText">   
		<xsl:param name="designation"></xsl:param>   
		<xsl:choose>   
			<xsl:when test="$designation/@designation='all'">   
				<xsl:text>all designated States</xsl:text>   
			</xsl:when>   
			<xsl:when test="$designation/@designation='all-except-us'">   
				<xsl:text>all designated States except US</xsl:text>   
			</xsl:when>   
			<xsl:when test="$designation/@designation='us-only'">   
				<xsl:text>US only</xsl:text>   
			</xsl:when>   
			<xsl:when test="$designation/@designation='as-indicated'">  
				<!-- do region: (countries); countries -->
				<xsl:for-each select="$designation/designated-states/region">
					<xsl:sort select="."></xsl:sort>
					<xsl:variable name="pos" select="position() +1"></xsl:variable>
					<xsl:value-of select="concat(translate(normalize-space(.),'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ'),': ','(')"></xsl:value-of> 
					<xsl:for-each select="following-sibling::country[not(preceding-sibling::region[$pos])]">
						<xsl:sort select="."></xsl:sort>   
						<xsl:choose>   
							<xsl:when test="text()='ch' or text() = 'CH'">  
								<xsl:text>CH&amp;LI </xsl:text>   
							</xsl:when>   
							<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
							<xsl:otherwise>   
								<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
								<xsl:if test="following-sibling::country[not(preceding-sibling::region[$pos])]">
									<xsl:text> 
									</xsl:text>   
								</xsl:if>   
							</xsl:otherwise>   
						</xsl:choose>
					</xsl:for-each>);<xsl:text> 
					</xsl:text>
				</xsl:for-each>
				<xsl:for-each select="$designation/designated-states/country[not(preceding-sibling::region)]">
					<xsl:sort select="."></xsl:sort>   
					<xsl:choose>   
						<xsl:when test="text()='ch' or text() = 'CH'">  
							<xsl:text>CH&amp;LI </xsl:text>   
						</xsl:when>   
						<xsl:when test="text() = 'li' or text() = 'LI'"></xsl:when>   
						<xsl:otherwise>   
							<xsl:value-of select="translate(.,'abdefghijklmnopqrstuvwxyz','ABDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:value-of>   
							<xsl:text> 
							</xsl:text>   
						</xsl:otherwise>   
					</xsl:choose>
				</xsl:for-each>   
			</xsl:when>   
		</xsl:choose>   
	</xsl:template>
	<xsl:template name="typeOfDisclosure_ChoiceText">
		<xsl:param name="type"></xsl:param>
		<xsl:choose>
			<xsl:when test="$type='international-exhibition'">
				Exposição internacional 
			</xsl:when>
			<xsl:when test="$type='publication'">
				Publicação 
			</xsl:when>
			<xsl:when test="$type='abuse'">
				Utilização abusiva 
			</xsl:when>
			<xsl:when test="$type='other'">
				Outro: 
				<xsl:value-of select="."></xsl:value-of>
			</xsl:when>			
		</xsl:choose>
	</xsl:template>
	<xsl:template name="applicantType_ChoiceText">
   <xsl:param name="app-type"></xsl:param>
   	  <xsl:choose>
   	  	<xsl:when test="$app-type='applicant'">
			Apenas requerente    
   	  	</xsl:when>
   	  	<xsl:when test="$app-type='applicant-inventor'">
   	  		Requerente e inventor     	  		
   	  	</xsl:when>
   	  </xsl:choose>
   </xsl:template><xsl:template name="applicantTypeEn_ChoiceText">
   <xsl:param name="app-type"></xsl:param>
   	  <xsl:choose>
   	  	<xsl:when test="$app-type='applicant'">
			<xsl:text>applicant only</xsl:text>   	  	
   	  	</xsl:when>
   	  	<xsl:when test="$app-type='applicant-inventor'">
   	  		<xsl:text>applicant and inventor</xsl:text>
   	  	</xsl:when>
   	  </xsl:choose>
   </xsl:template><xsl:template name="kind_ChoiceText">
   <xsl:param name="kind"></xsl:param>
   		<xsl:choose>
			<xsl:when test="$kind='heir'">
				Herdeiro 
			</xsl:when>
			<xsl:when test="$kind='heiress'">
				Herdeira 
			</xsl:when>
			<xsl:when test="$kind='heirs'">
				Herdeiros 
			</xsl:when>
			<xsl:when test="$kind='executor'">
				Testamenteiro 
			</xsl:when>
			<xsl:when test="$kind='executrix'">
				Testamenteira 
			</xsl:when>
			<xsl:when test="$kind='executors'">
				Testamenteiros 
			</xsl:when>
			<xsl:when test="$kind='legal-heirs'">
				Herdeiros legais 
			</xsl:when>
			<xsl:when test="$kind='legal-representative'">
				Representante legal 
			</xsl:when>
			<xsl:when test="$kind='legal-representatives'">
				Representantes legais 
			</xsl:when>
			<xsl:when test="$kind='administrator'">
				Administrador  				
   			</xsl:when>
			<xsl:when test="$kind='administratrix'">
				Administradora 				
   			</xsl:when>
			<xsl:when test="$kind='estate'">
				Bens de sucessão 				
   			</xsl:when>
   		</xsl:choose>
   </xsl:template>
	<xsl:template name="representBefore_ChoiceText">
		<xsl:param name="arg"></xsl:param>
		<xsl:choose>
			<xsl:when test="$arg='all-authorities'">
				todas as Autoridades Internacionais competentes 
			</xsl:when>
			<xsl:when test="$arg='isa-only'">
				únicamente a Autoridade Responsável pela Pesquisa Internacional 				
			</xsl:when>
			<xsl:when test="$arg='ipea-only'">
				únicamente a Autoridade Responsável pelo Exame Preliminar Internacional 
			</xsl:when>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="agentType_ChoiceText">
   <xsl:param name="rep-type"></xsl:param>
   	  <xsl:choose>
   	  	<xsl:when test="$rep-type='agent'">
   	  		Mandatário 
   	  	</xsl:when>
   	  	<xsl:when test="$rep-type='attorney'">
	   	  	Mandatário 
   	  	</xsl:when>
   	  	<xsl:when test="$rep-type='common-representative'">
	   	  	Representante comum 
   	  	</xsl:when>
   	  </xsl:choose>
   </xsl:template><xsl:template name="agentTypeEn_ChoiceText">
   <xsl:param name="rep-type"></xsl:param>
   	  <xsl:choose>
   	  	<xsl:when test="$rep-type='agent'">
			<xsl:text>agent</xsl:text>   	  	
   	  	</xsl:when>
   	  	<xsl:when test="$rep-type='attorney'">
   	  		<xsl:text>attorney</xsl:text>
   	  	</xsl:when>
   	  	<xsl:when test="$rep-type='common-representative'">
   	  		<xsl:text>common representative </xsl:text>
   	  	</xsl:when>
   	  </xsl:choose>
   </xsl:template>
	<xsl:template name="country_ChoiceText">
		<xsl:param name="country"></xsl:param>
		<xsl:choose>
			<xsl:when test="$country='AD'">
				Andorra 
			</xsl:when>
			<xsl:when test="$country='AE'">
				Emirados Árabes Unidos 
			</xsl:when>
			<xsl:when test="$country='AF'">
				Afeganistão 
			</xsl:when>
			<xsl:when test="$country='AG'">
				Antígua e Barbuda 
			</xsl:when>
			<xsl:when test="$country='AI'">
				Anguila 
			</xsl:when>
			<xsl:when test="$country='AL'">
				Albânia 
			</xsl:when>
			<xsl:when test="$country='AM'">
				Arménia 
			</xsl:when>
			<xsl:when test="$country='AN'">
				
			</xsl:when>
			<xsl:when test="$country='AO'">
				Angola 
			</xsl:when>
			<xsl:when test="$country='AP'">
				
			</xsl:when>
			<xsl:when test="$country='AQ'">
				Antártica 
			</xsl:when>
			<xsl:when test="$country='AR'">
				Argentina 
			</xsl:when>
			<xsl:when test="$country='AS'">
				Samoa Americana 
			</xsl:when>
			<xsl:when test="$country='AT'">
				Áustria 
			</xsl:when>
			<xsl:when test="$country='AU'">
				Austrália 
			</xsl:when>
			<xsl:when test="$country='AW'">
				Aruba 
			</xsl:when>
			<xsl:when test="$country='AX'">
				Ilhas Alanda 
			</xsl:when>
			<xsl:when test="$country='AZ'">
				Azerbaijão 
			</xsl:when>
			<xsl:when test="$country='BA'">
				Bósnia-Herzegovina 
			</xsl:when>
			<xsl:when test="$country='BB'">
				Barbados 
			</xsl:when>
			<xsl:when test="$country='BD'">
				Bangladeche 
			</xsl:when>
			<xsl:when test="$country='BE'">
				Bélgica 
			</xsl:when>
			<xsl:when test="$country='BF'">
				Burquina Faso 
			</xsl:when>
			<xsl:when test="$country='BG'">
				Bulgária 
			</xsl:when>
			<xsl:when test="$country='BH'">
				Barém 
			</xsl:when>
			<xsl:when test="$country='BI'">
				Burundi 
			</xsl:when>
			<xsl:when test="$country='BJ'">
				Benim 
			</xsl:when>
			<xsl:when test="$country='BM'">
				Bermudas 
			</xsl:when>
			<xsl:when test="$country='BN'">
				Brunei Darussalã 
			</xsl:when>
			<xsl:when test="$country='BO'">
				Bolívia (Estado Plurinacional da) 
			</xsl:when>
			<xsl:when test="$country='BQ'">
				Bonaire, Santo Eustáquio e Saba 
			</xsl:when>
			<xsl:when test="$country='BR'">
				Brasil 
			</xsl:when>
			<xsl:when test="$country='BS'">
				Baamas 
			</xsl:when>
			<xsl:when test="$country='BT'">
				Butão 
			</xsl:when>
			<xsl:when test="$country='BV'">
				Ilha Bouvet 
			</xsl:when>
			<xsl:when test="$country='BW'">
				Botsuana 
			</xsl:when>
			<xsl:when test="$country='BX'">
				
			</xsl:when>
			<xsl:when test="$country='BY'">
				Bielo-rússia 
			</xsl:when>
			<xsl:when test="$country='BZ'">
				Belize 
			</xsl:when>
			<xsl:when test="$country='CA'">
				Canadá 
			</xsl:when>
			<xsl:when test="$country='CC'">
				Ilhas Cocos (Keeling) 
			</xsl:when>
			<xsl:when test="$country='CD'">
				República Democrática do Congo 
			</xsl:when>
			<xsl:when test="$country='CF'">
				República Centro-Africana 
			</xsl:when>
			<xsl:when test="$country='CG'">
				Congo 
			</xsl:when>
			<xsl:when test="$country='CH'">
				Suíça 
			</xsl:when>
			<xsl:when test="$country='CI'">
				Costa do Marfim 
			</xsl:when>
			<xsl:when test="$country='CK'">
				Ilhas Cook 
			</xsl:when>
			<xsl:when test="$country='CL'">
				Chile 
			</xsl:when>
			<xsl:when test="$country='CM'">
				Camarões 
			</xsl:when>
			<xsl:when test="$country='CN'">
				China 
			</xsl:when>
			<xsl:when test="$country='CO'">
				Colômbia 
			</xsl:when>
			<xsl:when test="$country='CR'">
				Costa Rica 
			</xsl:when>
			<xsl:when test="$country='CU'">
				Cuba 
			</xsl:when>
			<xsl:when test="$country='CV'">
				Cabo Verde 
			</xsl:when>
			<xsl:when test="$country='CW'">
				Curaçau 
			</xsl:when>
			<xsl:when test="$country='CX'">
				Ilha do Natal 
			</xsl:when>
			<xsl:when test="$country='CY'">
				Chipre 
			</xsl:when>
			<xsl:when test="$country='CZ'">
				Chéquia 
			</xsl:when>
			<xsl:when test="$country='DE'">
				Alemanha 
			</xsl:when>
			<xsl:when test="$country='DJ'">
				Jibuti 
			</xsl:when>
			<xsl:when test="$country='DK'">
				Dinamarca 
			</xsl:when>
			<xsl:when test="$country='DM'">
				Domínica 
			</xsl:when>
			<xsl:when test="$country='DO'">
				República Dominicana 
			</xsl:when>
			<xsl:when test="$country='DZ'">
				Argélia 
			</xsl:when>
			<xsl:when test="$country='EA'">
				
			</xsl:when>
			<xsl:when test="$country='EC'">
				Equador 
			</xsl:when>
			<xsl:when test="$country='EE'">
				Estónia 
			</xsl:when>
			<xsl:when test="$country='EG'">
				Egito 
			</xsl:when>
			<xsl:when test="$country='EH'">
				Sara Ocidental 
			</xsl:when>
			<xsl:when test="$country='EM'">
				
			</xsl:when>
			<xsl:when test="$country='EP'">
				
			</xsl:when>
			<xsl:when test="$country='ER'">
				Eritreia 
			</xsl:when>
			<xsl:when test="$country='ES'">
				Espanha 
			</xsl:when>
			<xsl:when test="$country='ET'">
				Etiópia 
			</xsl:when>
			<xsl:when test="$country='FI'">
				Finlândia 
			</xsl:when>
			<xsl:when test="$country='FJ'">
				Fiji 
			</xsl:when>
			<xsl:when test="$country='FK'">
				Ilhas Falkland (Malvinas) 
			</xsl:when>
			<xsl:when test="$country='FM'">
				Micronésia (Estados Federados da) 
			</xsl:when>
			<xsl:when test="$country='FO'">
				Ilhas Faroé 
			</xsl:when>
			<xsl:when test="$country='FR'">
				França 
			</xsl:when>
			<xsl:when test="$country='GA'">
				Gabão 
			</xsl:when>
			<xsl:when test="$country='GB'">
				Reino Unido 
			</xsl:when>
			<xsl:when test="$country='GC'">
				
			</xsl:when>
			<xsl:when test="$country='GD'">
				Granada 
			</xsl:when>
			<xsl:when test="$country='GE'">
				Geórgia 
			</xsl:when>
			<xsl:when test="$country='GF'">
				Guiana Francesa 
			</xsl:when>
			<xsl:when test="$country='GG'">
				Guernesey 
			</xsl:when>
			<xsl:when test="$country='GH'">
				Gana 
			</xsl:when>
			<xsl:when test="$country='GI'">
				Gibraltar 
			</xsl:when>
			<xsl:when test="$country='GL'">
				Gronelândia 
			</xsl:when>
			<xsl:when test="$country='GM'">
				Gâmbia 
			</xsl:when>
			<xsl:when test="$country='GN'">
				Guiné 
			</xsl:when>
			<xsl:when test="$country='GP'">
				Guadalupe 
			</xsl:when>
			<xsl:when test="$country='GQ'">
				Guiné Equatorial 
			</xsl:when>
			<xsl:when test="$country='GR'">
				Grécia 
			</xsl:when>
			<xsl:when test="$country='GS'">
				Ilhas Geórgia do Sul e Sandwich do Sul 
			</xsl:when>
			<xsl:when test="$country='GT'">
				Guatemala 
			</xsl:when>
			<xsl:when test="$country='GU'">
				Guame 
			</xsl:when>
			<xsl:when test="$country='GW'">
				Guiné-Bissau 
			</xsl:when>
			<xsl:when test="$country='GY'">
				Guiana 
			</xsl:when>
			<xsl:when test="$country='HK'">
				Hong Kong, China 
			</xsl:when>
			<xsl:when test="$country='HM'">
				Ilha Heard e Ilhas McDonald 
			</xsl:when>
			<xsl:when test="$country='HN'">
				Honduras 
			</xsl:when>
			<xsl:when test="$country='HR'">
				Croácia 
			</xsl:when>
			<xsl:when test="$country='HT'">
				Haiti 
			</xsl:when>
			<xsl:when test="$country='HU'">
				Hungria 
			</xsl:when>
			<xsl:when test="$country='IB'">
				
			</xsl:when>
			<xsl:when test="$country='ID'">
				Indonésia 
			</xsl:when>
			<xsl:when test="$country='IE'">
				Irlanda 
			</xsl:when>
			<xsl:when test="$country='IL'">
				Israel 
			</xsl:when>
			<xsl:when test="$country='IM'">
				Ilha de Man 
			</xsl:when>
			<xsl:when test="$country='IN'">
				Índia 
			</xsl:when>
			<xsl:when test="$country='IO'">
				Território Britânico do Oceano Índico 
			</xsl:when>
			<xsl:when test="$country='IQ'">
				Iraque 
			</xsl:when>
			<xsl:when test="$country='IR'">
				Irão (República Islâmica do) 
			</xsl:when>
			<xsl:when test="$country='IS'">
				Islândia 
			</xsl:when>
			<xsl:when test="$country='IT'">
				Itália 
			</xsl:when>
			<xsl:when test="$country='JE'">
				Jersey 
			</xsl:when>
			<xsl:when test="$country='JM'">
				Jamaica 
			</xsl:when>
			<xsl:when test="$country='JO'">
				Jordânia 
			</xsl:when>
			<xsl:when test="$country='JP'">
				Japão 
			</xsl:when>
			<xsl:when test="$country='KE'">
				Quénia 
			</xsl:when>
			<xsl:when test="$country='KG'">
				Quirguistão 
			</xsl:when>
			<xsl:when test="$country='KH'">
				Camboja 
			</xsl:when>
			<xsl:when test="$country='KI'">
				Quiribáti 
			</xsl:when>
			<xsl:when test="$country='KM'">
				Comores 
			</xsl:when>
			<xsl:when test="$country='KN'">
				São Cristóvão e Neves 
			</xsl:when>
			<xsl:when test="$country='KP'">
				República Popular Democrática da Coreia 
			</xsl:when>
			<xsl:when test="$country='KR'">
				República da Coreia 
			</xsl:when>
			<xsl:when test="$country='KW'">
				Koweit 
			</xsl:when>
			<xsl:when test="$country='KY'">
				Ilhas Caimão 
			</xsl:when>
			<xsl:when test="$country='KZ'">
				Cazaquistão 
			</xsl:when>
			<xsl:when test="$country='LA'">
				Laos, República Democrática Popular do 
			</xsl:when>
			<xsl:when test="$country='LB'">
				Líbano 
			</xsl:when>
			<xsl:when test="$country='LC'">
				Santa Lúcia 
			</xsl:when>
			<xsl:when test="$country='LI'">
				Listenstaine 
			</xsl:when>
			<xsl:when test="$country='LK'">
				Sri Lanca 
			</xsl:when>
			<xsl:when test="$country='LR'">
				Libéria 
			</xsl:when>
			<xsl:when test="$country='LS'">
				Lesoto 
			</xsl:when>
			<xsl:when test="$country='LT'">
				Lituânia 
			</xsl:when>
			<xsl:when test="$country='LU'">
				Luxemburgo 
			</xsl:when>
			<xsl:when test="$country='LV'">
				Letónia 
			</xsl:when>
			<xsl:when test="$country='LY'">
				Líbia 
			</xsl:when>
			<xsl:when test="$country='MA'">
				Marrocos 
			</xsl:when>
			<xsl:when test="$country='MC'">
				Mónaco 
			</xsl:when>
			<xsl:when test="$country='MD'">
				República da Moldávia 
			</xsl:when>
			<xsl:when test="$country='ME'">
				Montenegro 
			</xsl:when>
			<xsl:when test="$country='MG'">
				Madagáscar 
			</xsl:when>
			<xsl:when test="$country='MH'">
				Ilhas Marshall 
			</xsl:when>
			<xsl:when test="$country='MK'">
				Macedónia do Norte 
			</xsl:when>
			<xsl:when test="$country='ML'">
				Mali 
			</xsl:when>
			<xsl:when test="$country='MM'">
				Mianmar 
			</xsl:when>
			<xsl:when test="$country='MN'">
				Mongólia 
			</xsl:when>
			<xsl:when test="$country='MO'">
				Macau, China 
			</xsl:when>
			<xsl:when test="$country='MP'">
				Ilhas Marianas do Norte 
			</xsl:when>
			<xsl:when test="$country='MQ'">
				Martinica 
			</xsl:when>
			<xsl:when test="$country='MR'">
				Mauritânia 
			</xsl:when>
			<xsl:when test="$country='MS'">
				Montserrat 
			</xsl:when>
			<xsl:when test="$country='MT'">
				Malta 
			</xsl:when>
			<xsl:when test="$country='MU'">
				Maurícia 
			</xsl:when>
			<xsl:when test="$country='MV'">
				Maldivas 
			</xsl:when>
			<xsl:when test="$country='MW'">
				Maláui 
			</xsl:when>
			<xsl:when test="$country='MX'">
				México 
			</xsl:when>
			<xsl:when test="$country='MY'">
				Malásia 
			</xsl:when>
			<xsl:when test="$country='MZ'">
				Moçambique 
			</xsl:when>
			<xsl:when test="$country='NA'">
				Namíbia 
			</xsl:when>
			<xsl:when test="$country='NC'">
				Nova Caledónia 
			</xsl:when>
			<xsl:when test="$country='NE'">
				Níger 
			</xsl:when>
			<xsl:when test="$country='NF'">
				Ilha Norfolk 
			</xsl:when>
			<xsl:when test="$country='NG'">
				Nigéria 
			</xsl:when>
			<xsl:when test="$country='NI'">
				Nicarágua 
			</xsl:when>
			<xsl:when test="$country='NL'">
				Países Baixos (Reino dos) 
			</xsl:when>
			<xsl:when test="$country='NO'">
				Noruega 
			</xsl:when>
			<xsl:when test="$country='NP'">
				Nepal 
			</xsl:when>
			<xsl:when test="$country='NR'">
				Nauru 
			</xsl:when>
			<xsl:when test="$country='NU'">
				Niuê 
			</xsl:when>
			<xsl:when test="$country='NZ'">
				Nova Zelândia 
			</xsl:when>
			<xsl:when test="$country='OA'">
				
			</xsl:when>
			<xsl:when test="$country='OM'">
				Omã 
			</xsl:when>
			<xsl:when test="$country='PA'">
				Panamá 
			</xsl:when>
			<xsl:when test="$country='PE'">
				Peru 
			</xsl:when>
			<xsl:when test="$country='PF'">
				Polinésia Francesa 
			</xsl:when>
			<xsl:when test="$country='PG'">
				Papua-Nova Guiné 
			</xsl:when>
			<xsl:when test="$country='PH'">
				Filipinas 
			</xsl:when>
			<xsl:when test="$country='PK'">
				Paquistão 
			</xsl:when>
			<xsl:when test="$country='PL'">
				Polónia 
			</xsl:when>
			<xsl:when test="$country='PM'">
				São Pedro e Miquelão 
			</xsl:when>
			<xsl:when test="$country='PN'">
				Ilhas Pitcairn 
			</xsl:when>
			<xsl:when test="$country='PR'">
				Porto Rico 
			</xsl:when>
			<xsl:when test="$country='PS'">
				Território Palestino Ocupado 
			</xsl:when>
			<xsl:when test="$country='PT'">
				Portugal 
			</xsl:when>
			<xsl:when test="$country='PW'">
				Palau 
			</xsl:when>
			<xsl:when test="$country='PY'">
				Paraguai 
			</xsl:when>
			<xsl:when test="$country='QA'">
				Catar 
			</xsl:when>
			<xsl:when test="$country='RE'">
				Reunião 
			</xsl:when>
			<xsl:when test="$country='RO'">
				Roménia 
			</xsl:when>
			<xsl:when test="$country='RS'">
				Sérvia 
			</xsl:when>
			<xsl:when test="$country='RU'">
				Rússia, Federação da 
			</xsl:when>
			<xsl:when test="$country='RW'">
				Ruanda 
			</xsl:when>
			<xsl:when test="$country='SA'">
				Arábia Saudita 
			</xsl:when>
			<xsl:when test="$country='SB'">
				Ilhas Salomão 
			</xsl:when>
			<xsl:when test="$country='SC'">
				Seicheles 
			</xsl:when>
			<xsl:when test="$country='SD'">
				Sudão 
			</xsl:when>
			<xsl:when test="$country='SE'">
				Suécia 
			</xsl:when>
			<xsl:when test="$country='SG'">
				Singapura 
			</xsl:when>
			<xsl:when test="$country='SH'">
				Santa Helena, Ascensão e Tristão da Cunha 
			</xsl:when>
			<xsl:when test="$country='SI'">
				Eslovénia 
			</xsl:when>
			<xsl:when test="$country='SJ'">
				Svalbard e Jan Mayen 
			</xsl:when>
			<xsl:when test="$country='SK'">
				Eslováquia 
			</xsl:when>
			<xsl:when test="$country='SL'">
				Serra Leoa 
			</xsl:when>
			<xsl:when test="$country='SM'">
				São Marinho 
			</xsl:when>
			<xsl:when test="$country='SN'">
				Senegal 
			</xsl:when>
			<xsl:when test="$country='SO'">
				Somália 
			</xsl:when>
			<xsl:when test="$country='SR'">
				Suriname 
			</xsl:when>
			<xsl:when test="$country='SS'">
				Sudão do Sul 
			</xsl:when>
			<xsl:when test="$country='ST'">
				São Tomé e Príncipe 
			</xsl:when>
			<xsl:when test="$country='SV'">
				Salvador 
			</xsl:when>
			<xsl:when test="$country='SX'">
				São Martinho (Sint Maarten) 
			</xsl:when>
			<xsl:when test="$country='SY'">
				República Árabe da Síria 
			</xsl:when>
			<xsl:when test="$country='SZ'">
				eSwatini 
			</xsl:when>
			<xsl:when test="$country='TC'">
				Ilhas Turcas e Caicos 
			</xsl:when>
			<xsl:when test="$country='TD'">
				Chade 
			</xsl:when>
			<xsl:when test="$country='TF'">
				Terras Austrais e Antárticas Francesas 
			</xsl:when>
			<xsl:when test="$country='TG'">
				Togo 
			</xsl:when>
			<xsl:when test="$country='TH'">
				Tailândia 
			</xsl:when>
			<xsl:when test="$country='TJ'">
				Tajiquistão 
			</xsl:when>
			<xsl:when test="$country='TK'">
				Toquelau 
			</xsl:when>
			<xsl:when test="$country='TL'">
				Timor-Leste 
			</xsl:when>
			<xsl:when test="$country='TM'">
				Turquemenistão 
			</xsl:when>
			<xsl:when test="$country='TN'">
				Tunísia 
			</xsl:when>
			<xsl:when test="$country='TO'">
				Tonga 
			</xsl:when>
			<xsl:when test="$country='TP'">
				Timor-Leste 
			</xsl:when>
			<xsl:when test="$country='TR'">
				Türkiye 
			</xsl:when>
			<xsl:when test="$country='TT'">
				Trindade e Tobago 
			</xsl:when>
			<xsl:when test="$country='TV'">
				Tuvalu 
			</xsl:when>
			<xsl:when test="$country='TW'">
				Taiwan, Província da China 
			</xsl:when>
			<xsl:when test="$country='TZ'">
				República Unida da Tanzânia 
			</xsl:when>
			<xsl:when test="$country='UA'">
				Ucrânia 
			</xsl:when>
			<xsl:when test="$country='UG'">
				Uganda 
			</xsl:when>
			<xsl:when test="$country='UM'">
				Ilhas Menores Afastadas dos EU 
			</xsl:when>
			<xsl:when test="$country='US'">
				Estados Unidos da América 
			</xsl:when>
			<xsl:when test="$country='UY'">
				Uruguai 
			</xsl:when>
			<xsl:when test="$country='UZ'">
				Usbequistão 
			</xsl:when>
			<xsl:when test="$country='VA'">
				Santa Sé 
			</xsl:when>
			<xsl:when test="$country='VC'">
				São Vicente e Granadinas 
			</xsl:when>
			<xsl:when test="$country='VE'">
				Venezuela (República Bolivariana da) 
			</xsl:when>
			<xsl:when test="$country='VG'">
				Ilhas Virgens (Britânicas) 
			</xsl:when>
			<xsl:when test="$country='VI'">
				Ilhas Virgens Americanas 
			</xsl:when>
			<xsl:when test="$country='VN'">
				Vietname 
			</xsl:when>
			<xsl:when test="$country='VU'">
				Vanuatu 
			</xsl:when>
			<xsl:when test="$country='WF'">
				Wallis e Futuna 
			</xsl:when>
			<xsl:when test="$country='WO'">
				
			</xsl:when>
			<xsl:when test="$country='WS'">
				Samoa 
			</xsl:when>
			<xsl:when test="$country='XV'">
				
			</xsl:when>
			<xsl:when test="$country='YE'">
				Iémen 
			</xsl:when>
			<xsl:when test="$country='YT'">
				Maiote 
			</xsl:when>
			<xsl:when test="$country='YU'">
				
			</xsl:when>
			<xsl:when test="$country='ZA'">
				África do Sul 
			</xsl:when>
			<xsl:when test="$country='ZM'">
				Zâmbia 
			</xsl:when>
			<xsl:when test="$country='ZW'">
				Zimbabué 
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$country"></xsl:value-of>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="language_ChoiceText">
	<xsl:param name="lang"></xsl:param>
		<xsl:choose>
		  <xsl:when test="$lang='aa'">
			  Afar 
		  </xsl:when>
		  <xsl:when test="$lang='ab'">
			 Abkhazian 
		  </xsl:when>
		  <xsl:when test="$lang='ae'">
			 Avestan 
		  </xsl:when>
		  <xsl:when test="$lang='af'">
			 Afrikaans 
		  </xsl:when>
		  <xsl:when test="$lang='am'">
			 Amharic 
		  </xsl:when>
		  <xsl:when test="$lang='ar'">
			 Árabe 
		  </xsl:when>
		  <xsl:when test="$lang='as'">
			 Assamese 
		  </xsl:when>
		  <xsl:when test="$lang='ay'">
			 Aymara 
		  </xsl:when>
		  <xsl:when test="$lang='az'">
			 Azerbaijani 
		  </xsl:when>
		  <xsl:when test="$lang='ba'">
			 Bashkir 
		  </xsl:when>
		  <xsl:when test="$lang='be'">
			 Bielorusso 
		  </xsl:when>
		  <xsl:when test="$lang='bg'">
			 Búlgaro 
		  </xsl:when>
		  <xsl:when test="$lang='bh'">
			 Bihari 
		  </xsl:when>
		  <xsl:when test="$lang='bi'">
			 Bislama 
		  </xsl:when>
		  <xsl:when test="$lang='bn'">
			 Bengali 
		  </xsl:when>
		  <xsl:when test="$lang='bo'">
			 Tibetano 
		  </xsl:when>
		  <xsl:when test="$lang='br'">
			 Breton 
		  </xsl:when>
		  <xsl:when test="$lang='bs'">
			 Bosnian 
		  </xsl:when>
		  <xsl:when test="$lang='ca'">
			 Catalan 
		  </xsl:when>
		  <xsl:when test="$lang='ce'">
			 Chechen 
		  </xsl:when>
		  <xsl:when test="$lang='ch'">
			 Chamorro 
		  </xsl:when>
		  <xsl:when test="$lang='co'">
			 Corsican 
		  </xsl:when>
		  <xsl:when test="$lang='cs'">
			 Checo 
		  </xsl:when>
		  <xsl:when test="$lang='cu'">
			 
		  </xsl:when>
		  <xsl:when test="$lang='cv'">
			 Chuvash 
		  </xsl:when>
		  <xsl:when test="$lang='cy'">
			 Galês 
		  </xsl:when>
		  <xsl:when test="$lang='da'">
			 Dinamarquês 
		  </xsl:when>
		  <xsl:when test="$lang='de'">
			 Alemão 
		  </xsl:when>
		  <xsl:when test="$lang='dz'">
			 Dzongkha 
		  </xsl:when>
		  <xsl:when test="$lang='el'">
			 Grego 
		  </xsl:when>
		  <xsl:when test="$lang='en'">
			 Inglês 
		  </xsl:when>
		  <xsl:when test="$lang='eo'">
			 Esperanto 
		  </xsl:when>
		  <xsl:when test="$lang='es'">
			 Espanhol 
		  </xsl:when>
		  <xsl:when test="$lang='et'">
			 Estónio 
		  </xsl:when>
		  <xsl:when test="$lang='eu'">
			 Basque 
		  </xsl:when>
		  <xsl:when test="$lang='fa'">
			 Persian 
		  </xsl:when>
		  <xsl:when test="$lang='fi'">
			 Finlandês 
		  </xsl:when>
		  <xsl:when test="$lang='fj'">
			 Fijian 
		  </xsl:when>
		  <xsl:when test="$lang='fo'">
			 Faroese 
		  </xsl:when>
		  <xsl:when test="$lang='fr'">
			 Francês 
		  </xsl:when>
		  <xsl:when test="$lang='fy'">
			 Frisian 
		  </xsl:when>
		  <xsl:when test="$lang='ga'">
			 Irlandês 
		  </xsl:when>
		  <xsl:when test="$lang='gd'">
			 Gaélico 
		  </xsl:when>
		  <xsl:when test="$lang='gl'">
			 Galêgo 
		  </xsl:when>
		  <xsl:when test="$lang='gn'">
			 Guarani 
		  </xsl:when>
		  <xsl:when test="$lang='gu'">
			 Gujarati 
		  </xsl:when>
		  <xsl:when test="$lang='gv'">
			 Manx 
		  </xsl:when>
		  <xsl:when test="$lang='ha'">
			 Hausa 
		  </xsl:when>
		  <xsl:when test="$lang='he'">
			 Hebraico 
		  </xsl:when>
		  <xsl:when test="$lang='hi'">
			 Hindi 
		  </xsl:when>
		  <xsl:when test="$lang='ho'">
			 Hiri Motu 
		  </xsl:when>
		  <xsl:when test="$lang='hr'">
			 Croata 
		  </xsl:when>
		  <xsl:when test="$lang='hu'">
			 Húngaro 
		  </xsl:when>
		  <xsl:when test="$lang='hy'">
			 Arménio 
		  </xsl:when>
		  <xsl:when test="$lang='hz'">
			 Herero 
		  </xsl:when>
		  <xsl:when test="$lang='ia'">
			 Interlingua 
		  </xsl:when>
		  <xsl:when test="$lang='id'">
			 Indonésio 
		  </xsl:when>
		  <xsl:when test="$lang='ie'">
			 Interlingue 
		  </xsl:when>
		  <xsl:when test="$lang='ik'">
			 Inupiaq 
		  </xsl:when>
		  <xsl:when test="$lang='io'">
			 Ido 
		  </xsl:when>
		  <xsl:when test="$lang='is'">
			 Islandês 
		  </xsl:when>
		  <xsl:when test="$lang='it'">
			 Italiano 
		  </xsl:when>
		  <xsl:when test="$lang='iu'">
			 Inuktitut 
		  </xsl:when>
		  <xsl:when test="$lang='ja'">
			 Japonês 
		  </xsl:when>
		  <xsl:when test="$lang='jv'">
			 Javanese 
		  </xsl:when>
		  <xsl:when test="$lang='ka'">
			 Georgiano 
		  </xsl:when>
		  <xsl:when test="$lang='ki'">
			 Kikuyu 
		  </xsl:when>
		  <xsl:when test="$lang='kj'">
			 Kuanyama 
		  </xsl:when>
		  <xsl:when test="$lang='kk'">
			 Kazakh 
		  </xsl:when>
		  <xsl:when test="$lang='kl'">
			 Greenlandic 
		  </xsl:when>
		  <xsl:when test="$lang='km'">
			 Cambojano 
		  </xsl:when>
		  <xsl:when test="$lang='kn'">
			 Kannada 
		  </xsl:when>
		  <xsl:when test="$lang='ko'">
			 Coreano 
		  </xsl:when>
		  <xsl:when test="$lang='ks'">
			 Kashmiri 
		  </xsl:when>
		  <xsl:when test="$lang='ku'">
			 Kurdish 
		  </xsl:when>
		  <xsl:when test="$lang='kv'">
			 Komi 
		  </xsl:when>
		  <xsl:when test="$lang='kw'">
			 Cornish 
		  </xsl:when>
		  <xsl:when test="$lang='ky'">
			 Kirghiz 
		  </xsl:when>
		  <xsl:when test="$lang='la'">
			 Latim 
		  </xsl:when>
		  <xsl:when test="$lang='lb'">
			 Luxemburguês 
		  </xsl:when>
		  <xsl:when test="$lang='ln'">
			 Lingala 
		  </xsl:when>
		  <xsl:when test="$lang='lo'">
			 Laosiano 
		  </xsl:when>
		  <xsl:when test="$lang='lt'">
			 Lituano 
		  </xsl:when>
		  <xsl:when test="$lang='lv'">
			 Letão 
		  </xsl:when>
		  <xsl:when test="$lang='mg'">
			 Malagasy 
		  </xsl:when>
		  <xsl:when test="$lang='mh'">
			 Marshallese 
		  </xsl:when>
		  <xsl:when test="$lang='mi'">
			 Maori 
		  </xsl:when>
		  <xsl:when test="$lang='mk'">
			 Macedonian 
		  </xsl:when>
		  <xsl:when test="$lang='ml'">
			 Malayalam 
		  </xsl:when>
		  <xsl:when test="$lang='mn'">
			 Mongol 
		  </xsl:when>
		  <xsl:when test="$lang='mo'">
			 Moldávio 
		  </xsl:when>
		  <xsl:when test="$lang='mr'">
			 Marathi 
		  </xsl:when>
		  <xsl:when test="$lang='ms'">
			 Malay 
		  </xsl:when>
		  <xsl:when test="$lang='mt'">
			 Maltese 
		  </xsl:when>
		  <xsl:when test="$lang='my'">
			 Birmanês 
		  </xsl:when>
		  <xsl:when test="$lang='na'">
			 Birmanês 
		  </xsl:when>
		  <xsl:when test="$lang='nb'">
			 Norueguês Bokmål
		  </xsl:when>
		  <xsl:when test="$lang='nd'">
			 Ndebele do Norte 
		  </xsl:when>
		  <xsl:when test="$lang='ne'">
			 Nepalês 
		  </xsl:when>
		  <xsl:when test="$lang='ng'">
			 Ndonga 
		  </xsl:when>
		  <xsl:when test="$lang='nl'">
			 Neerlandês 
		  </xsl:when>
		  <xsl:when test="$lang='nn'">
			 Norueguês Nynorsk 
		  </xsl:when>
		  <xsl:when test="$lang='no'">
			 Norueguês 
		  </xsl:when>
		  <xsl:when test="$lang='nr'">
			 Ndebele do Sul 
		  </xsl:when>
		  <xsl:when test="$lang='nv'">
			 Navajo 
		  </xsl:when>
		  <xsl:when test="$lang='ny'">
			 Chichewa 
		  </xsl:when>
		  <xsl:when test="$lang='oc'">
			 Occitan 
		  </xsl:when>
		  <xsl:when test="$lang='om'">
			 Oromo 
		  </xsl:when>
		  <xsl:when test="$lang='or'">
			 Oriya 
		  </xsl:when>
		  <xsl:when test="$lang='os'">
			 Ossetian 
		  </xsl:when>
		  <xsl:when test="$lang='pa'">
			 Punjabi 
		  </xsl:when>
		  <xsl:when test="$lang='pi'">
			 Pali 
		  </xsl:when>
		  <xsl:when test="$lang='pl'">
			 Polaco 
		  </xsl:when>
		  <xsl:when test="$lang='ps'">
			 Pushto 
		  </xsl:when>
		  <xsl:when test="$lang='pt'">
			 Português 
		  </xsl:when>
		  <xsl:when test="$lang='qu'">
			 Quechua 
		  </xsl:when>
		  <xsl:when test="$lang='rm'">
			 Raeto-Romance 
		  </xsl:when>
		  <xsl:when test="$lang='rn'">
			 Rundi 
		  </xsl:when>
		  <xsl:when test="$lang='ro'">
			 Romeno 
		  </xsl:when>
		  <xsl:when test="$lang='ru'">
			 Russo 
		  </xsl:when>
		  <xsl:when test="$lang='rw'">
			 Kinyarwanda 
		  </xsl:when>
		  <xsl:when test="$lang='sa'">
			 Sanskrit 
		  </xsl:when>
		  <xsl:when test="$lang='sc'">
			 Sardinian 
		  </xsl:when>
		  <xsl:when test="$lang='sd'">
			 Sindhi 
		  </xsl:when>
		  <xsl:when test="$lang='se'">
			 Sami do Norte
		  </xsl:when>
		  <xsl:when test="$lang='sg'">
			 Sango 
		  </xsl:when>
		  <xsl:when test="$lang='sh'">
			  Servo-croata 
		  </xsl:when>      
		  <xsl:when test="$lang='si'">
			 Cingalês 
		  </xsl:when>
		  <xsl:when test="$lang='sk'">
			 Eslovaco 
		  </xsl:when>
		  <xsl:when test="$lang='sl'">
			 Esloveno 
		  </xsl:when>
		  <xsl:when test="$lang='sm'">
			 Samoan 
		  </xsl:when>
		  <xsl:when test="$lang='sn'">
			 Shona 
		  </xsl:when>
		  <xsl:when test="$lang='so'">
			 Somali 
		  </xsl:when>
		  <xsl:when test="$lang='sq'">
			 Albanês 
		  </xsl:when>
		  <xsl:when test="$lang='sr'">
			 Sérvio 
		  </xsl:when>
		  <xsl:when test="$lang='ss'">
			 Swati 
		  </xsl:when>
		  <xsl:when test="$lang='st'">
			 Sotho do Sul 
		  </xsl:when>
		  <xsl:when test="$lang='su'">
			 Sundanês 
		  </xsl:when>
		  <xsl:when test="$lang='sv'">
			 Sueco 
		  </xsl:when>
		  <xsl:when test="$lang='sw'">
			 Swahili 
		  </xsl:when>
		  <xsl:when test="$lang='ta'">
			 Tamil 
		  </xsl:when>
		  <xsl:when test="$lang='te'">
			 Telugu 
		  </xsl:when>
		  <xsl:when test="$lang='tg'">
			 Tajik 
		  </xsl:when>
		  <xsl:when test="$lang='th'">
			 Thai 
		  </xsl:when>
		  <xsl:when test="$lang='ti'">
			 Tigrinya 
		  </xsl:when>
		  <xsl:when test="$lang='tk'">
			 Turkmen 
		  </xsl:when>
		  <xsl:when test="$lang='tl'">
			 Tagalog 
		  </xsl:when>
		  <xsl:when test="$lang='tn'">
			 Tswana 
		  </xsl:when>
		  <xsl:when test="$lang='to'">
			 Tonga 
		  </xsl:when>
		  <xsl:when test="$lang='tr'">
			 Turco 
		  </xsl:when>
		  <xsl:when test="$lang='ts'">
			 Tsonga 
		  </xsl:when>
		  <xsl:when test="$lang='tt'">
			 Tatar 
		  </xsl:when>
		  <xsl:when test="$lang='tw'">
			 Twi 
		  </xsl:when>
		  <xsl:when test="$lang='ty'">
			 Tahitian 
		  </xsl:when>
		  <xsl:when test="$lang='ug'">
			 Uighur 
		  </xsl:when>
		  <xsl:when test="$lang='uk'">
			 Ucraniano 
		  </xsl:when>
		  <xsl:when test="$lang='ur'">
			 Urdu 
		  </xsl:when>
		  <xsl:when test="$lang='uz'">
			 Uzbek 
		  </xsl:when>
		  <xsl:when test="$lang='vi'">
			 Vietnamita 
		  </xsl:when>
		  <xsl:when test="$lang='vo'">
			 Volapük 
		  </xsl:when>
		  <xsl:when test="$lang='wa'">
			 Walloon 
		  </xsl:when>
		  <xsl:when test="$lang='wo'">
			 Wolof 
		  </xsl:when>
		  <xsl:when test="$lang='xh'">
			 Xhosa 
		  </xsl:when>
		  <xsl:when test="$lang='yi'">
			 Ídiche 
		  </xsl:when>
		  <xsl:when test="$lang='yo'">
			 Yoruba 
		  </xsl:when>
		  <xsl:when test="$lang='za'">
			 Zhuang 
		  </xsl:when>
		  <xsl:when test="$lang='zh'">
			 Chinês 
		  </xsl:when>
		  <xsl:when test="$lang='zu'">
			 Zulu 
		  </xsl:when>
		</xsl:choose>
   </xsl:template>
	<xsl:template name="officeName_ChoiceText">
      <xsl:param name="office"></xsl:param>
      <xsl:param name="tOffice" select="translate($office,'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"></xsl:param>
      <xsl:choose>
         <xsl:when test="$tOffice='AE'">
	            Centro Internacional para o Registo de Patentes, Ministério da Economia (Emirados Árabes Unidos)	
         </xsl:when>
         <xsl:when test="$tOffice='AG'">
	            Instituto da Propriedade Intelectual e Comércio de Antígua e Barbuda (ABIPCO)	
         </xsl:when>
         <xsl:when test="$tOffice='AL'">
	            Direção Geral da Propriedade Industrial (GDIP) (Albânia)	
         </xsl:when>
         <xsl:when test="$tOffice='AM'">
	            Instituto da Propriedade Intelectual da República da Arménia	
         </xsl:when>
         <xsl:when test="$tOffice='AO'">
	            Instituto Angolano da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='AP'">
	            Organização Regional Africana da Propriedade Intelectual (ARIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='AT'">
	            Instituto Austríaco de Patentes	
         </xsl:when>
         <xsl:when test="$tOffice='AU'">
	            Instituto Australiano de Patentes	
         </xsl:when>
         <xsl:when test="$tOffice='AZ'">
	            Agência da Propriedade Intelectual da República do Azerbaijão	
         </xsl:when>
         <xsl:when test="$tOffice='BA'">
	            Instituto para Propriedade Intelectual de Bósnia e Herzegovina	
         </xsl:when>
         <xsl:when test="$tOffice='BB'">
	            Instituto de Assuntos Corporativos e Propriedade Intelectual (Barbados)	
         </xsl:when>
         <xsl:when test="$tOffice='BE'">
	            Instituto da Propriedade Intelectual da Bélgica (IPObel)	
         </xsl:when>
         <xsl:when test="$tOffice='BF'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='BG'">
	            Instituto de Patentes da República da Bulgária	
         </xsl:when>
         <xsl:when test="$tOffice='BH'">
	            Direção do Comércio Exterior e Propriedade Industrial, Instituto Nacional de Patentes (Barém)	
         </xsl:when>
         <xsl:when test="$tOffice='BJ'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='BN'">
	            Instituto da Propriedade Intelectual do Brunei Darussalã (BruIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='BR'">
	            Instituto Nacional da Propriedade Industrial (Brasil)	
         </xsl:when>
         <xsl:when test="$tOffice='BW'">
	            Autoridade das Empresas e Propriedade Intelectual (CIPA) (Botsuana)	
         </xsl:when>
         <xsl:when test="$tOffice='BX'">
	            Benelux Office for Intellectual Property (BOIP)	
         </xsl:when>
         <xsl:when test="$tOffice='BY'">
	            Centro Nacional da Propriedade Intelectual (Bielo-rússia)	
         </xsl:when>
         <xsl:when test="$tOffice='BZ'">
	            Instituto da Propriedade Intelectual do Belize	
         </xsl:when>
         <xsl:when test="$tOffice='CA'">
	            Instituto Canadiano da Propriedade Intelectual	
         </xsl:when>
         <xsl:when test="$tOffice='CF'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='CG'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='CH'">
	            Instituto Federal Suíço da Propriedade Intelectual	
         </xsl:when>
         <xsl:when test="$tOffice='CI'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='CL'">
	            Instituto Nacional da Propriedade Industrial (Chile)	
         </xsl:when>
         <xsl:when test="$tOffice='CM'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='CN'">
	            Administração Nacional da Propriedade Intelectual da China (CNIPA)	
         </xsl:when>
         <xsl:when test="$tOffice='CO'">
	            Superintendência da Indústria e Comércio (Colômbia)	
         </xsl:when>
         <xsl:when test="$tOffice='CR'">
	            Registo da Propriedade Intelectual (Costa Rica)	
         </xsl:when>
         <xsl:when test="$tOffice='CS'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='CU'">
	            Instituto Cubano da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='CY'">
	            Departamento do Conservador de Registos de Empresas e Recetor Oficial de Chipre	
         </xsl:when>
         <xsl:when test="$tOffice='CV'">
	            Instituto de Gestão da Qualidade e da Propriedade Intelectual (IGQPI) (Cabo Verde)	
         </xsl:when>
         <xsl:when test="$tOffice='CZ'">
	            Instituto da Propriedade Industrial da República Tcheca	
         </xsl:when>
         <xsl:when test="$tOffice='DD'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='DE'">
	            Instituto Alemão de Patentes e Marcas	
         </xsl:when>
         <xsl:when test="$tOffice='DJ'">
	            Instituto da Propriedade Industrial e Comércio do Jibuti (OPDIC)	
         </xsl:when>
         <xsl:when test="$tOffice='DK'">
	            Instituto Dinamarquês de Patentes e Marcas	
         </xsl:when>
         <xsl:when test="$tOffice='DM'">
	            Registo de Empresas, Instituto da Propriedade Intelectual (Domínica)	
         </xsl:when>
         <xsl:when test="$tOffice='DO'">
	            Instituto Nacional da Propriedade Industrial (República Dominicana)	
         </xsl:when>
         <xsl:when test="$tOffice='DZ'">
	            Instituto Argelino da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='EA'">
	            Instituto Eurasiático de Patentes (EAPO)	
         </xsl:when>
         <xsl:when test="$tOffice='EC'">
	            Serviço Nacional de Direitos Intelectuais (SENADI) (Equador)	
         </xsl:when>
         <xsl:when test="$tOffice='EE'">
	            Instituto Estónio de Patentes	
         </xsl:when>
         <xsl:when test="$tOffice='EG'">
	            Instituto Egípcio de Patentes	
         </xsl:when>
         <xsl:when test="$tOffice='EM'">
	            Instituto da Propriedade Intelectual da União Europeia	
         </xsl:when>
         <xsl:when test="$tOffice='EP'">
	            Instituto Europeu de Patentes (IEP)	
         </xsl:when>
         <xsl:when test="$tOffice='ES'">
	            Instituto Espanhol de Patentes e Marcas	
         </xsl:when>
         <xsl:when test="$tOffice='FI'">
	            Instituto Finlandês de Patentes e Registos (PRH)	
         </xsl:when>
         <xsl:when test="$tOffice='FR'">
	            Instituto Nacional da Propriedade Industrial (INPI) (França)	
         </xsl:when>
         <xsl:when test="$tOffice='GA'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='GB'">
	            Instituto da Propriedade Intelectual (Reino Unido)	
         </xsl:when>
         <xsl:when test="$tOffice='GC'">
	            Patent Office of the Gulf Cooperation Council (GCC)	
         </xsl:when>
         <xsl:when test="$tOffice='GD'">
	            Registo do Supremo Tribunal (Granada)	
         </xsl:when>
         <xsl:when test="$tOffice='GE'">
	            Centro Nacional da Propriedade Intelectual da Geórgia (SAKPATENTI)	
         </xsl:when>
         <xsl:when test="$tOffice='GH'">
	            Departamento do Conservador Geral de Registos (Gana)	
         </xsl:when>
         <xsl:when test="$tOffice='GM'">
	            Departamento do Conservador Geral de Registos, Ministério da Justiça (Gâmbia)	
         </xsl:when>
         <xsl:when test="$tOffice='GN'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='GQ'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='GR'">
	            Organização da Propriedade Industrial (OBI) (Grécia)	
         </xsl:when>
         <xsl:when test="$tOffice='GT'">
	            Registo da Propriedade Intelectual (Guatemala)	
         </xsl:when>
         <xsl:when test="$tOffice='GW'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='HK'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='HN'">
	            Direção-Geral da Propriedade Intelectual (Honduras)	
         </xsl:when>
         <xsl:when test="$tOffice='HR'">
	            Instituto Estatal da Propriedade Intelectual (Croácia)	
         </xsl:when>
         <xsl:when test="$tOffice='HU'">
	            Instituto Húngaro da Propriedade Intelectual (HIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='IB'">
	            Secretaria Internacional da OMPI	
         </xsl:when>
         <xsl:when test="$tOffice='ID'">
	            Direção-Geral da Propriedade Intelectual (Indonésia)	
         </xsl:when>
         <xsl:when test="$tOffice='IE'">
	            Instituto da Propriedade Intelectual da Irlanda	
         </xsl:when>
         <xsl:when test="$tOffice='IL'">
	            Instituto de Patentes de Israel	
         </xsl:when>
         <xsl:when test="$tOffice='IR'">
	            Centro da Propriedade Intelectual (República Islâmica do Irão)	
         </xsl:when>
         <xsl:when test="$tOffice='IN'">
	            Instituto de Patentes da Índia	
         </xsl:when>
         <xsl:when test="$tOffice='IQ'">
	            Instituto Iraquiano de Patentes (IQPO)	
         </xsl:when>
         <xsl:when test="$tOffice='IS'">
	            Instituto Islandês da Propriedade Intelectual (ISIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='IT'">
	            Instituto Italiano de Patentes e Marcas	
         </xsl:when>
         <xsl:when test="$tOffice='JM'">
               Instituto da Propriedade Intelectual da Jamaica (JIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='JO'">
	            Direção de Proteção da Propriedade Industrial, Ministério da Indústria, Comércio e Abastecimento (Jordânia)	
         </xsl:when>
         <xsl:when test="$tOffice='JP'">
	            Instituto Japonês de Patentes (JPO)	
         </xsl:when>
         <xsl:when test="$tOffice='KE'">
	            Instituto da Propriedade Industrial do Quénia	
         </xsl:when>
         <xsl:when test="$tOffice='KG'">
	            Ministério da Ciência, Ensino Superior e Inovação da República do Quirguistão	
         </xsl:when>
         <xsl:when test="$tOffice='KH'">
	            Departamento da Propriedade Industrial (DIP), Ministério da Indústria, Ciência, Tecnologia e Inovação (MISTI) (Camboja)	
         </xsl:when>
         <xsl:when test="$tOffice='KM'">
	            Instituto Comoriano da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='KN'">
	            Instituto da Propriedade Intelectual de São Cristóvão e Neves	
         </xsl:when>
         <xsl:when test="$tOffice='KP'">
	            Administração da Propriedade Intelectual (IPA) da República Popular Democrática da Coreia	
         </xsl:when>
         <xsl:when test="$tOffice='KR'">
	            Ministério da Propriedade Intelectual (MOIP) (República da Coreia)	
         </xsl:when>
         <xsl:when test="$tOffice='KW'">
	            Ministério do Comércio e Indústria, Departamento de Marcas e Patentes (Koweit)	
         </xsl:when>
         <xsl:when test="$tOffice='KZ'">
	            Instituto Nacional da Propriedade Intelectual (INPI), (Cazaquistão)	
         </xsl:when>
         <xsl:when test="$tOffice='LA'">
	            Departamento da Propriedade Intelectual, Ministério da Ciência e Tecnologia (República Democrática Popular do Laos)	
         </xsl:when>
         <xsl:when test="$tOffice='LC'">
	            Registo de Empresas e Propriedade Intelectual (Santa Lúcia)	
         </xsl:when>
         <xsl:when test="$tOffice='LK'">
	            Instituto Nacional da Propriedade Intelectual do Sri Lanca	
         </xsl:when>
         <xsl:when test="$tOffice='LR'">
	            Instituto da Propriedade Intelectual da Libéria (LIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='LS'">
	            Gabinete do Conservador Geral de Registos (Lesoto)	
         </xsl:when>
         <xsl:when test="$tOffice='LT'">
	            Secretaria Estatal de Patentes da República da Lituânia	
         </xsl:when>
         <xsl:when test="$tOffice='LU'">
	            Instituto da Propriedade Intelectual (Luxemburgo)	
         </xsl:when>
         <xsl:when test="$tOffice='LV'">
	            Instituto de Patentes da República da Letónia	
         </xsl:when>
         <xsl:when test="$tOffice='LY'">
	            Instituto da Propriedade Industrial da Líbia	
         </xsl:when>
         <xsl:when test="$tOffice='MA'">
	            Instituto Marroquino de Propriedade Industrial e Comercial (OMPIC)	
         </xsl:when>
         <xsl:when test="$tOffice='MC'">
	            Instituto da Propriedade Industrial do Mónaco (MCIPO)	
         </xsl:when>
         <xsl:when test="$tOffice='MD'">
	            Agência Estatal da Propriedade Intelectual (República da Moldávia)	
         </xsl:when>
         <xsl:when test="$tOffice='ME'">
	            Ministério do Desenvolvimento Econômico (Montenegro)	
         </xsl:when>
         <xsl:when test="$tOffice='MG'">
	            Instituto da Propriedade Industrial de Madagáscar	
         </xsl:when>
         <xsl:when test="$tOffice='MK'">
	            Instituto Estatal da Propriedade Industrial (Macedónia do Norte)	
         </xsl:when>
         <xsl:when test="$tOffice='ML'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='MN'">
	            Instituto da Propriedade Intelectual da Mongólia	
         </xsl:when>
         <xsl:when test="$tOffice='MR'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='MT'">
	            Direção de Registos de Propriedade Industrial, Departamento do Comércio (Malta)	
         </xsl:when>
         <xsl:when test="$tOffice='MU'">
	            Instituto da Propriedade Industrial da Maurícia (IPOM)	
         </xsl:when>
         <xsl:when test="$tOffice='MW'">
	            Ministério da Justiça, Departamento do Conservador Geral de Registos (Maláui)	
         </xsl:when>
         <xsl:when test="$tOffice='MX'">
	            Instituto Mexicano da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='MY'">
	            Corporação da Propriedade Intelectual da Malásia	
         </xsl:when>
         <xsl:when test="$tOffice='MZ'">
	            Instituto da Propriedade Industrial (IPI) (Moçambique)	
         </xsl:when>
         <xsl:when test="$tOffice='NA'">
	            Autoridade do Comércio e Propriedade Intelectual (BIPA) (Namíbia)	
         </xsl:when>
         <xsl:when test="$tOffice='NE'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='NG'">
	            Registo de Patentes e Desenhos, Departamento de Direito Comercial (Nigéria)	
         </xsl:when>
         <xsl:when test="$tOffice='NI'">
	            Registo da Propriedade Intelectual (Nicarágua)	
         </xsl:when>
         <xsl:when test="$tOffice='NL'">
	            Instituto Neerlandês de Patentes	
         </xsl:when>
         <xsl:when test="$tOffice='NO'">
	            Instituto Norueguês da Propriedade Industrial	
         </xsl:when>
         <xsl:when test="$tOffice='NZ'">
	            Instituto da Propriedade Intelectual da Nova Zelândia (IPONZ)	
         </xsl:when>
         <xsl:when test="$tOffice='OA'">
	            Organização Africana da Propriedade Intelectual (OAPI)	
         </xsl:when>
         <xsl:when test="$tOffice='OM'">
	            Instituto Nacional da Propriedade Intelectual (Ministério do Comércio, Indústria e Promoção de Investimentos) (Omã)	
         </xsl:when>
         <xsl:when test="$tOffice='PA'">
	            Direção-Geral do Registo da Propriedade Industrial (DIGERPI) (Panamá)	
         </xsl:when>
         <xsl:when test="$tOffice='PE'">
	            Instituto Nacional para a Defesa da Concorrência e Proteção da Propriedade Intelectual (Peru)	
         </xsl:when>
         <xsl:when test="$tOffice='PG'">
	            Instituto da Propriedade Intelectual de Papua-Nova Guiné	
         </xsl:when>
         <xsl:when test="$tOffice='PH'">
	            Instituto da Propriedade Intelectual das Filipinas	
         </xsl:when>
         <xsl:when test="$tOffice='PL'">
	            Instituto de Patentes da República da Polónia	
         </xsl:when>
         <xsl:when test="$tOffice='PT'">
	            Instituto Nacional da Propriedade Industrial (Portugal)	
         </xsl:when>
         <xsl:when test="$tOffice='QA'">
	            Departamento da Propriedade Intelectual (Catar)	
         </xsl:when>
         <xsl:when test="$tOffice='RO'">
	            Instituto Estatal para Invenções e Marcas (Roménia)	
         </xsl:when>
         <xsl:when test="$tOffice='RS'">
	            Instituto da Propriedade Intelectual (Sérbia)	
         </xsl:when>
         <xsl:when test="$tOffice='RU'">
	            Serviço Federal para a Propriedade Intelectual da Federação Russa (ROSPATENT)	
         </xsl:when>
         <xsl:when test="$tOffice='RW'">
	            Gabinete do Conservador Geral de Registos (Ruanda)	
         </xsl:when>
         <xsl:when test="$tOffice='SA'">
	            Autoridade Saudita para a Propriedade Intelectual (SAIP)	
         </xsl:when>
         <xsl:when test="$tOffice='SC'">
	            Divisão do Registo, Departamento de Assuntos Jurídicos (Seicheles)	
         </xsl:when>
         <xsl:when test="$tOffice='SD'">
	            Conservador Geral de Registos do Departamento de Propriedade Intelectual (Sudão) 
         </xsl:when>
         <xsl:when test="$tOffice='SE'">
	            Instituto Sueco da Propriedade Intelectual (PRV)	
         </xsl:when>
         <xsl:when test="$tOffice='SG'">
	            Instituto da Propriedade Intelectual de Singapura	
         </xsl:when>
         <xsl:when test="$tOffice='SI'">
	            Instituto Esloveno da Propriedade Intelectual	
         </xsl:when>
         <xsl:when test="$tOffice='SK'">
	            Instituto da Propriedade Industrial da República Eslovaca	
         </xsl:when>
         <xsl:when test="$tOffice='SL'">
	            Departamento do Administrador e Conservador Geral de Registos (Serra Leoa)	
         </xsl:when>
         <xsl:when test="$tOffice='SM'">
	            Instituto de Patentes e Marcas (São Marino)	
         </xsl:when>
         <xsl:when test="$tOffice='SN'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='ST'">
	            Serviço Nacional da Propriedade Intelectual (SENAPI)	
         </xsl:when>
         <xsl:when test="$tOffice='SU'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='SV'">
	            Centro Nacional de Registos (CNR) (El Salvador)	
         </xsl:when>
         <xsl:when test="$tOffice='SY'">
	            Ministério do Comércio Interno e Defesa do Consumidor, Direção de Proteção da Propriedade Comercial e Industrial (República Árabe Síria)	
         </xsl:when>
         <xsl:when test="$tOffice='SZ'">
	            Ministry of Justice
Registrar General's Office	
         </xsl:when>
         <xsl:when test="$tOffice='TD'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='TG'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='TH'">
	            Departamento da Propriedade Intelectual (DIP) (Tailândia)	
         </xsl:when>
         <xsl:when test="$tOffice='TJ'">
	            Centro Nacional de Patentes e da Informação sob tutela do Ministério do Desenvolvimento Econômico e do Comércio da República do Tajiquistão	
         </xsl:when>
         <xsl:when test="$tOffice='TM'">
	            Serviço Estadual para a Propriedade Intelectual do Ministério das Finanças e Economia do Turquemenistão	
         </xsl:when>
         <xsl:when test="$tOffice='TN'">
	            Instituto Nacional para a Normalização e Propriedade Industrial (INNORPI) (Tunísia)	
         </xsl:when>
         <xsl:when test="$tOffice='TR'">
	            Instituto Turco de Patentes e Marcas (Turkpatent)	
         </xsl:when>
         <xsl:when test="$tOffice='TT'">
	            Instituto da Propriedade Intelectual, Ministério da Terra e dos Assuntos Jurídicos (Trindade e Tobago)	
         </xsl:when>
         <xsl:when test="$tOffice='TZ'">
	            Agência de Registo e Licenciamento de Empresas, Ministério da Indústria e Comércio (República Unida da Tanzânia)	
         </xsl:when>
         <xsl:when test="$tOffice='UA'">
	            Organismo público denominado “Instituto Nacional da Propriedade Intelectual e das Inovações da Ucrânia” (UANIPIO)	
         </xsl:when>
         <xsl:when test="$tOffice='UG'">
	            Secretaria de Serviços de Registo do Uganda (URSB)	
         </xsl:when>
         <xsl:when test="$tOffice='US'">
	            Instituto de Patentes e Marcas dos Estados Unidos (USPTO)	
         </xsl:when>
         <xsl:when test="$tOffice='UY'">
	            Direção Nacional da Propriedade Industrial (DNPI)	
         </xsl:when>
         <xsl:when test="$tOffice='UZ'">
	            Agência da Propriedade Intelectual sob tutela do Ministério da Justiça da República do Usbequistão	
         </xsl:when>
         <xsl:when test="$tOffice='VC'">
	            Instituto do Comércio e Propriedade Intelectual (CIPO) (São Vicente e Granadinas)	
         </xsl:when>
         <xsl:when test="$tOffice='VN'">
	            Instituto da Propriedade Intelectual do Vietname (IP Vietname)	
         </xsl:when>
         <xsl:when test="$tOffice='WO'">
	            Organização Mundial da Propriedade Intelectual	
         </xsl:when>
         <xsl:when test="$tOffice='WS'">
	            Ministério do Comércio, Indústria e Trabalho (MCIL) (Samoa)	
         </xsl:when>
         <xsl:when test="$tOffice='XN'">
	            Instituto Nórdico de Patentes	
         </xsl:when>
		 <xsl:when test="$tOffice='XV'">
	            Instituto de Patentes de Visegrád (VPI)	
         </xsl:when>
         <xsl:when test="$tOffice='YU'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='ZA'">
	            Comissão das Empresas e Propriedade Intelectual (CIPC) (África do Sul)	
         </xsl:when>
         <xsl:when test="$tOffice='ZM'">
	            Instituto de Registo de Patentes e Empresas (Zâmbia)	
         </xsl:when>
         <xsl:when test="$tOffice='ZR'">
	            --	
         </xsl:when>
         <xsl:when test="$tOffice='ZW'">
	            Instituto da Propriedade Intlectual do Zimbabué	
         </xsl:when>
         <xsl:otherwise>
            <xsl:value-of select="$tOffice"></xsl:value-of>
         </xsl:otherwise>
      </xsl:choose>
   </xsl:template>
	<xsl:template name="seq_ChoiceText">
		<xsl:param name="sequence"></xsl:param>
		<xsl:choose>
			<xsl:when test="$sequence[@quantity &gt; 0] and $sequence/@page-count and not(.//processing-instruction('seqlist'))">
				Listagem de sequências parte da descrição
			</xsl:when>
			<xsl:when test="$sequence/@page-count">
				Listagem de sequencias, parte da descrição, apresentada em formato electrónico, além de ter sido apresentada em papel (conforme a Secção 801(a)(ii)) 
			</xsl:when>
			<xsl:otherwise>
				Listagem de sequencia parte da descrição, fornecida únicamente em formato electrónico (conforme a Secção 801(a)(i)) 
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<xsl:template name="carriersInfo_ChoiceText">
		<xsl:param name="carriers_type"></xsl:param>
		<xsl:param name="carriers_quantity"></xsl:param>
		<xsl:if test="$carriers_quantity">
			<xsl:value-of select="$carriers_quantity"></xsl:value-of>
		</xsl:if>
		<xsl:text> </xsl:text>
		<xsl:choose>
			<xsl:when test="$carriers_type='FD'">
				<xsl:text>Diskette </xsl:text>
			</xsl:when>
			<xsl:when test="$carriers_type='CD'">
				<xsl:text>CD </xsl:text>
			</xsl:when>
			<xsl:when test="$carriers_type='BD'">
				<xsl:text>BD </xsl:text>
			</xsl:when>
			<xsl:when test="$carriers_type='DVD'">
				<xsl:text>DVD </xsl:text>
			</xsl:when>
			<xsl:when test="$carriers_type='other'">
				<xsl:text>other </xsl:text>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$carriers_type"></xsl:value-of>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>