[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Functional programming, help to avoid using saxon:assign
Hello everyone, I am attempting to customize the match for phrase roles from docbook (the phrase match calls inline.charseq which is also called by emphasis, and abbrev). My trouble is getting past programming without assignment statements. Using; xml version="1.0", DocBook 4.5, SAXON 6.5.5(current)/8.8J(transition), and Antenna House formatter 4.0 The method I tried to use is to set parameters or variables and change them based on the role and wether or not a processing instruction exists within the phrase. However, saxon:assign is likely being/has been deprecated and what I've read makes me believe there's a better way that I'm not aware of. The idea is: - be able to add one-of fo:inline attributes at any point by checking for processing instructions (working) - based on the role or self pre-format the text. (emphasis italic, uppercase-normal uppercase no margin, some branding formats - which are the most likely to need overrides, make abbrev periods different than non-abbrev periods, and handle things like having both an underline and overscore with UnderOver). The example text below is what I'm using to test the overrides are working. <dedication> <title><phrase role="THEKEY">the key</phrase> – My book<!--this won't work for other people &bookname;--></title> <titleabbrev><!--this won't work for other people &bookname;-->My Book</titleabbrev> <para><phrase role="uppercase-normal"><?dbfo text-transform="lowercase"?><?dbfo font-style="italic" color="#c0c0c0" text-decoration="underline" border-before="solid"?>This is a test of border-before style with underline, italics, and some color. Override is to make uppercase lowercase.</phrase> This text is outside the phrase and should format itself normally. <phrase role="uppercase-normal">Test to make sure uppercase normal was not damaged.</phrase></para> </dedication> I am able to figure out how to do the tests within the processing.attributes template by having each variable test for a result from call-templates and if there is no result check the parent for the role. However, that idea is not very maintainable. Is there a better way to make the customized roles easily maintainable while still keeping the advantage of inline.charseq? What I was hoping for for the customizationed roles was a fairly simple template with example text like: <xsl:when test="@role='uppercase-normal'"> <xsl:variable name="text-transform">uppercase</xsl:variable> <xsl:variable name="margin">0pt</xsl:variable> </xsl:when> ==============A PORTION OF THE STYLESHEET ATTEMPT============= <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet exclude-result-prefixes="xlink stext xtext lxslt simg ximg" extension-element-prefixes="stext xtext" version="1.0" xmlns="http://www.w3.org/TR/xhtml1/transitional" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:simg="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.ImageIntrinsics" xmlns:stext="http://nwalsh.com/xslt/ext/com.nwalsh.saxon.TextFactory" xmlns:ximg="xalan://com.nwalsh.xalan.ImageIntrinsics" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xtext="xalan://com.nwalsh.xalan.Text" xmlns:saxon="http://saxon.sf.net/"> <xsl:import href="../fo/docbook.xsl"/> <!-- not included for request for assitance <xsl:import href="CastleRock_Master.xsl"/>--> <lxslt:component elements="insertfile" prefix="xtext"/> <lxslt:component functions="new getWidth getDepth" prefix="simg"/> <!--begin inline.charseq--> <xsl:template name="inline.charseq"> <!--these are from fo/inline.xsl--> <xsl:param name="content"> <xsl:call-template name="simple.xlink"> <xsl:with-param name="content"> <xsl:apply-templates/> </xsl:with-param> </xsl:call-template> </xsl:param> <!--modified, this had the fo:inline in a spot that made it not as re-usable.--> <fo:inline> <xsl:if test="@dir"> <xsl:attribute name="direction"><xsl:choose><xsl:when test="@dir = 'ltr' or @dir = 'lro'">ltr</xsl:when><xsl:otherwise>rtl</xsl:otherwise></xsl:choose></xsl:at tribute> </xsl:if> <xsl:call-template name="processing.attributes"/> <xsl:choose> <xsl:when test="@role='UnderOver'"> <!--this is not so elegant but required--> <fo:inline text-decoration="overline"> <xsl:copy-of select="$content"/> </fo:inline> </xsl:when> <xsl:when test="self::abbrev"> <!--this is not so elegant but required Extra enter after the copy-of here causes extra space in output--> <xsl:copy-of select="$content"/> <fo:inline font-family="Code2000"></fo:inline> </xsl:when> <xsl:otherwise> <xsl:copy-of select="$content"/> </xsl:otherwise> </xsl:choose> </fo:inline> <!--end modification--> </xsl:template> <!--end inline.charseq--> <!--begin castle.role.attributes--> <xsl:template name="castle.role.attributes"> <xsl:choose> <xsl:when test="@role='uppercase-normal'"> <xsl:variable name="text-transform">uppercase</xsl:variable> <xsl:variable name="margin">0pt</xsl:variable> <!--<saxon:assign name="text-transform" select="uppercase" /> <saxon:assign name="margin" select="0pt" />--> </xsl:when> <!--This would allow us just to set the attribute if called at the end castle.attributes. Unfortunately, it doesn't allow for priority setting or overriding. <xsl:when test="@role = 'THEKEY'"> <xsl:attribute name="font-weight">bold</xsl:attribute> <xsl:attribute name="font-style">italic</xsl:attribute> <xsl:attribute name="text-transform">uppercase</xsl:attribute> <xsl:attribute name="margin-right">2pt</xsl:attribute> <!--the above margin-right may require one-of overrides--> </xsl:when> <xsl:when test="@role='UnderOver'"> <xsl:attribute name="text-decoration"> underline </xsl:attribute>--> </xsl:choose> <!--remember many more roles need to set the 'variable'--> </xsl:template> <!--end castle.role.attributes--> <!--begin processing.attributes--> <xsl:template name="processing.attributes"> <xsl:call-template name="castle.role.attributes"/> <!--PI Variables, to be used to generate the PI--> <xsl:variable name="azimuth"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'azimuth'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="alignment-adjust"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'alignment-adjust'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="alignment-baseline"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'alignment-baseline'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-attachment"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-attachment'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-image"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-image'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-repeat"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-repeat'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-position-horizontal"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-position-horizontal'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="background-position-vertical"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'background-position-vertical'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="baseline-shift"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'baseline-shift'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="block-progression-dimension"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'block-progression-dimension'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-after-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-after-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-after-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-after-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-after-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-after-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-before-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-before-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-before-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-before-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-before-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-before-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-bottom-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-bottom-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-bottom-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-bottom-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-bottom-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-bottom-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-end-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-end-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-end-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-end-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-end-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-end-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-left-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-left-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-left-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-left-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-left-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-left-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-right-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-right-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-right-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-right-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-right-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-right-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-start-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-start-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-start-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-start-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-start-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-start-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-top-color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-top-color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-top-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-top-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="border-top-width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'border-top-width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="bottom"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'bottom'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="color"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'color'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="cue-after"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'cue-after'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="cue-before"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'cue-before'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="dominant-baseline"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'dominant-baseline'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="elevation"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'elevation'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-family"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-family'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-selection-strategy"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-selection-strategy'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-size"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-size'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-size-adjust"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-size-adjust'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-stretch"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-stretch'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-style"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-style'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-variant"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-variant'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="font-weight"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'font-weight'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="height"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'height'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="id"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'id'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="inline-progression-dimension"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'inline-progression-dimension'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="keep-together"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'keep-together'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="keep-with-next"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'keep-with-next'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="keep-with-previous"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'keep-with-previous'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="left"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'left'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="line-height"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'line-height'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="margin-bottom"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'margin-bottom'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="margin-left"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'margin-left'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="margin-right"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'margin-right'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="margin-top"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'margin-top'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-after"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-after'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-before"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-before'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-bottom"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-bottom'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-end"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-end'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-left"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-left'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-right"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-right'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-start"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-start'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="padding-top"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'padding-top'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="pause-after"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'pause-after'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="pause-before"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'pause-before'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="pitch"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'pitch'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="pitch-range"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'pitch-range'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="play-during"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'play-during'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="relative-position"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'relative-position'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="richness"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'richness'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="right"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'right'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="role"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'role'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="source-document"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'source-document'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space-end"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'space-end'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="space-start"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'space-start'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="speak"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'speak'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="speak-header"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'speak-header'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="speak-numeral"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'speak-numeral'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="speak-punctuation"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'speak-punctuation'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="speech-rate"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'speech-rate'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="stress"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'stress'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="text-decoration"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'text-decoration'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="text-transform"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'text-transform'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="top"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'top'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="visibility"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'visibility'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="voice-family"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'voice-family'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="volume"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'volume'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="width"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'width'"/> </xsl:call-template> </xsl:variable> <xsl:variable name="wrap-option"> <xsl:call-template name="dbfo-attribute"> <xsl:with-param name="pis" select="processing-instruction('dbfo')"/> <xsl:with-param name="attribute" select="'wrap-option'"/> </xsl:call-template> </xsl:variable> <!--end of creation of PI variables--> <!--here is our attributes based on PI perameters--> <xsl:if test="$azimuth!=''"> <xsl:attribute name="azimuth"><xsl:value-of select="$azimuth"/></xsl:attribute> </xsl:if> <xsl:if test="$alignment-adjust!=''"> <xsl:attribute name="alignment-adjust"><xsl:value-of select="$alignment-adjust"/></xsl:attribute> </xsl:if> <xsl:if test="$alignment-baseline!=''"> <xsl:attribute name="alignment-baseline"><xsl:value-of select="$alignment-baseline"/></xsl:attribute> </xsl:if> <xsl:if test="$background-attachment!=''"> <xsl:attribute name="background-attachment"><xsl:value-of select="$background-attachment"/></xsl:attribute> </xsl:if> <xsl:if test="$background-color!=''"> <xsl:attribute name="background-color"><xsl:value-of select="$background-color"/></xsl:attribute> </xsl:if> <xsl:if test="$background-image!=''"> <xsl:attribute name="background-image"><xsl:value-of select="$background-image"/></xsl:attribute> </xsl:if> <xsl:if test="$background-repeat!=''"> <xsl:attribute name="background-repeat"><xsl:value-of select="$background-repeat"/></xsl:attribute> </xsl:if> <xsl:if test="$background-position-horizontal!=''"> <xsl:attribute name="background-position-horizontal"><xsl:value-of select="$background-position-horizontal"/></xsl:attribute> </xsl:if> <xsl:if test="$background-position-vertical!=''"> <xsl:attribute name="background-position-vertical"><xsl:value-of select="$background-position-vertical"/></xsl:attribute> </xsl:if> <xsl:if test="$baseline-shift!=''"> <xsl:attribute name="baseline-shift"><xsl:value-of select="$baseline-shift"/></xsl:attribute> </xsl:if> <xsl:if test="$block-progression-dimension!=''"> <xsl:attribute name="block-progression-dimension"><xsl:value-of select="$block-progression-dimension"/></xsl:attribute> </xsl:if> <xsl:if test="$border-after-color!=''"> <xsl:attribute name="border-after-color"><xsl:value-of select="$border-after-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-after-style!=''"> <xsl:attribute name="border-after-style"><xsl:value-of select="$border-after-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-after-width!=''"> <xsl:attribute name="border-after-width"><xsl:value-of select="$border-after-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-before-color!=''"> <xsl:attribute name="border-before-color"><xsl:value-of select="$border-before-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-before-style!=''"> <xsl:attribute name="border-before-style"><xsl:value-of select="$border-before-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-before-width!=''"> <xsl:attribute name="border-before-width"><xsl:value-of select="$border-before-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-bottom-color!=''"> <xsl:attribute name="border-bottom-color"><xsl:value-of select="$border-bottom-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-bottom-style!=''"> <xsl:attribute name="border-bottom-style"><xsl:value-of select="$border-bottom-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-bottom-width!=''"> <xsl:attribute name="border-bottom-width"><xsl:value-of select="$border-bottom-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-end-color!=''"> <xsl:attribute name="border-end-color"><xsl:value-of select="$border-end-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-end-style!=''"> <xsl:attribute name="border-end-style"><xsl:value-of select="$border-end-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-end-width!=''"> <xsl:attribute name="border-end-width"><xsl:value-of select="$border-end-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-left-color!=''"> <xsl:attribute name="border-left-color"><xsl:value-of select="$border-left-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-left-style!=''"> <xsl:attribute name="border-left-style"><xsl:value-of select="$border-left-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-left-width!=''"> <xsl:attribute name="border-left-width"><xsl:value-of select="$border-left-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-right-color!=''"> <xsl:attribute name="border-right-color"><xsl:value-of select="$border-right-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-right-style!=''"> <xsl:attribute name="border-right-style"><xsl:value-of select="$border-right-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-right-width!=''"> <xsl:attribute name="border-right-width"><xsl:value-of select="$border-right-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-start-color!=''"> <xsl:attribute name="border-start-color"><xsl:value-of select="$border-start-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-start-style!=''"> <xsl:attribute name="border-start-style"><xsl:value-of select="$border-start-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-start-width!=''"> <xsl:attribute name="border-start-width"><xsl:value-of select="$border-start-width"/></xsl:attribute> </xsl:if> <xsl:if test="$border-top-color!=''"> <xsl:attribute name="border-top-color"><xsl:value-of select="$border-top-color"/></xsl:attribute> </xsl:if> <xsl:if test="$border-top-style!=''"> <xsl:attribute name="border-top-style"><xsl:value-of select="$border-top-style"/></xsl:attribute> </xsl:if> <xsl:if test="$border-top-width!=''"> <xsl:attribute name="border-top-width"><xsl:value-of select="$border-top-width"/></xsl:attribute> </xsl:if> <xsl:if test="$bottom!=''"> <xsl:attribute name="bottom"><xsl:value-of select="$bottom"/></xsl:attribute> </xsl:if> <xsl:if test="$color!=''"> <xsl:attribute name="color"><xsl:value-of select="$color"/></xsl:attribute> </xsl:if> <xsl:if test="$cue-after!=''"> <xsl:attribute name="cue-after"><xsl:value-of select="$cue-after"/></xsl:attribute> </xsl:if> <xsl:if test="$cue-before!=''"> <xsl:attribute name="cue-before"><xsl:value-of select="$cue-before"/></xsl:attribute> </xsl:if> <xsl:if test="$dominant-baseline!=''"> <xsl:attribute name="dominant-baseline"><xsl:value-of select="$dominant-baseline"/></xsl:attribute> </xsl:if> <xsl:if test="$elevation!=''"> <xsl:attribute name="elevation"><xsl:value-of select="$elevation"/></xsl:attribute> </xsl:if> <xsl:if test="$font-family!=''"> <xsl:attribute name="font-family"><xsl:value-of select="$font-family"/></xsl:attribute> </xsl:if> <xsl:if test="$font-selection-strategy!=''"> <xsl:attribute name="font-selection-strategy"><xsl:value-of select="$font-selection-strategy"/></xsl:attribute> </xsl:if> <xsl:if test="$font-size!=''"> <xsl:attribute name="font-size"><xsl:value-of select="$font-size"/></xsl:attribute> </xsl:if> <xsl:if test="$font-size-adjust!=''"> <xsl:attribute name="font-size-adjust"><xsl:value-of select="$font-size-adjust"/></xsl:attribute> </xsl:if> <xsl:if test="$font-stretch!=''"> <xsl:attribute name="font-stretch"><xsl:value-of select="$font-stretch"/></xsl:attribute> </xsl:if> <xsl:if test="$font-style!=''"> <xsl:attribute name="font-style"><xsl:value-of select="$font-style"/></xsl:attribute> <!--<fo:inline font-style="italic"/>--> </xsl:if> <xsl:if test="$font-variant!=''"> <xsl:attribute name="font-variant"><xsl:value-of select="$font-variant"/></xsl:attribute> </xsl:if> <xsl:if test="$font-weight!=''"> <xsl:attribute name="font-weight"><xsl:value-of select="$font-weight"/></xsl:attribute> </xsl:if> <xsl:if test="$height!=''"> <xsl:attribute name="height"><xsl:value-of select="$height"/></xsl:attribute> </xsl:if> <xsl:if test="$id!=''"> <xsl:attribute name="id"><xsl:value-of select="$id"/></xsl:attribute> </xsl:if> <xsl:if test="$inline-progression-dimension!=''"> <xsl:attribute name="inline-progression-dimension"><xsl:value-of select="$inline-progression-dimension"/></xsl:attribute> </xsl:if> <xsl:if test="$keep-together!=''"> <xsl:attribute name="keep-together"><xsl:value-of select="$keep-together"/></xsl:attribute> </xsl:if> <xsl:if test="$keep-with-next!=''"> <xsl:attribute name="keep-with-next"><xsl:value-of select="$keep-with-next"/></xsl:attribute> </xsl:if> <xsl:if test="$keep-with-previous!=''"> <xsl:attribute name="keep-with-previous"><xsl:value-of select="$keep-with-previous"/></xsl:attribute> </xsl:if> <xsl:if test="$left!=''"> <xsl:attribute name="left"><xsl:value-of select="$left"/></xsl:attribute> </xsl:if> <xsl:if test="$line-height!=''"> <xsl:attribute name="line-height"><xsl:value-of select="$line-height"/></xsl:attribute> </xsl:if> <xsl:if test="$margin-bottom!=''"> <xsl:attribute name="margin-bottom"><xsl:value-of select="$margin-bottom"/></xsl:attribute> </xsl:if> <xsl:if test="$margin-left!=''"> <xsl:attribute name="margin-left"><xsl:value-of select="$margin-left"/></xsl:attribute> </xsl:if> <xsl:if test="$margin-right!=''"> <xsl:attribute name="margin-right"><xsl:value-of select="$margin-right"/></xsl:attribute> </xsl:if> <xsl:if test="$margin-top!=''"> <xsl:attribute name="margin-top"><xsl:value-of select="$margin-top"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-after!=''"> <xsl:attribute name="padding-after"><xsl:value-of select="$padding-after"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-before!=''"> <xsl:attribute name="padding-before"><xsl:value-of select="$padding-before"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-bottom!=''"> <xsl:attribute name="padding-bottom"><xsl:value-of select="$padding-bottom"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-end!=''"> <xsl:attribute name="padding-end"><xsl:value-of select="$padding-end"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-left!=''"> <xsl:attribute name="padding-left"><xsl:value-of select="$padding-left"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-right!=''"> <xsl:attribute name="padding-right"><xsl:value-of select="$padding-right"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-start!=''"> <xsl:attribute name="padding-start"><xsl:value-of select="$padding-start"/></xsl:attribute> </xsl:if> <xsl:if test="$padding-top!=''"> <xsl:attribute name="padding-top"><xsl:value-of select="$padding-top"/></xsl:attribute> </xsl:if> <xsl:if test="$pause-after!=''"> <xsl:attribute name="pause-after"><xsl:value-of select="$pause-after"/></xsl:attribute> </xsl:if> <xsl:if test="$pause-before!=''"> <xsl:attribute name="pause-before"><xsl:value-of select="$pause-before"/></xsl:attribute> </xsl:if> <xsl:if test="$pitch!=''"> <xsl:attribute name="pitch"><xsl:value-of select="$pitch"/></xsl:attribute> </xsl:if> <xsl:if test="$pitch-range!=''"> <xsl:attribute name="pitch-range"><xsl:value-of select="$pitch-range"/></xsl:attribute> </xsl:if> <xsl:if test="$play-during!=''"> <xsl:attribute name="play-during"><xsl:value-of select="$play-during"/></xsl:attribute> </xsl:if> <xsl:if test="$relative-position!=''"> <xsl:attribute name="relative-position"><xsl:value-of select="$relative-position"/></xsl:attribute> </xsl:if> <xsl:if test="$richness!=''"> <xsl:attribute name="richness"><xsl:value-of select="$richness"/></xsl:attribute> </xsl:if> <xsl:if test="$right!=''"> <xsl:attribute name="right"><xsl:value-of select="$right"/></xsl:attribute> </xsl:if> <xsl:if test="$role!=''"> <xsl:attribute name="role"><xsl:value-of select="$role"/></xsl:attribute> </xsl:if> <xsl:if test="$source-document!=''"> <xsl:attribute name="source-document"><xsl:value-of select="$source-document"/></xsl:attribute> </xsl:if> <xsl:if test="$space-end!=''"> <xsl:attribute name="space-end"><xsl:value-of select="$space-end"/></xsl:attribute> </xsl:if> <xsl:if test="$space-start!=''"> <xsl:attribute name="space-start"><xsl:value-of select="$space-start"/></xsl:attribute> </xsl:if> <xsl:if test="$speak!=''"> <xsl:attribute name="speak"><xsl:value-of select="$speak"/></xsl:attribute> </xsl:if> <xsl:if test="$speak-header!=''"> <xsl:attribute name="speak-header"><xsl:value-of select="$speak-header"/></xsl:attribute> </xsl:if> <xsl:if test="$speak-numeral!=''"> <xsl:attribute name="speak-numeral"><xsl:value-of select="$speak-numeral"/></xsl:attribute> </xsl:if> <xsl:if test="$speak-punctuation!=''"> <xsl:attribute name="speak-punctuation"><xsl:value-of select="$speak-punctuation"/></xsl:attribute> </xsl:if> <xsl:if test="$speech-rate!=''"> <xsl:attribute name="speech-rate"><xsl:value-of select="$speech-rate"/></xsl:attribute> </xsl:if> <xsl:if test="$stress!=''"> <xsl:attribute name="stress"><xsl:value-of select="$stress"/></xsl:attribute> </xsl:if> <xsl:if test="$text-decoration!=''"> <xsl:attribute name="text-decoration"><xsl:value-of select="$text-decoration"/></xsl:attribute> </xsl:if> <xsl:if test="$text-transform!=''"> <xsl:attribute name="text-transform"><xsl:value-of select="$text-transform"/></xsl:attribute> </xsl:if> <xsl:if test="$top!=''"> <xsl:attribute name="top"><xsl:value-of select="$top"/></xsl:attribute> </xsl:if> <xsl:if test="$visibility!=''"> <xsl:attribute name="visibility"><xsl:value-of select="$visibility"/></xsl:attribute> </xsl:if> <xsl:if test="$voice-family!=''"> <xsl:attribute name="voice-family"><xsl:value-of select="$voice-family"/></xsl:attribute> </xsl:if> <xsl:if test="$volume!=''"> <xsl:attribute name="volume"><xsl:value-of select="$volume"/></xsl:attribute> </xsl:if> <xsl:if test="$width!=''"> <xsl:attribute name="width"><xsl:value-of select="$width"/></xsl:attribute> </xsl:if> <xsl:if test="$wrap-option!=''"> <xsl:attribute name="wrap-option"><xsl:value-of select="$wrap-option"/></xsl:attribute> </xsl:if> <!-- turn this on to see upppercase happen, this would normally be in a when statement since you we have made it so you can only have one role at a time and mostly use roles for text-modification <xsl:if test="@role='uppercase-normal'"> <xsl:attribute name="text-transform">uppercase</xsl:attribute> <xsl:attribute name="margin">0pt</xsl:attribute> </xsl:if> --> </xsl:template> <!--end processing.attributes--> </xsl:stylesheet>
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]