[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Compilation error when compiling PDF file: Variable 'sequence' has not been declared.
<?xml version='1.0'?> <!-- $Id: myprint.xsl,v 1.20 2009/12/14 21:43:23 gabriela Exp $ --> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:doc="http://nwalsh.com/xsl/documentation/1.0" exclude-result-prefixes="doc" version='1.0'> <xsl:import href="/home/docbook/docbook-xsl/fo/docbook.xsl"/> <xsl:import href="prn-titlepage.xsl"/> <xsl:import href="common.xsl"/> <xsl:import href="my-fo-article.xsl"/> <!-- ==================================================================== --> <!-- Processor extensions--> <xsl:param name="fop.extensions">0</xsl:param> <xsl:param name="xep.extensions">1</xsl:param> <!-- ==================================================================== --> <!-- Stylesheet extensions --> <xsl:param name="tablecolumns.extension">1</xsl:param> <!-- ==================================================================== --> <!-- Admonitions --> <xsl:param name="admon.graphics.extension">.svg</xsl:param> <xsl:template match="*" mode="admon.graphic.width">16pt</xsl:template> <!-- ==================================================================== --> <!-- Automatic labelling--> <xsl:param name="appendix.autolabel">A</xsl:param> <xsl:param name="chapter.autolabel" select="1"/> <!-- Customize the separator used in chapter label--> <xsl:param name="local.l10n.xml" select="document('')"/> <l:i18n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0"> <l:l10n language="en"> <l:context name="title-numbered"> <l:template name="chapter" text="Chapter %n   %t"/> </l:context> <l:context name="title"> <l:template name="abstract" text=" "/> </l:context> <l:context name="xref"> <l:template name="section" text="%t"/> </l:context> <l:context name="title"> <l:template name="example" text="%t"/> </l:context> <l:context name="xref-number-and-title"> <l:template name="example" text="the example titled “%t”"/> </l:context> <!-- <l:context name="title"> <l:template name="figure" text="%t"/> </l:context> <l:context name="xref-number-and-title"> <l:template name="figure" text="the figure titled “%t”"/> </l:context>--> </l:l10n> </l:i18n> <xsl:template name="chapappendix.title"> <xsl:param name="node" select="."/> <!-- Place chapter label title and on two lines --> <fo:block xsl:use-attribute-sets="chap.label.properties"> <xsl:call-template name="gentext"> <xsl:with-param name="key"> <xsl:choose> <xsl:when test="$node/self::chapter">chapter</xsl:when> <xsl:when test="$node/self::appendix">appendix</xsl:when> </xsl:choose> </xsl:with-param> </xsl:call-template> <xsl:text> </xsl:text> <xsl:apply-templates select="$node" mode="label.markup"/> </fo:block> <fo:block xsl:use-attribute-sets="chap.title.properties"> <xsl:apply-templates select="$node" mode="title.markup"/> </fo:block> </xsl:template> <!-- ==================================================================== --> <!-- ToC/LoT/Index Generation --> <xsl:param name="autotoc.label.separator">  </xsl:param> <xsl:param name="generate.toc"> article toc,title,table book toc,table,title chapter title part nop </xsl:param> <xsl:param name="simplesect.in.toc">1</xsl:param> <xsl:param name="toc.section.depth">3</xsl:param> <xsl:param name="toc.indent.width">36</xsl:param> <xsl:template name="toc.line"> <xsl:variable name="id"> <xsl:call-template name="object.id"/> </xsl:variable> <xsl:variable name="label"> <xsl:apply-templates select="." mode="label.markup"/> </xsl:variable> <fo:block text-align-last="justify"> <!-- Chapter and appendix titles in bold --> <fo:inline keep-with-next.within-line="always"> <xsl:choose> <xsl:when test="(local-name(.) = 'chapter' or local-name(.) = 'appendix')"> <xsl:attribute name="font-weight">bold</xsl:attribute> </xsl:when> </xsl:choose> <fo:basic-link internal-destination="{$id}"> <xsl:if test="$label != ''"> <xsl:copy-of select="$label"/> <xsl:value-of select="$autotoc.label.separator"/> </xsl:if> <xsl:apply-templates select="." mode="titleabbrev.markup"/> </fo:basic-link> </fo:inline> <fo:inline keep-together.within-line="always"> <xsl:text></xsl:text> <fo:leader leader-pattern="dots" leader-pattern-width="3pt" leader-alignment="reference-area" keep-with-next.within-line="always"/> <xsl:text></xsl:text> <fo:basic-link internal-destination="{$id}"> <fo:page-number-citation ref-id="{$id}"/> </fo:basic-link> </fo:inline> </fo:block> </xsl:template> <!-- ==================================================================== --> <!-- Graphics --> <xsl:param name="graphic.default.extension">png</xsl:param> <!-- ==================================================================== --> <!-- Pagination and general styles booklet 7inx9in - default is 8.5inx11in--> <xsl:param name="alignment">left</xsl:param> <xsl:param name="body.font.master">10</xsl:param> <xsl:param name="body.font.family" select="'AdobeTextPro'"></xsl:param> <xsl:param name="body.margin.bottom">0.50in</xsl:param> <xsl:param name="body.margin.top">0.50in</xsl:param> <xsl:param name="body.start.indent">0pt</xsl:param> <xsl:param name="column.count.index" select="2" /> <xsl:param name="column.gap.index" select="'12pt'"/> <xsl:param name="draft.mode">no</xsl:param> <xsl:param name="double.sided">1</xsl:param> <xsl:param name="footer.rule">0</xsl:param> <xsl:param name="header.rule">1</xsl:param> <xsl:param name="header.column.widths">1 3 1</xsl:param> <xsl:param name="footers.on.blank.pages">0</xsl:param> <xsl:param name="headers.on.blank.pages">0</xsl:param> <xsl:param name="hyphenate">false</xsl:param> <xsl:param name="marker.section.level">2</xsl:param> <xsl:attribute-set name="monospace.properties"> <xsl:attribute name="font-size">9pt</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="monospace.verbatim.properties"> <xsl:attribute name="font-size">8pt</xsl:attribute> </xsl:attribute-set> <xsl:param name="page.height.portrait">9.0in</xsl:param> <xsl:param name="page.width.portrait">7.0in</xsl:param> <xsl:param name="page.margin.bottom">0.50in</xsl:param> <xsl:param name="page.margin.top">0.75in</xsl:param> <xsl:param name="page.margin.inner">0.75in</xsl:param> <xsl:param name="page.margin.outer">0.50in</xsl:param> <xsl:param name="region.after.extent">0.25in</xsl:param> <xsl:param name="region.before.extent">0.25in</xsl:param> <xsl:param name="shade.verbatim">0</xsl:param> <xsl:param name="title.margin.left">0in</xsl:param> <!-- <xsl:attribute-set name="normal.para.spacing"> <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> </xsl:attribute-set> --> <!-- ==================================================================== --> <!-- Tables --> <xsl:param name="default.table.width">100%</xsl:param> <xsl:param name="table.cell.border.color">gray</xsl:param> <xsl:param name="table.frame.border.color">gray</xsl:param> <xsl:attribute-set name="table.cell.padding"> <xsl:attribute name="padding-left">3pt</xsl:attribute> <xsl:attribute name="padding-right">3pt</xsl:attribute> <xsl:attribute name="padding-top">2pt</xsl:attribute> <xsl:attribute name="padding-bottom">2pt</xsl:attribute> </xsl:attribute-set> <!-- ==================================================================== --> <!-- Linking --> <xsl:param name="insert.olink.page.number">yes</xsl:param> <xsl:param name="olink.doctitle">no</xsl:param> <xsl:attribute-set name="olink.properties"> <xsl:attribute name="font-style">italic</xsl:attribute> </xsl:attribute-set> <!-- ==================================================================== --> <!-- Cross-references--> <xsl:param name="insert.xref.page.number">no</xsl:param> <xsl:attribute-set name="xref.properties"> <xsl:attribute name="font-style">italic</xsl:attribute> </xsl:attribute-set> <xsl:param name="xref.with.number.and.title">0</xsl:param> <!-- ==================================================================== --> <!-- Lists --> <xsl:attribute-set name="itemizedlist.label.properties"> <xsl:attribute name="text-align">center</xsl:attribute> </xsl:attribute-set> <xsl:param name="itemizedlist.label.width">1.5em</xsl:param> <xsl:attribute-set name="list.block.spacing"> <xsl:attribute name="space-before.optimum">0.5em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.5em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="list.item.spacing"> <xsl:attribute name="space-before.optimum">0.25em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.25em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="orderedlist.label.properties"> <xsl:attribute name="text-align">center</xsl:attribute> </xsl:attribute-set> <xsl:param name="orderedlist.label.width">1.5em</xsl:param> <!-- ==================================================================== --> <!-- Q and A Set --> <xsl:param name="qandadiv.autolabel" select="1"/> <!-- ==================================================================== --> <!-- Miscellaneous--> <xsl:param name="abstract.notitle.enabled" select="1"></xsl:param> <xsl:param name="email.mailto.enabled" select="0"></xsl:param> <xsl:param name="ulink.show">0</xsl:param> <xsl:param name="use.svg">1</xsl:param> <xsl:param name="variablelist.as.blocks">1</xsl:param> <!-- ==================================================================== --> <!-- Property sets --> <xsl:attribute-set name="formal.object.properties"> <xsl:attribute name="keep-together.within-column">auto</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="formal.title.properties" use-attribute-sets="normal.para.spacing"> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-size">9pt</xsl:attribute> <!-- <xsl:attribute name="hyphenate">false</xsl:attribute> <xsl:attribute name="space-after.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-after.optimum">0.6em</xsl:attribute> <xsl:attribute name="space-after.maximum">0.8em</xsl:attribute>--> </xsl:attribute-set> <xsl:attribute-set name="index.title.properties"> <xsl:attribute name="break-before">page</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.level1.properties"> <!-- <xsl:attribute name="break-before">page</xsl:attribute>--> </xsl:attribute-set> <xsl:attribute-set name="section.title.level1.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.8"/> <xsl:text>pt</xsl:text> </xsl:attribute> <xsl:attribute name="space-before.minimum">0.4em</xsl:attribute> <xsl:attribute name="space-after.maximum">1.8em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.title.level2.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.5"/> <xsl:text>pt</xsl:text> </xsl:attribute> <!-- <xsl:attribute name="space-before.minimum">1.0em</xsl:attribute> <xsl:attribute name="space-before.optimum">2.0em</xsl:attribute>--> <xsl:attribute name="space-after.maximum">1.5em</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.title.level3.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.3"/> <xsl:text>pt</xsl:text> </xsl:attribute> <!--<xsl:attribute name="font-style">italic</xsl:attribute>--> </xsl:attribute-set> <xsl:attribute-set name="section.title.level4.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.3"/> <xsl:text>pt</xsl:text> </xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="section.title.level5.properties"> <xsl:attribute name="font-size"> <xsl:value-of select="$body.font.master * 1.3"/> <xsl:text>pt</xsl:text> </xsl:attribute> </xsl:attribute-set> <!-- ==================================================================== --> <!-- Captions --> <xsl:template match="caption"> <fo:block start-indent="0.25in" end-indent=".5in"> <xsl:attribute name="text-align">center</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:apply-templates/> </fo:block> </xsl:template> <!-- ==================================================================== --> <xsl:template match="corpauthor" mode="article.titlepage.recto.mode"> <!-- Insert corporate logo --> <fo:external-graphic src="url(../images/INRO-Logo-grayscale.svg)" content-height="0.25in"/> </xsl:template> <xsl:template match="corpauthor" mode="book.titlepage.recto.mode"> </xsl:template> <!-- ==================================================================== --> <!-- Equation numbering --> <xsl:template match="equation"> <fo:table width="100%" table-layout="fixed"> <xsl:attribute name="id"> <xsl:call-template name="object.id"/> </xsl:attribute> <fo:table-column column-width="90%"/> <fo:table-column column-width="10%"/> <fo:table-body start-indent="0pt" end-indent="0pt"> <fo:table-row> <fo:table-cell text-align="center"> <fo:block> <xsl:apply-templates/> </fo:block> </fo:table-cell> <fo:table-cell text-align="right" display-align="center"> <fo:block> <xsl:text>(</xsl:text> <xsl:apply-templates select="." mode="label.markup"/> <xsl:text>)</xsl:text> </fo:block> </fo:table-cell> </fo:table-row> </fo:table-body> </fo:table> </xsl:template> <!-- ==================================================================== --> <!-- General character and paragraph styles --> <xsl:template match="accel|classname|filename|function|literal|methodname"> <xsl:call-template name="inline.monoseq"/> </xsl:template> <xsl:template match="emphasis[@role='blue']"> <fo:inline color="royalblue" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='green']"> <fo:inline color="green" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='cyan']"> <fo:inline color="deepskyblue" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='red']"> <fo:inline color="red" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='pink']"> <fo:inline color="magenta" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='purple']"> <fo:inline color="#4b0082" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='yellow']"> <fo:inline color="#ffd700" font-style="italic"> <xsl:apply-templates/> </fo:inline> </xsl:template> <xsl:template match="emphasis[@role='strong']|firstterm"> <xsl:call-template name="inline.boldseq"/> </xsl:template> <xsl:template match="errortext|errorname"> <xsl:call-template name="inline.italicseq"/> </xsl:template> <!-- <xsl:template match="formalpara/para"> <fo:block keep-with-next.within-column="always"></fo:block> </xsl:template>--> <xsl:template match="formalpara/title"> <xsl:call-template name="inline.boldseq"/> </xsl:template> <xsl:template match="guibutton|guilabel|guimenu|guimenuitem|guisubmenu|application"> <xsl:call-template name="inline.italicseq"/> </xsl:template> <xsl:template match="para[@role='indent']"> <fo:block start-indent="0.75in" end-indent="0.75in"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:template match="para[@role='keep-with-next']"> <fo:block keep-with-next.within-column="always"> <xsl:apply-templates/> </fo:block> </xsl:template> <xsl:attribute-set name="superscript.properties"> <xsl:attribute name="font-size">65%</xsl:attribute> <xsl:attribute name="font-family">serif</xsl:attribute> </xsl:attribute-set> <xsl:attribute-set name="subscript.properties"> <xsl:attribute name="font-size">65%</xsl:attribute> <xsl:attribute name="font-family">serif</xsl:attribute> </xsl:attribute-set> <!-- ==================================================================== --> <!-- Customizing bullets --> <xsl:template name="next.itemsymbol"> <xsl:param name="itemsymbol" select="'default'"/> <xsl:choose> <!-- Alternate between disc and endash symbols --> <xsl:when test="$itemsymbol = 'disc'">endash</xsl:when> <xsl:otherwise>disc</xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="processing-instruction('hard-pagebreak')"> <fo:block break-after='page'/> </xsl:template> <!-- ==================================================================== --> <!-- Math phrase formatting --> <xsl:template match="mathphrase"> <fo:inline font-family="serif"> <xsl:apply-templates/> </fo:inline> </xsl:template> <!-- ==================================================================== --> <!-- Footer --> <xsl:template name="foot.sep.rule"> <xsl:if test="$footer.rule != 0"> <xsl:attribute name="border-top-width">medium</xsl:attribute> <xsl:attribute name="border-top-style">groove</xsl:attribute> <xsl:attribute name="border-top-color">gray</xsl:attribute> </xsl:if> </xsl:template> <xsl:template name="footer.content"> <xsl:param name="pageclass"></xsl:param> <xsl:param name="sequence"></xsl:param> <xsl:param name="position"></xsl:param> <xsl:param name="gentext-key"></xsl:param> <xsl:if test="$pageclass != 'titlepage'"> <xsl:choose> <xsl:when test="(($sequence='first' and $gentext-key='article') or $pageclass='mybook-titlepage')"> <!-- nop; no footer on title pages and first page of an article --> </xsl:when> <xsl:when test="($sequence='odd' and $position='left') or ($sequence='even' and $position='right') or ($sequence='first' and $position='left')"> <xsl:text>© INRO</xsl:text> <!-- <fo:external-graphic src="url(../images/INRO-Logo-grayscale.svg)" content-height="0.125in"/> --> </xsl:when> <xsl:when test="$position='center'"> <!-- Include document title <xsl:apply-templates select="/*[1]" mode="object.title.markup"/>--> </xsl:when> <xsl:when test="($sequence='odd' and $position='right') or ($sequence='even' and $position='left') or ($sequence='first' and $position='right')"> <fo:external-graphic src="url(../images/Emme-Logo-grayscale.svg)" content-height="0.1in"/> </xsl:when> </xsl:choose> </xsl:if> </xsl:template> <!-- ==================================================================== --> <!-- Header --> <xsl:template name="header.content"> <xsl:param name="pageclass"></xsl:param> <xsl:param name="sequence"></xsl:param> <xsl:param name="position"></xsl:param> <xsl:param name="gentext-key"></xsl:param> <xsl:if test="$pageclass != 'titlepage'"> <xsl:choose> <xsl:when test="$pageclass='mybook-titlepage'"> </xsl:when> <xsl:when test="($sequence='odd' and $position='left') or ($sequence='even' and $position='right')"></xsl:when> <xsl:when test="($sequence='even' and $position='center')"> <xsl:apply-templates select="." mode="title.markup"/> </xsl:when> <xsl:when test="($sequence='odd' and $position='center')"> <fo:retrieve-marker retrieve-class-name="section.head.marker" retrieve-position="first-including-carryover" retrieve-boundary="page-sequence"/> </xsl:when> <xsl:when test="($sequence='odd' and $position='right') or ($sequence='even' and $position='left') or ($sequence='first' and $pageclass='index' and $position='right') or ($sequence='first' and $pageclass='lot' and $position='right') or ($sequence='first' and $pageclass='body' and $position='right') or ($sequence='first' and $pageclass='back' and $position='right')"> <fo:page-number/> </xsl:when> </xsl:choose> </xsl:if> </xsl:template> <xsl:template name="head.sep.rule"> <xsl:if test="($header.rule != 0 and ($sequence!='first' or $pageclass='index')) or ($header.rule !=0 and ($sequence!='first' or $pageclass='lot'))"> <xsl:attribute name="border-bottom-width">medium</xsl:attribute> <xsl:attribute name="border-bottom-style">groove</xsl:attribute> <xsl:attribute name="border-bottom-color">gray</xsl:attribute> </xsl:if> </xsl:template> <!-- ==================================================================== --> <!-- Changes following aswer from Bob Staton to my question: Changing the printed area of a book title page --> <xsl:template name="select.user.pagemaster"> <xsl:param name="element"/> <xsl:param name="pageclass"/> <xsl:param name="default-pagemaster"/> <!-- Return my customized title page master name if for titlepage, otherwise return the default. --> <xsl:choose> <xsl:when test="$default-pagemaster = 'titlepage'"> <xsl:value-of select="'mybook-titlepage'" /> </xsl:when> <xsl:otherwise> <xsl:value-of select="$default-pagemaster"/> </xsl:otherwise> </xsl:choose> </xsl:template> <!-- ==================================================================== --> <!--Customized title page --> <xsl:template name="user.pagemasters"> <fo:page-sequence-master master-name="mybook-titlepage"> <fo:repeatable-page-master-alternatives> <fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/> <fo:conditional-page-master-reference master-reference="mybook-titlepage-first" page-position="first"/> <fo:conditional-page-master-reference master-reference="mybook-titlepage-odd" odd-or-even="odd"/> <fo:conditional-page-master-reference odd-or-even="even"> <xsl:attribute name="master-reference"> <xsl:choose> <xsl:when test="$double.sided != 0">mybook-titlepage-even</xsl:when> <xsl:otherwise>mybook-titlepage-odd</xsl:otherwise> </xsl:choose> </xsl:attribute> </fo:conditional-page-master-reference> </fo:repeatable-page-master-alternatives> </fo:page-sequence-master> <fo:simple-page-master master-name="mybook-titlepage-first" page-width="{$page.width}" page-height="{$page.height}" margin-top="0pt" margin-bottom="0pt" margin-left="0pt" margin-right="0pt"> <fo:region-body margin-bottom="0pt" margin-top="0pt" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"></fo:region-body> <fo:region-before region-name="xsl-region-before-first" extent="0pt" display-align="before"/> <fo:region-after region-name="xsl-region-after-first" extent="0pt" display-align="after"/> </fo:simple-page-master> <fo:simple-page-master master-name="mybook-titlepage-odd" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.inner}" margin-right="{$page.margin.outer}"> <fo:region-body margin-bottom="{$body.margin.bottom}" margin-top="{$body.margin.top}" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"></fo:region-body> <fo:region-before region-name="xsl-region-before-odd" extent="0pt" display-align="before"/> <fo:region-after region-name="xsl-region-after-odd" extent="0pt" display-align="after"/> </fo:simple-page-master> <fo:simple-page-master master-name="mybook-titlepage-even" page-width="{$page.width}" page-height="{$page.height}" margin-top="{$page.margin.top}" margin-bottom="{$page.margin.bottom}" margin-left="{$margin.left.outer}" margin-right="{$page.margin.inner}"> <fo:region-body margin-bottom="0pt" margin-top="{$body.margin.top}" column-gap="{$column.gap.titlepage}" column-count="{$column.count.titlepage}"></fo:region-body> <fo:region-before region-name="xsl-region-before-even" extent="0pt" display-align="before"/> <fo:region-after region-name="xsl-region-after-even" extent="0pt" display-align="after"/> </fo:simple-page-master> </xsl:template> <!-- ==================================================================== --> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]