titlepage.templates.xsl 180 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004
  1. <?xml version="1.0" encoding="ASCII"?>
  2. <!--This file was created automatically by html2xhtml-->
  3. <!--from the HTML stylesheets.-->
  4. <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns="http://www.w3.org/1999/xhtml" version="1.0" exclude-result-prefixes="exsl">
  5. <!-- This stylesheet was created by template/titlepage.xsl-->
  6. <xsl:template name="article.titlepage.recto">
  7. <xsl:choose>
  8. <xsl:when test="articleinfo/title">
  9. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
  10. </xsl:when>
  11. <xsl:when test="artheader/title">
  12. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
  13. </xsl:when>
  14. <xsl:when test="info/title">
  15. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
  16. </xsl:when>
  17. <xsl:when test="title">
  18. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
  19. </xsl:when>
  20. </xsl:choose>
  21. <xsl:choose>
  22. <xsl:when test="articleinfo/subtitle">
  23. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
  24. </xsl:when>
  25. <xsl:when test="artheader/subtitle">
  26. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
  27. </xsl:when>
  28. <xsl:when test="info/subtitle">
  29. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
  30. </xsl:when>
  31. <xsl:when test="subtitle">
  32. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
  33. </xsl:when>
  34. </xsl:choose>
  35. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
  36. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
  37. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
  38. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
  39. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
  40. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
  41. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
  42. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
  43. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
  44. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
  45. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
  46. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
  47. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
  48. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
  49. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  50. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
  51. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
  52. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
  53. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
  54. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
  55. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
  56. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
  57. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
  58. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
  59. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
  60. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
  61. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
  62. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
  63. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
  64. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
  65. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
  66. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
  67. <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
  68. </xsl:template>
  69. <xsl:template name="article.titlepage.verso">
  70. </xsl:template>
  71. <xsl:template name="article.titlepage.separator"><hr/>
  72. </xsl:template>
  73. <xsl:template name="article.titlepage.before.recto">
  74. </xsl:template>
  75. <xsl:template name="article.titlepage.before.verso">
  76. </xsl:template>
  77. <xsl:template name="article.titlepage">
  78. <div class="titlepage">
  79. <xsl:variable name="recto.content">
  80. <xsl:call-template name="article.titlepage.before.recto"/>
  81. <xsl:call-template name="article.titlepage.recto"/>
  82. </xsl:variable>
  83. <xsl:variable name="recto.elements.count">
  84. <xsl:choose>
  85. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  86. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  87. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  88. <xsl:otherwise>1</xsl:otherwise>
  89. </xsl:choose>
  90. </xsl:variable>
  91. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  92. <div><xsl:copy-of select="$recto.content"/></div>
  93. </xsl:if>
  94. <xsl:variable name="verso.content">
  95. <xsl:call-template name="article.titlepage.before.verso"/>
  96. <xsl:call-template name="article.titlepage.verso"/>
  97. </xsl:variable>
  98. <xsl:variable name="verso.elements.count">
  99. <xsl:choose>
  100. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  101. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  102. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  103. <xsl:otherwise>1</xsl:otherwise>
  104. </xsl:choose>
  105. </xsl:variable>
  106. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  107. <div><xsl:copy-of select="$verso.content"/></div>
  108. </xsl:if>
  109. <xsl:call-template name="article.titlepage.separator"/>
  110. </div>
  111. </xsl:template>
  112. <xsl:template match="*" mode="article.titlepage.recto.mode">
  113. <!-- if an element isn't found in this mode, -->
  114. <!-- try the generic titlepage.mode -->
  115. <xsl:apply-templates select="." mode="titlepage.mode"/>
  116. </xsl:template>
  117. <xsl:template match="*" mode="article.titlepage.verso.mode">
  118. <!-- if an element isn't found in this mode, -->
  119. <!-- try the generic titlepage.mode -->
  120. <xsl:apply-templates select="." mode="titlepage.mode"/>
  121. </xsl:template>
  122. <xsl:template match="title" mode="article.titlepage.recto.auto.mode">
  123. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  124. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  125. </div>
  126. </xsl:template>
  127. <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
  128. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  129. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  130. </div>
  131. </xsl:template>
  132. <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
  133. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  134. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  135. </div>
  136. </xsl:template>
  137. <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
  138. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  139. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  140. </div>
  141. </xsl:template>
  142. <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
  143. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  144. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  145. </div>
  146. </xsl:template>
  147. <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
  148. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  149. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  150. </div>
  151. </xsl:template>
  152. <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
  153. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  154. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  155. </div>
  156. </xsl:template>
  157. <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
  158. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  159. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  160. </div>
  161. </xsl:template>
  162. <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
  163. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  164. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  165. </div>
  166. </xsl:template>
  167. <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
  168. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  169. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  170. </div>
  171. </xsl:template>
  172. <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
  173. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  174. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  175. </div>
  176. </xsl:template>
  177. <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
  178. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  179. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  180. </div>
  181. </xsl:template>
  182. <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
  183. <div xsl:use-attribute-sets="article.titlepage.recto.style">
  184. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  185. </div>
  186. </xsl:template>
  187. <xsl:template name="set.titlepage.recto">
  188. <xsl:choose>
  189. <xsl:when test="setinfo/title">
  190. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
  191. </xsl:when>
  192. <xsl:when test="info/title">
  193. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
  194. </xsl:when>
  195. <xsl:when test="title">
  196. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
  197. </xsl:when>
  198. </xsl:choose>
  199. <xsl:choose>
  200. <xsl:when test="setinfo/subtitle">
  201. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
  202. </xsl:when>
  203. <xsl:when test="info/subtitle">
  204. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
  205. </xsl:when>
  206. <xsl:when test="subtitle">
  207. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
  208. </xsl:when>
  209. </xsl:choose>
  210. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
  211. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
  212. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
  213. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
  214. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
  215. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
  216. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
  217. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
  218. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
  219. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  220. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
  221. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
  222. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
  223. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
  224. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
  225. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
  226. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
  227. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
  228. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
  229. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
  230. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
  231. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
  232. </xsl:template>
  233. <xsl:template name="set.titlepage.verso">
  234. </xsl:template>
  235. <xsl:template name="set.titlepage.separator"><hr/>
  236. </xsl:template>
  237. <xsl:template name="set.titlepage.before.recto">
  238. </xsl:template>
  239. <xsl:template name="set.titlepage.before.verso">
  240. </xsl:template>
  241. <xsl:template name="set.titlepage">
  242. <div class="titlepage">
  243. <xsl:variable name="recto.content">
  244. <xsl:call-template name="set.titlepage.before.recto"/>
  245. <xsl:call-template name="set.titlepage.recto"/>
  246. </xsl:variable>
  247. <xsl:variable name="recto.elements.count">
  248. <xsl:choose>
  249. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  250. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  251. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  252. <xsl:otherwise>1</xsl:otherwise>
  253. </xsl:choose>
  254. </xsl:variable>
  255. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  256. <div><xsl:copy-of select="$recto.content"/></div>
  257. </xsl:if>
  258. <xsl:variable name="verso.content">
  259. <xsl:call-template name="set.titlepage.before.verso"/>
  260. <xsl:call-template name="set.titlepage.verso"/>
  261. </xsl:variable>
  262. <xsl:variable name="verso.elements.count">
  263. <xsl:choose>
  264. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  265. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  266. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  267. <xsl:otherwise>1</xsl:otherwise>
  268. </xsl:choose>
  269. </xsl:variable>
  270. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  271. <div><xsl:copy-of select="$verso.content"/></div>
  272. </xsl:if>
  273. <xsl:call-template name="set.titlepage.separator"/>
  274. </div>
  275. </xsl:template>
  276. <xsl:template match="*" mode="set.titlepage.recto.mode">
  277. <!-- if an element isn't found in this mode, -->
  278. <!-- try the generic titlepage.mode -->
  279. <xsl:apply-templates select="." mode="titlepage.mode"/>
  280. </xsl:template>
  281. <xsl:template match="*" mode="set.titlepage.verso.mode">
  282. <!-- if an element isn't found in this mode, -->
  283. <!-- try the generic titlepage.mode -->
  284. <xsl:apply-templates select="." mode="titlepage.mode"/>
  285. </xsl:template>
  286. <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
  287. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  288. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  289. </div>
  290. </xsl:template>
  291. <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
  292. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  293. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  294. </div>
  295. </xsl:template>
  296. <xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
  297. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  298. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  299. </div>
  300. </xsl:template>
  301. <xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
  302. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  303. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  304. </div>
  305. </xsl:template>
  306. <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
  307. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  308. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  309. </div>
  310. </xsl:template>
  311. <xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
  312. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  313. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  314. </div>
  315. </xsl:template>
  316. <xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
  317. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  318. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  319. </div>
  320. </xsl:template>
  321. <xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
  322. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  323. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  324. </div>
  325. </xsl:template>
  326. <xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
  327. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  328. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  329. </div>
  330. </xsl:template>
  331. <xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
  332. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  333. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  334. </div>
  335. </xsl:template>
  336. <xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
  337. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  338. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  339. </div>
  340. </xsl:template>
  341. <xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
  342. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  343. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  344. </div>
  345. </xsl:template>
  346. <xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
  347. <div xsl:use-attribute-sets="set.titlepage.recto.style">
  348. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  349. </div>
  350. </xsl:template>
  351. <xsl:template name="book.titlepage.recto">
  352. <xsl:choose>
  353. <xsl:when test="bookinfo/title">
  354. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
  355. </xsl:when>
  356. <xsl:when test="info/title">
  357. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
  358. </xsl:when>
  359. <xsl:when test="title">
  360. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
  361. </xsl:when>
  362. </xsl:choose>
  363. <xsl:choose>
  364. <xsl:when test="bookinfo/subtitle">
  365. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
  366. </xsl:when>
  367. <xsl:when test="info/subtitle">
  368. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
  369. </xsl:when>
  370. <xsl:when test="subtitle">
  371. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
  372. </xsl:when>
  373. </xsl:choose>
  374. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
  375. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
  376. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
  377. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
  378. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
  379. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
  380. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
  381. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
  382. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
  383. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  384. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
  385. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
  386. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
  387. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
  388. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
  389. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
  390. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
  391. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
  392. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
  393. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
  394. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
  395. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
  396. </xsl:template>
  397. <xsl:template name="book.titlepage.verso">
  398. </xsl:template>
  399. <xsl:template name="book.titlepage.separator"><hr/>
  400. </xsl:template>
  401. <xsl:template name="book.titlepage.before.recto">
  402. </xsl:template>
  403. <xsl:template name="book.titlepage.before.verso">
  404. </xsl:template>
  405. <xsl:template name="book.titlepage">
  406. <div class="titlepage">
  407. <xsl:variable name="recto.content">
  408. <xsl:call-template name="book.titlepage.before.recto"/>
  409. <xsl:call-template name="book.titlepage.recto"/>
  410. </xsl:variable>
  411. <xsl:variable name="recto.elements.count">
  412. <xsl:choose>
  413. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  414. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  415. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  416. <xsl:otherwise>1</xsl:otherwise>
  417. </xsl:choose>
  418. </xsl:variable>
  419. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  420. <div><xsl:copy-of select="$recto.content"/></div>
  421. </xsl:if>
  422. <xsl:variable name="verso.content">
  423. <xsl:call-template name="book.titlepage.before.verso"/>
  424. <xsl:call-template name="book.titlepage.verso"/>
  425. </xsl:variable>
  426. <xsl:variable name="verso.elements.count">
  427. <xsl:choose>
  428. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  429. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  430. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  431. <xsl:otherwise>1</xsl:otherwise>
  432. </xsl:choose>
  433. </xsl:variable>
  434. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  435. <div><xsl:copy-of select="$verso.content"/></div>
  436. </xsl:if>
  437. <xsl:call-template name="book.titlepage.separator"/>
  438. </div>
  439. </xsl:template>
  440. <xsl:template match="*" mode="book.titlepage.recto.mode">
  441. <!-- if an element isn't found in this mode, -->
  442. <!-- try the generic titlepage.mode -->
  443. <xsl:apply-templates select="." mode="titlepage.mode"/>
  444. </xsl:template>
  445. <xsl:template match="*" mode="book.titlepage.verso.mode">
  446. <!-- if an element isn't found in this mode, -->
  447. <!-- try the generic titlepage.mode -->
  448. <xsl:apply-templates select="." mode="titlepage.mode"/>
  449. </xsl:template>
  450. <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
  451. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  452. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  453. </div>
  454. </xsl:template>
  455. <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
  456. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  457. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  458. </div>
  459. </xsl:template>
  460. <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
  461. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  462. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  463. </div>
  464. </xsl:template>
  465. <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
  466. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  467. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  468. </div>
  469. </xsl:template>
  470. <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
  471. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  472. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  473. </div>
  474. </xsl:template>
  475. <xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
  476. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  477. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  478. </div>
  479. </xsl:template>
  480. <xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
  481. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  482. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  483. </div>
  484. </xsl:template>
  485. <xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
  486. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  487. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  488. </div>
  489. </xsl:template>
  490. <xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
  491. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  492. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  493. </div>
  494. </xsl:template>
  495. <xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
  496. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  497. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  498. </div>
  499. </xsl:template>
  500. <xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
  501. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  502. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  503. </div>
  504. </xsl:template>
  505. <xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
  506. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  507. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  508. </div>
  509. </xsl:template>
  510. <xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
  511. <div xsl:use-attribute-sets="book.titlepage.recto.style">
  512. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  513. </div>
  514. </xsl:template>
  515. <xsl:template name="part.titlepage.recto">
  516. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  517. <xsl:call-template name="division.title">
  518. <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
  519. </xsl:call-template></div>
  520. <xsl:choose>
  521. <xsl:when test="partinfo/subtitle">
  522. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
  523. </xsl:when>
  524. <xsl:when test="docinfo/subtitle">
  525. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  526. </xsl:when>
  527. <xsl:when test="info/subtitle">
  528. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
  529. </xsl:when>
  530. <xsl:when test="subtitle">
  531. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
  532. </xsl:when>
  533. </xsl:choose>
  534. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
  535. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  536. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
  537. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
  538. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  539. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
  540. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
  541. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
  542. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
  543. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
  544. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  545. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
  546. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
  547. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  548. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  549. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
  550. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  551. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
  552. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
  553. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  554. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
  555. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
  556. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  557. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
  558. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
  559. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
  560. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
  561. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
  562. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  563. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
  564. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
  565. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  566. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
  567. </xsl:template>
  568. <xsl:template name="part.titlepage.verso">
  569. </xsl:template>
  570. <xsl:template name="part.titlepage.separator">
  571. </xsl:template>
  572. <xsl:template name="part.titlepage.before.recto">
  573. </xsl:template>
  574. <xsl:template name="part.titlepage.before.verso">
  575. </xsl:template>
  576. <xsl:template name="part.titlepage">
  577. <div class="titlepage">
  578. <xsl:variable name="recto.content">
  579. <xsl:call-template name="part.titlepage.before.recto"/>
  580. <xsl:call-template name="part.titlepage.recto"/>
  581. </xsl:variable>
  582. <xsl:variable name="recto.elements.count">
  583. <xsl:choose>
  584. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  585. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  586. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  587. <xsl:otherwise>1</xsl:otherwise>
  588. </xsl:choose>
  589. </xsl:variable>
  590. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  591. <div><xsl:copy-of select="$recto.content"/></div>
  592. </xsl:if>
  593. <xsl:variable name="verso.content">
  594. <xsl:call-template name="part.titlepage.before.verso"/>
  595. <xsl:call-template name="part.titlepage.verso"/>
  596. </xsl:variable>
  597. <xsl:variable name="verso.elements.count">
  598. <xsl:choose>
  599. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  600. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  601. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  602. <xsl:otherwise>1</xsl:otherwise>
  603. </xsl:choose>
  604. </xsl:variable>
  605. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  606. <div><xsl:copy-of select="$verso.content"/></div>
  607. </xsl:if>
  608. <xsl:call-template name="part.titlepage.separator"/>
  609. </div>
  610. </xsl:template>
  611. <xsl:template match="*" mode="part.titlepage.recto.mode">
  612. <!-- if an element isn't found in this mode, -->
  613. <!-- try the generic titlepage.mode -->
  614. <xsl:apply-templates select="." mode="titlepage.mode"/>
  615. </xsl:template>
  616. <xsl:template match="*" mode="part.titlepage.verso.mode">
  617. <!-- if an element isn't found in this mode, -->
  618. <!-- try the generic titlepage.mode -->
  619. <xsl:apply-templates select="." mode="titlepage.mode"/>
  620. </xsl:template>
  621. <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
  622. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  623. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  624. </div>
  625. </xsl:template>
  626. <xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
  627. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  628. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  629. </div>
  630. </xsl:template>
  631. <xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
  632. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  633. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  634. </div>
  635. </xsl:template>
  636. <xsl:template match="author" mode="part.titlepage.recto.auto.mode">
  637. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  638. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  639. </div>
  640. </xsl:template>
  641. <xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
  642. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  643. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  644. </div>
  645. </xsl:template>
  646. <xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
  647. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  648. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  649. </div>
  650. </xsl:template>
  651. <xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
  652. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  653. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  654. </div>
  655. </xsl:template>
  656. <xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
  657. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  658. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  659. </div>
  660. </xsl:template>
  661. <xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
  662. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  663. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  664. </div>
  665. </xsl:template>
  666. <xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
  667. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  668. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  669. </div>
  670. </xsl:template>
  671. <xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
  672. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  673. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  674. </div>
  675. </xsl:template>
  676. <xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
  677. <div xsl:use-attribute-sets="part.titlepage.recto.style">
  678. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  679. </div>
  680. </xsl:template>
  681. <xsl:template name="partintro.titlepage.recto">
  682. <xsl:choose>
  683. <xsl:when test="partintroinfo/title">
  684. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
  685. </xsl:when>
  686. <xsl:when test="docinfo/title">
  687. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
  688. </xsl:when>
  689. <xsl:when test="info/title">
  690. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
  691. </xsl:when>
  692. <xsl:when test="title">
  693. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
  694. </xsl:when>
  695. </xsl:choose>
  696. <xsl:choose>
  697. <xsl:when test="partintroinfo/subtitle">
  698. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
  699. </xsl:when>
  700. <xsl:when test="docinfo/subtitle">
  701. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  702. </xsl:when>
  703. <xsl:when test="info/subtitle">
  704. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
  705. </xsl:when>
  706. <xsl:when test="subtitle">
  707. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
  708. </xsl:when>
  709. </xsl:choose>
  710. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
  711. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  712. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
  713. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
  714. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  715. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
  716. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
  717. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
  718. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
  719. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
  720. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  721. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
  722. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
  723. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  724. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  725. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
  726. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  727. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
  728. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
  729. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  730. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
  731. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
  732. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  733. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
  734. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
  735. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
  736. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
  737. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
  738. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  739. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
  740. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
  741. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  742. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
  743. </xsl:template>
  744. <xsl:template name="partintro.titlepage.verso">
  745. </xsl:template>
  746. <xsl:template name="partintro.titlepage.separator">
  747. </xsl:template>
  748. <xsl:template name="partintro.titlepage.before.recto">
  749. </xsl:template>
  750. <xsl:template name="partintro.titlepage.before.verso">
  751. </xsl:template>
  752. <xsl:template name="partintro.titlepage">
  753. <div>
  754. <xsl:variable name="recto.content">
  755. <xsl:call-template name="partintro.titlepage.before.recto"/>
  756. <xsl:call-template name="partintro.titlepage.recto"/>
  757. </xsl:variable>
  758. <xsl:variable name="recto.elements.count">
  759. <xsl:choose>
  760. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  761. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  762. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  763. <xsl:otherwise>1</xsl:otherwise>
  764. </xsl:choose>
  765. </xsl:variable>
  766. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  767. <div><xsl:copy-of select="$recto.content"/></div>
  768. </xsl:if>
  769. <xsl:variable name="verso.content">
  770. <xsl:call-template name="partintro.titlepage.before.verso"/>
  771. <xsl:call-template name="partintro.titlepage.verso"/>
  772. </xsl:variable>
  773. <xsl:variable name="verso.elements.count">
  774. <xsl:choose>
  775. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  776. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  777. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  778. <xsl:otherwise>1</xsl:otherwise>
  779. </xsl:choose>
  780. </xsl:variable>
  781. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  782. <div><xsl:copy-of select="$verso.content"/></div>
  783. </xsl:if>
  784. <xsl:call-template name="partintro.titlepage.separator"/>
  785. </div>
  786. </xsl:template>
  787. <xsl:template match="*" mode="partintro.titlepage.recto.mode">
  788. <!-- if an element isn't found in this mode, -->
  789. <!-- try the generic titlepage.mode -->
  790. <xsl:apply-templates select="." mode="titlepage.mode"/>
  791. </xsl:template>
  792. <xsl:template match="*" mode="partintro.titlepage.verso.mode">
  793. <!-- if an element isn't found in this mode, -->
  794. <!-- try the generic titlepage.mode -->
  795. <xsl:apply-templates select="." mode="titlepage.mode"/>
  796. </xsl:template>
  797. <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
  798. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  799. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  800. </div>
  801. </xsl:template>
  802. <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
  803. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  804. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  805. </div>
  806. </xsl:template>
  807. <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
  808. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  809. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  810. </div>
  811. </xsl:template>
  812. <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
  813. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  814. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  815. </div>
  816. </xsl:template>
  817. <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
  818. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  819. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  820. </div>
  821. </xsl:template>
  822. <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
  823. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  824. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  825. </div>
  826. </xsl:template>
  827. <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
  828. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  829. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  830. </div>
  831. </xsl:template>
  832. <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
  833. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  834. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  835. </div>
  836. </xsl:template>
  837. <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
  838. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  839. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  840. </div>
  841. </xsl:template>
  842. <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
  843. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  844. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  845. </div>
  846. </xsl:template>
  847. <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
  848. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  849. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  850. </div>
  851. </xsl:template>
  852. <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
  853. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  854. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  855. </div>
  856. </xsl:template>
  857. <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
  858. <div xsl:use-attribute-sets="partintro.titlepage.recto.style">
  859. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  860. </div>
  861. </xsl:template>
  862. <xsl:template name="reference.titlepage.recto">
  863. <xsl:choose>
  864. <xsl:when test="referenceinfo/title">
  865. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
  866. </xsl:when>
  867. <xsl:when test="docinfo/title">
  868. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
  869. </xsl:when>
  870. <xsl:when test="info/title">
  871. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
  872. </xsl:when>
  873. <xsl:when test="title">
  874. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
  875. </xsl:when>
  876. </xsl:choose>
  877. <xsl:choose>
  878. <xsl:when test="referenceinfo/subtitle">
  879. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
  880. </xsl:when>
  881. <xsl:when test="docinfo/subtitle">
  882. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  883. </xsl:when>
  884. <xsl:when test="info/subtitle">
  885. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
  886. </xsl:when>
  887. <xsl:when test="subtitle">
  888. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
  889. </xsl:when>
  890. </xsl:choose>
  891. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
  892. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  893. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
  894. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
  895. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  896. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
  897. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
  898. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
  899. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
  900. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
  901. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  902. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
  903. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
  904. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  905. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  906. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
  907. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  908. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
  909. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
  910. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  911. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
  912. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
  913. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  914. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
  915. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
  916. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
  917. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
  918. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
  919. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  920. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
  921. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
  922. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  923. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
  924. </xsl:template>
  925. <xsl:template name="reference.titlepage.verso">
  926. </xsl:template>
  927. <xsl:template name="reference.titlepage.separator"><hr/>
  928. </xsl:template>
  929. <xsl:template name="reference.titlepage.before.recto">
  930. </xsl:template>
  931. <xsl:template name="reference.titlepage.before.verso">
  932. </xsl:template>
  933. <xsl:template name="reference.titlepage">
  934. <div class="titlepage">
  935. <xsl:variable name="recto.content">
  936. <xsl:call-template name="reference.titlepage.before.recto"/>
  937. <xsl:call-template name="reference.titlepage.recto"/>
  938. </xsl:variable>
  939. <xsl:variable name="recto.elements.count">
  940. <xsl:choose>
  941. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  942. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  943. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  944. <xsl:otherwise>1</xsl:otherwise>
  945. </xsl:choose>
  946. </xsl:variable>
  947. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  948. <div><xsl:copy-of select="$recto.content"/></div>
  949. </xsl:if>
  950. <xsl:variable name="verso.content">
  951. <xsl:call-template name="reference.titlepage.before.verso"/>
  952. <xsl:call-template name="reference.titlepage.verso"/>
  953. </xsl:variable>
  954. <xsl:variable name="verso.elements.count">
  955. <xsl:choose>
  956. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  957. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  958. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  959. <xsl:otherwise>1</xsl:otherwise>
  960. </xsl:choose>
  961. </xsl:variable>
  962. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  963. <div><xsl:copy-of select="$verso.content"/></div>
  964. </xsl:if>
  965. <xsl:call-template name="reference.titlepage.separator"/>
  966. </div>
  967. </xsl:template>
  968. <xsl:template match="*" mode="reference.titlepage.recto.mode">
  969. <!-- if an element isn't found in this mode, -->
  970. <!-- try the generic titlepage.mode -->
  971. <xsl:apply-templates select="." mode="titlepage.mode"/>
  972. </xsl:template>
  973. <xsl:template match="*" mode="reference.titlepage.verso.mode">
  974. <!-- if an element isn't found in this mode, -->
  975. <!-- try the generic titlepage.mode -->
  976. <xsl:apply-templates select="." mode="titlepage.mode"/>
  977. </xsl:template>
  978. <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
  979. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  980. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  981. </div>
  982. </xsl:template>
  983. <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
  984. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  985. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  986. </div>
  987. </xsl:template>
  988. <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
  989. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  990. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  991. </div>
  992. </xsl:template>
  993. <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
  994. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  995. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  996. </div>
  997. </xsl:template>
  998. <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
  999. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1000. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1001. </div>
  1002. </xsl:template>
  1003. <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
  1004. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1005. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1006. </div>
  1007. </xsl:template>
  1008. <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
  1009. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1010. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1011. </div>
  1012. </xsl:template>
  1013. <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
  1014. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1015. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1016. </div>
  1017. </xsl:template>
  1018. <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
  1019. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1020. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1021. </div>
  1022. </xsl:template>
  1023. <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
  1024. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1025. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1026. </div>
  1027. </xsl:template>
  1028. <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
  1029. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1030. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1031. </div>
  1032. </xsl:template>
  1033. <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
  1034. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1035. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1036. </div>
  1037. </xsl:template>
  1038. <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
  1039. <div xsl:use-attribute-sets="reference.titlepage.recto.style">
  1040. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  1041. </div>
  1042. </xsl:template>
  1043. <xsl:template name="refentry.titlepage.recto">
  1044. </xsl:template>
  1045. <xsl:template name="refentry.titlepage.verso">
  1046. </xsl:template>
  1047. <xsl:template name="refentry.titlepage.separator">
  1048. </xsl:template>
  1049. <xsl:template name="refentry.titlepage.before.recto">
  1050. </xsl:template>
  1051. <xsl:template name="refentry.titlepage.before.verso">
  1052. </xsl:template>
  1053. <xsl:template name="refentry.titlepage">
  1054. <div class="titlepage">
  1055. <xsl:variable name="recto.content">
  1056. <xsl:call-template name="refentry.titlepage.before.recto"/>
  1057. <xsl:call-template name="refentry.titlepage.recto"/>
  1058. </xsl:variable>
  1059. <xsl:variable name="recto.elements.count">
  1060. <xsl:choose>
  1061. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1062. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1063. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1064. <xsl:otherwise>1</xsl:otherwise>
  1065. </xsl:choose>
  1066. </xsl:variable>
  1067. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1068. <div><xsl:copy-of select="$recto.content"/></div>
  1069. </xsl:if>
  1070. <xsl:variable name="verso.content">
  1071. <xsl:call-template name="refentry.titlepage.before.verso"/>
  1072. <xsl:call-template name="refentry.titlepage.verso"/>
  1073. </xsl:variable>
  1074. <xsl:variable name="verso.elements.count">
  1075. <xsl:choose>
  1076. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1077. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1078. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1079. <xsl:otherwise>1</xsl:otherwise>
  1080. </xsl:choose>
  1081. </xsl:variable>
  1082. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1083. <div><xsl:copy-of select="$verso.content"/></div>
  1084. </xsl:if>
  1085. <xsl:call-template name="refentry.titlepage.separator"/>
  1086. </div>
  1087. </xsl:template>
  1088. <xsl:template match="*" mode="refentry.titlepage.recto.mode">
  1089. <!-- if an element isn't found in this mode, -->
  1090. <!-- try the generic titlepage.mode -->
  1091. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1092. </xsl:template>
  1093. <xsl:template match="*" mode="refentry.titlepage.verso.mode">
  1094. <!-- if an element isn't found in this mode, -->
  1095. <!-- try the generic titlepage.mode -->
  1096. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1097. </xsl:template>
  1098. <xsl:template name="dedication.titlepage.recto">
  1099. <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
  1100. <xsl:call-template name="component.title">
  1101. <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
  1102. </xsl:call-template></div>
  1103. <xsl:choose>
  1104. <xsl:when test="dedicationinfo/subtitle">
  1105. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
  1106. </xsl:when>
  1107. <xsl:when test="docinfo/subtitle">
  1108. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1109. </xsl:when>
  1110. <xsl:when test="info/subtitle">
  1111. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
  1112. </xsl:when>
  1113. <xsl:when test="subtitle">
  1114. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
  1115. </xsl:when>
  1116. </xsl:choose>
  1117. </xsl:template>
  1118. <xsl:template name="dedication.titlepage.verso">
  1119. </xsl:template>
  1120. <xsl:template name="dedication.titlepage.separator">
  1121. </xsl:template>
  1122. <xsl:template name="dedication.titlepage.before.recto">
  1123. </xsl:template>
  1124. <xsl:template name="dedication.titlepage.before.verso">
  1125. </xsl:template>
  1126. <xsl:template name="dedication.titlepage">
  1127. <div class="titlepage">
  1128. <xsl:variable name="recto.content">
  1129. <xsl:call-template name="dedication.titlepage.before.recto"/>
  1130. <xsl:call-template name="dedication.titlepage.recto"/>
  1131. </xsl:variable>
  1132. <xsl:variable name="recto.elements.count">
  1133. <xsl:choose>
  1134. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1135. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1136. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1137. <xsl:otherwise>1</xsl:otherwise>
  1138. </xsl:choose>
  1139. </xsl:variable>
  1140. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1141. <div><xsl:copy-of select="$recto.content"/></div>
  1142. </xsl:if>
  1143. <xsl:variable name="verso.content">
  1144. <xsl:call-template name="dedication.titlepage.before.verso"/>
  1145. <xsl:call-template name="dedication.titlepage.verso"/>
  1146. </xsl:variable>
  1147. <xsl:variable name="verso.elements.count">
  1148. <xsl:choose>
  1149. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1150. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1151. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1152. <xsl:otherwise>1</xsl:otherwise>
  1153. </xsl:choose>
  1154. </xsl:variable>
  1155. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1156. <div><xsl:copy-of select="$verso.content"/></div>
  1157. </xsl:if>
  1158. <xsl:call-template name="dedication.titlepage.separator"/>
  1159. </div>
  1160. </xsl:template>
  1161. <xsl:template match="*" mode="dedication.titlepage.recto.mode">
  1162. <!-- if an element isn't found in this mode, -->
  1163. <!-- try the generic titlepage.mode -->
  1164. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1165. </xsl:template>
  1166. <xsl:template match="*" mode="dedication.titlepage.verso.mode">
  1167. <!-- if an element isn't found in this mode, -->
  1168. <!-- try the generic titlepage.mode -->
  1169. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1170. </xsl:template>
  1171. <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
  1172. <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
  1173. <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
  1174. </div>
  1175. </xsl:template>
  1176. <xsl:template name="acknowledgements.titlepage.recto">
  1177. <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
  1178. <xsl:call-template name="component.title">
  1179. <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
  1180. </xsl:call-template></div>
  1181. <xsl:choose>
  1182. <xsl:when test="acknowledgementsinfo/subtitle">
  1183. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
  1184. </xsl:when>
  1185. <xsl:when test="docinfo/subtitle">
  1186. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1187. </xsl:when>
  1188. <xsl:when test="info/subtitle">
  1189. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
  1190. </xsl:when>
  1191. <xsl:when test="subtitle">
  1192. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
  1193. </xsl:when>
  1194. </xsl:choose>
  1195. </xsl:template>
  1196. <xsl:template name="acknowledgements.titlepage.verso">
  1197. </xsl:template>
  1198. <xsl:template name="acknowledgements.titlepage.separator">
  1199. </xsl:template>
  1200. <xsl:template name="acknowledgements.titlepage.before.recto">
  1201. </xsl:template>
  1202. <xsl:template name="acknowledgements.titlepage.before.verso">
  1203. </xsl:template>
  1204. <xsl:template name="acknowledgements.titlepage">
  1205. <div class="titlepage">
  1206. <xsl:variable name="recto.content">
  1207. <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
  1208. <xsl:call-template name="acknowledgements.titlepage.recto"/>
  1209. </xsl:variable>
  1210. <xsl:variable name="recto.elements.count">
  1211. <xsl:choose>
  1212. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1213. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1214. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1215. <xsl:otherwise>1</xsl:otherwise>
  1216. </xsl:choose>
  1217. </xsl:variable>
  1218. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1219. <div><xsl:copy-of select="$recto.content"/></div>
  1220. </xsl:if>
  1221. <xsl:variable name="verso.content">
  1222. <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
  1223. <xsl:call-template name="acknowledgements.titlepage.verso"/>
  1224. </xsl:variable>
  1225. <xsl:variable name="verso.elements.count">
  1226. <xsl:choose>
  1227. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1228. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1229. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1230. <xsl:otherwise>1</xsl:otherwise>
  1231. </xsl:choose>
  1232. </xsl:variable>
  1233. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1234. <div><xsl:copy-of select="$verso.content"/></div>
  1235. </xsl:if>
  1236. <xsl:call-template name="acknowledgements.titlepage.separator"/>
  1237. </div>
  1238. </xsl:template>
  1239. <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
  1240. <!-- if an element isn't found in this mode, -->
  1241. <!-- try the generic titlepage.mode -->
  1242. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1243. </xsl:template>
  1244. <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
  1245. <!-- if an element isn't found in this mode, -->
  1246. <!-- try the generic titlepage.mode -->
  1247. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1248. </xsl:template>
  1249. <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
  1250. <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
  1251. <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
  1252. </div>
  1253. </xsl:template>
  1254. <xsl:template name="preface.titlepage.recto">
  1255. <xsl:choose>
  1256. <xsl:when test="prefaceinfo/title">
  1257. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
  1258. </xsl:when>
  1259. <xsl:when test="docinfo/title">
  1260. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
  1261. </xsl:when>
  1262. <xsl:when test="info/title">
  1263. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
  1264. </xsl:when>
  1265. <xsl:when test="title">
  1266. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
  1267. </xsl:when>
  1268. </xsl:choose>
  1269. <xsl:choose>
  1270. <xsl:when test="prefaceinfo/subtitle">
  1271. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
  1272. </xsl:when>
  1273. <xsl:when test="docinfo/subtitle">
  1274. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1275. </xsl:when>
  1276. <xsl:when test="info/subtitle">
  1277. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
  1278. </xsl:when>
  1279. <xsl:when test="subtitle">
  1280. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
  1281. </xsl:when>
  1282. </xsl:choose>
  1283. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
  1284. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1285. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1286. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
  1287. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1288. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1289. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
  1290. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
  1291. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
  1292. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
  1293. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1294. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
  1295. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
  1296. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1297. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1298. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
  1299. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1300. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
  1301. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
  1302. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1303. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1304. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
  1305. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1306. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
  1307. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
  1308. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1309. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
  1310. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
  1311. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1312. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
  1313. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
  1314. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1315. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
  1316. </xsl:template>
  1317. <xsl:template name="preface.titlepage.verso">
  1318. </xsl:template>
  1319. <xsl:template name="preface.titlepage.separator">
  1320. </xsl:template>
  1321. <xsl:template name="preface.titlepage.before.recto">
  1322. </xsl:template>
  1323. <xsl:template name="preface.titlepage.before.verso">
  1324. </xsl:template>
  1325. <xsl:template name="preface.titlepage">
  1326. <div class="titlepage">
  1327. <xsl:variable name="recto.content">
  1328. <xsl:call-template name="preface.titlepage.before.recto"/>
  1329. <xsl:call-template name="preface.titlepage.recto"/>
  1330. </xsl:variable>
  1331. <xsl:variable name="recto.elements.count">
  1332. <xsl:choose>
  1333. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1334. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1335. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1336. <xsl:otherwise>1</xsl:otherwise>
  1337. </xsl:choose>
  1338. </xsl:variable>
  1339. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1340. <div><xsl:copy-of select="$recto.content"/></div>
  1341. </xsl:if>
  1342. <xsl:variable name="verso.content">
  1343. <xsl:call-template name="preface.titlepage.before.verso"/>
  1344. <xsl:call-template name="preface.titlepage.verso"/>
  1345. </xsl:variable>
  1346. <xsl:variable name="verso.elements.count">
  1347. <xsl:choose>
  1348. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1349. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1350. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1351. <xsl:otherwise>1</xsl:otherwise>
  1352. </xsl:choose>
  1353. </xsl:variable>
  1354. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1355. <div><xsl:copy-of select="$verso.content"/></div>
  1356. </xsl:if>
  1357. <xsl:call-template name="preface.titlepage.separator"/>
  1358. </div>
  1359. </xsl:template>
  1360. <xsl:template match="*" mode="preface.titlepage.recto.mode">
  1361. <!-- if an element isn't found in this mode, -->
  1362. <!-- try the generic titlepage.mode -->
  1363. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1364. </xsl:template>
  1365. <xsl:template match="*" mode="preface.titlepage.verso.mode">
  1366. <!-- if an element isn't found in this mode, -->
  1367. <!-- try the generic titlepage.mode -->
  1368. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1369. </xsl:template>
  1370. <xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
  1371. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1372. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1373. </div>
  1374. </xsl:template>
  1375. <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
  1376. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1377. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1378. </div>
  1379. </xsl:template>
  1380. <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
  1381. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1382. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1383. </div>
  1384. </xsl:template>
  1385. <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
  1386. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1387. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1388. </div>
  1389. </xsl:template>
  1390. <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
  1391. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1392. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1393. </div>
  1394. </xsl:template>
  1395. <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
  1396. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1397. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1398. </div>
  1399. </xsl:template>
  1400. <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
  1401. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1402. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1403. </div>
  1404. </xsl:template>
  1405. <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
  1406. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1407. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1408. </div>
  1409. </xsl:template>
  1410. <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
  1411. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1412. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1413. </div>
  1414. </xsl:template>
  1415. <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
  1416. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1417. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1418. </div>
  1419. </xsl:template>
  1420. <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
  1421. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1422. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1423. </div>
  1424. </xsl:template>
  1425. <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
  1426. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1427. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1428. </div>
  1429. </xsl:template>
  1430. <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
  1431. <div xsl:use-attribute-sets="preface.titlepage.recto.style">
  1432. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1433. </div>
  1434. </xsl:template>
  1435. <xsl:template name="chapter.titlepage.recto">
  1436. <xsl:choose>
  1437. <xsl:when test="chapterinfo/title">
  1438. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
  1439. </xsl:when>
  1440. <xsl:when test="docinfo/title">
  1441. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
  1442. </xsl:when>
  1443. <xsl:when test="info/title">
  1444. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
  1445. </xsl:when>
  1446. <xsl:when test="title">
  1447. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
  1448. </xsl:when>
  1449. </xsl:choose>
  1450. <xsl:choose>
  1451. <xsl:when test="chapterinfo/subtitle">
  1452. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
  1453. </xsl:when>
  1454. <xsl:when test="docinfo/subtitle">
  1455. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1456. </xsl:when>
  1457. <xsl:when test="info/subtitle">
  1458. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
  1459. </xsl:when>
  1460. <xsl:when test="subtitle">
  1461. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
  1462. </xsl:when>
  1463. </xsl:choose>
  1464. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
  1465. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1466. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1467. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
  1468. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1469. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1470. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
  1471. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
  1472. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
  1473. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
  1474. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1475. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
  1476. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
  1477. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1478. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1479. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
  1480. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1481. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
  1482. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
  1483. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1484. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1485. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
  1486. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1487. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
  1488. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
  1489. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1490. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
  1491. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
  1492. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1493. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
  1494. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
  1495. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1496. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
  1497. </xsl:template>
  1498. <xsl:template name="chapter.titlepage.verso">
  1499. </xsl:template>
  1500. <xsl:template name="chapter.titlepage.separator">
  1501. </xsl:template>
  1502. <xsl:template name="chapter.titlepage.before.recto">
  1503. </xsl:template>
  1504. <xsl:template name="chapter.titlepage.before.verso">
  1505. </xsl:template>
  1506. <xsl:template name="chapter.titlepage">
  1507. <div class="titlepage">
  1508. <xsl:variable name="recto.content">
  1509. <xsl:call-template name="chapter.titlepage.before.recto"/>
  1510. <xsl:call-template name="chapter.titlepage.recto"/>
  1511. </xsl:variable>
  1512. <xsl:variable name="recto.elements.count">
  1513. <xsl:choose>
  1514. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1515. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1516. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1517. <xsl:otherwise>1</xsl:otherwise>
  1518. </xsl:choose>
  1519. </xsl:variable>
  1520. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1521. <div><xsl:copy-of select="$recto.content"/></div>
  1522. </xsl:if>
  1523. <xsl:variable name="verso.content">
  1524. <xsl:call-template name="chapter.titlepage.before.verso"/>
  1525. <xsl:call-template name="chapter.titlepage.verso"/>
  1526. </xsl:variable>
  1527. <xsl:variable name="verso.elements.count">
  1528. <xsl:choose>
  1529. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1530. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1531. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1532. <xsl:otherwise>1</xsl:otherwise>
  1533. </xsl:choose>
  1534. </xsl:variable>
  1535. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1536. <div><xsl:copy-of select="$verso.content"/></div>
  1537. </xsl:if>
  1538. <xsl:call-template name="chapter.titlepage.separator"/>
  1539. </div>
  1540. </xsl:template>
  1541. <xsl:template match="*" mode="chapter.titlepage.recto.mode">
  1542. <!-- if an element isn't found in this mode, -->
  1543. <!-- try the generic titlepage.mode -->
  1544. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1545. </xsl:template>
  1546. <xsl:template match="*" mode="chapter.titlepage.verso.mode">
  1547. <!-- if an element isn't found in this mode, -->
  1548. <!-- try the generic titlepage.mode -->
  1549. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1550. </xsl:template>
  1551. <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
  1552. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1553. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1554. </div>
  1555. </xsl:template>
  1556. <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
  1557. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1558. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1559. </div>
  1560. </xsl:template>
  1561. <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
  1562. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1563. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1564. </div>
  1565. </xsl:template>
  1566. <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
  1567. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1568. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1569. </div>
  1570. </xsl:template>
  1571. <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
  1572. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1573. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1574. </div>
  1575. </xsl:template>
  1576. <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
  1577. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1578. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1579. </div>
  1580. </xsl:template>
  1581. <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
  1582. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1583. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1584. </div>
  1585. </xsl:template>
  1586. <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
  1587. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1588. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1589. </div>
  1590. </xsl:template>
  1591. <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
  1592. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1593. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1594. </div>
  1595. </xsl:template>
  1596. <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
  1597. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1598. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1599. </div>
  1600. </xsl:template>
  1601. <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
  1602. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1603. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1604. </div>
  1605. </xsl:template>
  1606. <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
  1607. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1608. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1609. </div>
  1610. </xsl:template>
  1611. <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
  1612. <div xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1613. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1614. </div>
  1615. </xsl:template>
  1616. <xsl:template name="topic.titlepage.recto">
  1617. <xsl:choose>
  1618. <xsl:when test="topicinfo/title">
  1619. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/title"/>
  1620. </xsl:when>
  1621. <xsl:when test="info/title">
  1622. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/title"/>
  1623. </xsl:when>
  1624. <xsl:when test="title">
  1625. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="title"/>
  1626. </xsl:when>
  1627. </xsl:choose>
  1628. <xsl:choose>
  1629. <xsl:when test="topicinfo/subtitle">
  1630. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/subtitle"/>
  1631. </xsl:when>
  1632. <xsl:when test="info/subtitle">
  1633. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/subtitle"/>
  1634. </xsl:when>
  1635. <xsl:when test="subtitle">
  1636. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="subtitle"/>
  1637. </xsl:when>
  1638. </xsl:choose>
  1639. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/corpauthor"/>
  1640. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1641. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/authorgroup"/>
  1642. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1643. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/author"/>
  1644. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/author"/>
  1645. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/othercredit"/>
  1646. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/othercredit"/>
  1647. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/releaseinfo"/>
  1648. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1649. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/copyright"/>
  1650. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/copyright"/>
  1651. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/legalnotice"/>
  1652. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1653. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/pubdate"/>
  1654. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/pubdate"/>
  1655. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/revision"/>
  1656. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/revision"/>
  1657. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/revhistory"/>
  1658. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/revhistory"/>
  1659. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="topicinfo/abstract"/>
  1660. <xsl:apply-templates mode="topic.titlepage.recto.auto.mode" select="info/abstract"/>
  1661. </xsl:template>
  1662. <xsl:template name="topic.titlepage.verso">
  1663. </xsl:template>
  1664. <xsl:template name="topic.titlepage.separator">
  1665. </xsl:template>
  1666. <xsl:template name="topic.titlepage.before.recto">
  1667. </xsl:template>
  1668. <xsl:template name="topic.titlepage.before.verso">
  1669. </xsl:template>
  1670. <xsl:template name="topic.titlepage">
  1671. <div class="titlepage">
  1672. <xsl:variable name="recto.content">
  1673. <xsl:call-template name="topic.titlepage.before.recto"/>
  1674. <xsl:call-template name="topic.titlepage.recto"/>
  1675. </xsl:variable>
  1676. <xsl:variable name="recto.elements.count">
  1677. <xsl:choose>
  1678. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1679. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1680. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1681. <xsl:otherwise>1</xsl:otherwise>
  1682. </xsl:choose>
  1683. </xsl:variable>
  1684. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1685. <div><xsl:copy-of select="$recto.content"/></div>
  1686. </xsl:if>
  1687. <xsl:variable name="verso.content">
  1688. <xsl:call-template name="topic.titlepage.before.verso"/>
  1689. <xsl:call-template name="topic.titlepage.verso"/>
  1690. </xsl:variable>
  1691. <xsl:variable name="verso.elements.count">
  1692. <xsl:choose>
  1693. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1694. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1695. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1696. <xsl:otherwise>1</xsl:otherwise>
  1697. </xsl:choose>
  1698. </xsl:variable>
  1699. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1700. <div><xsl:copy-of select="$verso.content"/></div>
  1701. </xsl:if>
  1702. <xsl:call-template name="topic.titlepage.separator"/>
  1703. </div>
  1704. </xsl:template>
  1705. <xsl:template match="*" mode="topic.titlepage.recto.mode">
  1706. <!-- if an element isn't found in this mode, -->
  1707. <!-- try the generic titlepage.mode -->
  1708. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1709. </xsl:template>
  1710. <xsl:template match="*" mode="topic.titlepage.verso.mode">
  1711. <!-- if an element isn't found in this mode, -->
  1712. <!-- try the generic titlepage.mode -->
  1713. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1714. </xsl:template>
  1715. <xsl:template match="title" mode="topic.titlepage.recto.auto.mode">
  1716. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1717. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1718. </div>
  1719. </xsl:template>
  1720. <xsl:template match="subtitle" mode="topic.titlepage.recto.auto.mode">
  1721. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1722. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1723. </div>
  1724. </xsl:template>
  1725. <xsl:template match="corpauthor" mode="topic.titlepage.recto.auto.mode">
  1726. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1727. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1728. </div>
  1729. </xsl:template>
  1730. <xsl:template match="authorgroup" mode="topic.titlepage.recto.auto.mode">
  1731. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1732. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1733. </div>
  1734. </xsl:template>
  1735. <xsl:template match="author" mode="topic.titlepage.recto.auto.mode">
  1736. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1737. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1738. </div>
  1739. </xsl:template>
  1740. <xsl:template match="othercredit" mode="topic.titlepage.recto.auto.mode">
  1741. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1742. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1743. </div>
  1744. </xsl:template>
  1745. <xsl:template match="releaseinfo" mode="topic.titlepage.recto.auto.mode">
  1746. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1747. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1748. </div>
  1749. </xsl:template>
  1750. <xsl:template match="copyright" mode="topic.titlepage.recto.auto.mode">
  1751. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1752. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1753. </div>
  1754. </xsl:template>
  1755. <xsl:template match="legalnotice" mode="topic.titlepage.recto.auto.mode">
  1756. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1757. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1758. </div>
  1759. </xsl:template>
  1760. <xsl:template match="pubdate" mode="topic.titlepage.recto.auto.mode">
  1761. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1762. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1763. </div>
  1764. </xsl:template>
  1765. <xsl:template match="revision" mode="topic.titlepage.recto.auto.mode">
  1766. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1767. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1768. </div>
  1769. </xsl:template>
  1770. <xsl:template match="revhistory" mode="topic.titlepage.recto.auto.mode">
  1771. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1772. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1773. </div>
  1774. </xsl:template>
  1775. <xsl:template match="abstract" mode="topic.titlepage.recto.auto.mode">
  1776. <div xsl:use-attribute-sets="topic.titlepage.recto.style">
  1777. <xsl:apply-templates select="." mode="topic.titlepage.recto.mode"/>
  1778. </div>
  1779. </xsl:template>
  1780. <xsl:template name="appendix.titlepage.recto">
  1781. <xsl:choose>
  1782. <xsl:when test="appendixinfo/title">
  1783. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
  1784. </xsl:when>
  1785. <xsl:when test="docinfo/title">
  1786. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
  1787. </xsl:when>
  1788. <xsl:when test="info/title">
  1789. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
  1790. </xsl:when>
  1791. <xsl:when test="title">
  1792. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
  1793. </xsl:when>
  1794. </xsl:choose>
  1795. <xsl:choose>
  1796. <xsl:when test="appendixinfo/subtitle">
  1797. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
  1798. </xsl:when>
  1799. <xsl:when test="docinfo/subtitle">
  1800. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1801. </xsl:when>
  1802. <xsl:when test="info/subtitle">
  1803. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
  1804. </xsl:when>
  1805. <xsl:when test="subtitle">
  1806. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
  1807. </xsl:when>
  1808. </xsl:choose>
  1809. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
  1810. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1811. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1812. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
  1813. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1814. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1815. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
  1816. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
  1817. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
  1818. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
  1819. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1820. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
  1821. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
  1822. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1823. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1824. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
  1825. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1826. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
  1827. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
  1828. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1829. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1830. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
  1831. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1832. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
  1833. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
  1834. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1835. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
  1836. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
  1837. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1838. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
  1839. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
  1840. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1841. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
  1842. </xsl:template>
  1843. <xsl:template name="appendix.titlepage.verso">
  1844. </xsl:template>
  1845. <xsl:template name="appendix.titlepage.separator">
  1846. </xsl:template>
  1847. <xsl:template name="appendix.titlepage.before.recto">
  1848. </xsl:template>
  1849. <xsl:template name="appendix.titlepage.before.verso">
  1850. </xsl:template>
  1851. <xsl:template name="appendix.titlepage">
  1852. <div class="titlepage">
  1853. <xsl:variable name="recto.content">
  1854. <xsl:call-template name="appendix.titlepage.before.recto"/>
  1855. <xsl:call-template name="appendix.titlepage.recto"/>
  1856. </xsl:variable>
  1857. <xsl:variable name="recto.elements.count">
  1858. <xsl:choose>
  1859. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1860. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1861. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1862. <xsl:otherwise>1</xsl:otherwise>
  1863. </xsl:choose>
  1864. </xsl:variable>
  1865. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1866. <div><xsl:copy-of select="$recto.content"/></div>
  1867. </xsl:if>
  1868. <xsl:variable name="verso.content">
  1869. <xsl:call-template name="appendix.titlepage.before.verso"/>
  1870. <xsl:call-template name="appendix.titlepage.verso"/>
  1871. </xsl:variable>
  1872. <xsl:variable name="verso.elements.count">
  1873. <xsl:choose>
  1874. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1875. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1876. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1877. <xsl:otherwise>1</xsl:otherwise>
  1878. </xsl:choose>
  1879. </xsl:variable>
  1880. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1881. <div><xsl:copy-of select="$verso.content"/></div>
  1882. </xsl:if>
  1883. <xsl:call-template name="appendix.titlepage.separator"/>
  1884. </div>
  1885. </xsl:template>
  1886. <xsl:template match="*" mode="appendix.titlepage.recto.mode">
  1887. <!-- if an element isn't found in this mode, -->
  1888. <!-- try the generic titlepage.mode -->
  1889. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1890. </xsl:template>
  1891. <xsl:template match="*" mode="appendix.titlepage.verso.mode">
  1892. <!-- if an element isn't found in this mode, -->
  1893. <!-- try the generic titlepage.mode -->
  1894. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1895. </xsl:template>
  1896. <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
  1897. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1898. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1899. </div>
  1900. </xsl:template>
  1901. <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
  1902. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1903. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1904. </div>
  1905. </xsl:template>
  1906. <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
  1907. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1908. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1909. </div>
  1910. </xsl:template>
  1911. <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
  1912. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1913. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1914. </div>
  1915. </xsl:template>
  1916. <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
  1917. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1918. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1919. </div>
  1920. </xsl:template>
  1921. <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
  1922. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1923. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1924. </div>
  1925. </xsl:template>
  1926. <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
  1927. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1928. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1929. </div>
  1930. </xsl:template>
  1931. <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
  1932. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1933. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1934. </div>
  1935. </xsl:template>
  1936. <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
  1937. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1938. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1939. </div>
  1940. </xsl:template>
  1941. <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
  1942. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1943. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1944. </div>
  1945. </xsl:template>
  1946. <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
  1947. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1948. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1949. </div>
  1950. </xsl:template>
  1951. <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
  1952. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1953. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1954. </div>
  1955. </xsl:template>
  1956. <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
  1957. <div xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1958. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1959. </div>
  1960. </xsl:template>
  1961. <xsl:template name="section.titlepage.recto">
  1962. <xsl:choose>
  1963. <xsl:when test="sectioninfo/title">
  1964. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
  1965. </xsl:when>
  1966. <xsl:when test="info/title">
  1967. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
  1968. </xsl:when>
  1969. <xsl:when test="title">
  1970. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
  1971. </xsl:when>
  1972. </xsl:choose>
  1973. <xsl:choose>
  1974. <xsl:when test="sectioninfo/subtitle">
  1975. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
  1976. </xsl:when>
  1977. <xsl:when test="info/subtitle">
  1978. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
  1979. </xsl:when>
  1980. <xsl:when test="subtitle">
  1981. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
  1982. </xsl:when>
  1983. </xsl:choose>
  1984. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
  1985. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1986. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
  1987. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1988. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
  1989. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
  1990. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
  1991. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
  1992. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
  1993. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1994. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
  1995. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
  1996. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
  1997. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1998. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
  1999. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
  2000. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
  2001. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
  2002. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
  2003. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
  2004. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
  2005. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
  2006. </xsl:template>
  2007. <xsl:template name="section.titlepage.verso">
  2008. </xsl:template>
  2009. <xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2010. </xsl:template>
  2011. <xsl:template name="section.titlepage.before.recto">
  2012. </xsl:template>
  2013. <xsl:template name="section.titlepage.before.verso">
  2014. </xsl:template>
  2015. <xsl:template name="section.titlepage">
  2016. <div class="titlepage">
  2017. <xsl:variable name="recto.content">
  2018. <xsl:call-template name="section.titlepage.before.recto"/>
  2019. <xsl:call-template name="section.titlepage.recto"/>
  2020. </xsl:variable>
  2021. <xsl:variable name="recto.elements.count">
  2022. <xsl:choose>
  2023. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2024. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2025. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2026. <xsl:otherwise>1</xsl:otherwise>
  2027. </xsl:choose>
  2028. </xsl:variable>
  2029. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2030. <div><xsl:copy-of select="$recto.content"/></div>
  2031. </xsl:if>
  2032. <xsl:variable name="verso.content">
  2033. <xsl:call-template name="section.titlepage.before.verso"/>
  2034. <xsl:call-template name="section.titlepage.verso"/>
  2035. </xsl:variable>
  2036. <xsl:variable name="verso.elements.count">
  2037. <xsl:choose>
  2038. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2039. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2040. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2041. <xsl:otherwise>1</xsl:otherwise>
  2042. </xsl:choose>
  2043. </xsl:variable>
  2044. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2045. <div><xsl:copy-of select="$verso.content"/></div>
  2046. </xsl:if>
  2047. <xsl:call-template name="section.titlepage.separator"/>
  2048. </div>
  2049. </xsl:template>
  2050. <xsl:template match="*" mode="section.titlepage.recto.mode">
  2051. <!-- if an element isn't found in this mode, -->
  2052. <!-- try the generic titlepage.mode -->
  2053. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2054. </xsl:template>
  2055. <xsl:template match="*" mode="section.titlepage.verso.mode">
  2056. <!-- if an element isn't found in this mode, -->
  2057. <!-- try the generic titlepage.mode -->
  2058. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2059. </xsl:template>
  2060. <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
  2061. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2062. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2063. </div>
  2064. </xsl:template>
  2065. <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
  2066. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2067. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2068. </div>
  2069. </xsl:template>
  2070. <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
  2071. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2072. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2073. </div>
  2074. </xsl:template>
  2075. <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
  2076. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2077. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2078. </div>
  2079. </xsl:template>
  2080. <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
  2081. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2082. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2083. </div>
  2084. </xsl:template>
  2085. <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
  2086. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2087. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2088. </div>
  2089. </xsl:template>
  2090. <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
  2091. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2092. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2093. </div>
  2094. </xsl:template>
  2095. <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
  2096. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2097. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2098. </div>
  2099. </xsl:template>
  2100. <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
  2101. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2102. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2103. </div>
  2104. </xsl:template>
  2105. <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
  2106. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2107. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2108. </div>
  2109. </xsl:template>
  2110. <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
  2111. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2112. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2113. </div>
  2114. </xsl:template>
  2115. <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
  2116. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2117. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2118. </div>
  2119. </xsl:template>
  2120. <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
  2121. <div xsl:use-attribute-sets="section.titlepage.recto.style">
  2122. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2123. </div>
  2124. </xsl:template>
  2125. <xsl:template name="sect1.titlepage.recto">
  2126. <xsl:choose>
  2127. <xsl:when test="sect1info/title">
  2128. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
  2129. </xsl:when>
  2130. <xsl:when test="info/title">
  2131. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
  2132. </xsl:when>
  2133. <xsl:when test="title">
  2134. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
  2135. </xsl:when>
  2136. </xsl:choose>
  2137. <xsl:choose>
  2138. <xsl:when test="sect1info/subtitle">
  2139. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
  2140. </xsl:when>
  2141. <xsl:when test="info/subtitle">
  2142. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
  2143. </xsl:when>
  2144. <xsl:when test="subtitle">
  2145. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
  2146. </xsl:when>
  2147. </xsl:choose>
  2148. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
  2149. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2150. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
  2151. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2152. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
  2153. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
  2154. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
  2155. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
  2156. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
  2157. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2158. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
  2159. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
  2160. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
  2161. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2162. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
  2163. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
  2164. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
  2165. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
  2166. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
  2167. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
  2168. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
  2169. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
  2170. </xsl:template>
  2171. <xsl:template name="sect1.titlepage.verso">
  2172. </xsl:template>
  2173. <xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2174. </xsl:template>
  2175. <xsl:template name="sect1.titlepage.before.recto">
  2176. </xsl:template>
  2177. <xsl:template name="sect1.titlepage.before.verso">
  2178. </xsl:template>
  2179. <xsl:template name="sect1.titlepage">
  2180. <div class="titlepage">
  2181. <xsl:variable name="recto.content">
  2182. <xsl:call-template name="sect1.titlepage.before.recto"/>
  2183. <xsl:call-template name="sect1.titlepage.recto"/>
  2184. </xsl:variable>
  2185. <xsl:variable name="recto.elements.count">
  2186. <xsl:choose>
  2187. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2188. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2189. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2190. <xsl:otherwise>1</xsl:otherwise>
  2191. </xsl:choose>
  2192. </xsl:variable>
  2193. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2194. <div><xsl:copy-of select="$recto.content"/></div>
  2195. </xsl:if>
  2196. <xsl:variable name="verso.content">
  2197. <xsl:call-template name="sect1.titlepage.before.verso"/>
  2198. <xsl:call-template name="sect1.titlepage.verso"/>
  2199. </xsl:variable>
  2200. <xsl:variable name="verso.elements.count">
  2201. <xsl:choose>
  2202. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2203. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2204. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2205. <xsl:otherwise>1</xsl:otherwise>
  2206. </xsl:choose>
  2207. </xsl:variable>
  2208. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2209. <div><xsl:copy-of select="$verso.content"/></div>
  2210. </xsl:if>
  2211. <xsl:call-template name="sect1.titlepage.separator"/>
  2212. </div>
  2213. </xsl:template>
  2214. <xsl:template match="*" mode="sect1.titlepage.recto.mode">
  2215. <!-- if an element isn't found in this mode, -->
  2216. <!-- try the generic titlepage.mode -->
  2217. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2218. </xsl:template>
  2219. <xsl:template match="*" mode="sect1.titlepage.verso.mode">
  2220. <!-- if an element isn't found in this mode, -->
  2221. <!-- try the generic titlepage.mode -->
  2222. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2223. </xsl:template>
  2224. <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
  2225. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2226. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2227. </div>
  2228. </xsl:template>
  2229. <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
  2230. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2231. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2232. </div>
  2233. </xsl:template>
  2234. <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
  2235. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2236. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2237. </div>
  2238. </xsl:template>
  2239. <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
  2240. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2241. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2242. </div>
  2243. </xsl:template>
  2244. <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
  2245. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2246. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2247. </div>
  2248. </xsl:template>
  2249. <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
  2250. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2251. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2252. </div>
  2253. </xsl:template>
  2254. <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
  2255. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2256. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2257. </div>
  2258. </xsl:template>
  2259. <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
  2260. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2261. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2262. </div>
  2263. </xsl:template>
  2264. <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
  2265. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2266. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2267. </div>
  2268. </xsl:template>
  2269. <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
  2270. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2271. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2272. </div>
  2273. </xsl:template>
  2274. <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
  2275. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2276. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2277. </div>
  2278. </xsl:template>
  2279. <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
  2280. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2281. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2282. </div>
  2283. </xsl:template>
  2284. <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
  2285. <div xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2286. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2287. </div>
  2288. </xsl:template>
  2289. <xsl:template name="sect2.titlepage.recto">
  2290. <xsl:choose>
  2291. <xsl:when test="sect2info/title">
  2292. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
  2293. </xsl:when>
  2294. <xsl:when test="info/title">
  2295. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
  2296. </xsl:when>
  2297. <xsl:when test="title">
  2298. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
  2299. </xsl:when>
  2300. </xsl:choose>
  2301. <xsl:choose>
  2302. <xsl:when test="sect2info/subtitle">
  2303. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
  2304. </xsl:when>
  2305. <xsl:when test="info/subtitle">
  2306. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
  2307. </xsl:when>
  2308. <xsl:when test="subtitle">
  2309. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
  2310. </xsl:when>
  2311. </xsl:choose>
  2312. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
  2313. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2314. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
  2315. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2316. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
  2317. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
  2318. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
  2319. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
  2320. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
  2321. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2322. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
  2323. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
  2324. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
  2325. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2326. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
  2327. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
  2328. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
  2329. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
  2330. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
  2331. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
  2332. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
  2333. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
  2334. </xsl:template>
  2335. <xsl:template name="sect2.titlepage.verso">
  2336. </xsl:template>
  2337. <xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2338. </xsl:template>
  2339. <xsl:template name="sect2.titlepage.before.recto">
  2340. </xsl:template>
  2341. <xsl:template name="sect2.titlepage.before.verso">
  2342. </xsl:template>
  2343. <xsl:template name="sect2.titlepage">
  2344. <div class="titlepage">
  2345. <xsl:variable name="recto.content">
  2346. <xsl:call-template name="sect2.titlepage.before.recto"/>
  2347. <xsl:call-template name="sect2.titlepage.recto"/>
  2348. </xsl:variable>
  2349. <xsl:variable name="recto.elements.count">
  2350. <xsl:choose>
  2351. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2352. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2353. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2354. <xsl:otherwise>1</xsl:otherwise>
  2355. </xsl:choose>
  2356. </xsl:variable>
  2357. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2358. <div><xsl:copy-of select="$recto.content"/></div>
  2359. </xsl:if>
  2360. <xsl:variable name="verso.content">
  2361. <xsl:call-template name="sect2.titlepage.before.verso"/>
  2362. <xsl:call-template name="sect2.titlepage.verso"/>
  2363. </xsl:variable>
  2364. <xsl:variable name="verso.elements.count">
  2365. <xsl:choose>
  2366. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2367. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2368. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2369. <xsl:otherwise>1</xsl:otherwise>
  2370. </xsl:choose>
  2371. </xsl:variable>
  2372. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2373. <div><xsl:copy-of select="$verso.content"/></div>
  2374. </xsl:if>
  2375. <xsl:call-template name="sect2.titlepage.separator"/>
  2376. </div>
  2377. </xsl:template>
  2378. <xsl:template match="*" mode="sect2.titlepage.recto.mode">
  2379. <!-- if an element isn't found in this mode, -->
  2380. <!-- try the generic titlepage.mode -->
  2381. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2382. </xsl:template>
  2383. <xsl:template match="*" mode="sect2.titlepage.verso.mode">
  2384. <!-- if an element isn't found in this mode, -->
  2385. <!-- try the generic titlepage.mode -->
  2386. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2387. </xsl:template>
  2388. <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
  2389. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2390. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2391. </div>
  2392. </xsl:template>
  2393. <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
  2394. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2395. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2396. </div>
  2397. </xsl:template>
  2398. <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
  2399. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2400. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2401. </div>
  2402. </xsl:template>
  2403. <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
  2404. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2405. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2406. </div>
  2407. </xsl:template>
  2408. <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
  2409. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2410. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2411. </div>
  2412. </xsl:template>
  2413. <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
  2414. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2415. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2416. </div>
  2417. </xsl:template>
  2418. <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
  2419. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2420. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2421. </div>
  2422. </xsl:template>
  2423. <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
  2424. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2425. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2426. </div>
  2427. </xsl:template>
  2428. <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
  2429. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2430. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2431. </div>
  2432. </xsl:template>
  2433. <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
  2434. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2435. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2436. </div>
  2437. </xsl:template>
  2438. <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
  2439. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2440. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2441. </div>
  2442. </xsl:template>
  2443. <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
  2444. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2445. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2446. </div>
  2447. </xsl:template>
  2448. <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
  2449. <div xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2450. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2451. </div>
  2452. </xsl:template>
  2453. <xsl:template name="sect3.titlepage.recto">
  2454. <xsl:choose>
  2455. <xsl:when test="sect3info/title">
  2456. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
  2457. </xsl:when>
  2458. <xsl:when test="info/title">
  2459. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
  2460. </xsl:when>
  2461. <xsl:when test="title">
  2462. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
  2463. </xsl:when>
  2464. </xsl:choose>
  2465. <xsl:choose>
  2466. <xsl:when test="sect3info/subtitle">
  2467. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
  2468. </xsl:when>
  2469. <xsl:when test="info/subtitle">
  2470. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
  2471. </xsl:when>
  2472. <xsl:when test="subtitle">
  2473. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
  2474. </xsl:when>
  2475. </xsl:choose>
  2476. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
  2477. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2478. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
  2479. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2480. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
  2481. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
  2482. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
  2483. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
  2484. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
  2485. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2486. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
  2487. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
  2488. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
  2489. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2490. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
  2491. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
  2492. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
  2493. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
  2494. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
  2495. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
  2496. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
  2497. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
  2498. </xsl:template>
  2499. <xsl:template name="sect3.titlepage.verso">
  2500. </xsl:template>
  2501. <xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2502. </xsl:template>
  2503. <xsl:template name="sect3.titlepage.before.recto">
  2504. </xsl:template>
  2505. <xsl:template name="sect3.titlepage.before.verso">
  2506. </xsl:template>
  2507. <xsl:template name="sect3.titlepage">
  2508. <div class="titlepage">
  2509. <xsl:variable name="recto.content">
  2510. <xsl:call-template name="sect3.titlepage.before.recto"/>
  2511. <xsl:call-template name="sect3.titlepage.recto"/>
  2512. </xsl:variable>
  2513. <xsl:variable name="recto.elements.count">
  2514. <xsl:choose>
  2515. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2516. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2517. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2518. <xsl:otherwise>1</xsl:otherwise>
  2519. </xsl:choose>
  2520. </xsl:variable>
  2521. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2522. <div><xsl:copy-of select="$recto.content"/></div>
  2523. </xsl:if>
  2524. <xsl:variable name="verso.content">
  2525. <xsl:call-template name="sect3.titlepage.before.verso"/>
  2526. <xsl:call-template name="sect3.titlepage.verso"/>
  2527. </xsl:variable>
  2528. <xsl:variable name="verso.elements.count">
  2529. <xsl:choose>
  2530. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2531. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2532. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2533. <xsl:otherwise>1</xsl:otherwise>
  2534. </xsl:choose>
  2535. </xsl:variable>
  2536. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2537. <div><xsl:copy-of select="$verso.content"/></div>
  2538. </xsl:if>
  2539. <xsl:call-template name="sect3.titlepage.separator"/>
  2540. </div>
  2541. </xsl:template>
  2542. <xsl:template match="*" mode="sect3.titlepage.recto.mode">
  2543. <!-- if an element isn't found in this mode, -->
  2544. <!-- try the generic titlepage.mode -->
  2545. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2546. </xsl:template>
  2547. <xsl:template match="*" mode="sect3.titlepage.verso.mode">
  2548. <!-- if an element isn't found in this mode, -->
  2549. <!-- try the generic titlepage.mode -->
  2550. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2551. </xsl:template>
  2552. <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
  2553. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2554. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2555. </div>
  2556. </xsl:template>
  2557. <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
  2558. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2559. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2560. </div>
  2561. </xsl:template>
  2562. <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
  2563. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2564. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2565. </div>
  2566. </xsl:template>
  2567. <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
  2568. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2569. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2570. </div>
  2571. </xsl:template>
  2572. <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
  2573. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2574. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2575. </div>
  2576. </xsl:template>
  2577. <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
  2578. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2579. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2580. </div>
  2581. </xsl:template>
  2582. <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
  2583. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2584. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2585. </div>
  2586. </xsl:template>
  2587. <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
  2588. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2589. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2590. </div>
  2591. </xsl:template>
  2592. <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
  2593. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2594. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2595. </div>
  2596. </xsl:template>
  2597. <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
  2598. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2599. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2600. </div>
  2601. </xsl:template>
  2602. <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
  2603. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2604. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2605. </div>
  2606. </xsl:template>
  2607. <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
  2608. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2609. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2610. </div>
  2611. </xsl:template>
  2612. <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
  2613. <div xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2614. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2615. </div>
  2616. </xsl:template>
  2617. <xsl:template name="sect4.titlepage.recto">
  2618. <xsl:choose>
  2619. <xsl:when test="sect4info/title">
  2620. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
  2621. </xsl:when>
  2622. <xsl:when test="info/title">
  2623. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
  2624. </xsl:when>
  2625. <xsl:when test="title">
  2626. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
  2627. </xsl:when>
  2628. </xsl:choose>
  2629. <xsl:choose>
  2630. <xsl:when test="sect4info/subtitle">
  2631. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
  2632. </xsl:when>
  2633. <xsl:when test="info/subtitle">
  2634. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
  2635. </xsl:when>
  2636. <xsl:when test="subtitle">
  2637. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
  2638. </xsl:when>
  2639. </xsl:choose>
  2640. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
  2641. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2642. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
  2643. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2644. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
  2645. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
  2646. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
  2647. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
  2648. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
  2649. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2650. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
  2651. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
  2652. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
  2653. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2654. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
  2655. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
  2656. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
  2657. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
  2658. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
  2659. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
  2660. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
  2661. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
  2662. </xsl:template>
  2663. <xsl:template name="sect4.titlepage.verso">
  2664. </xsl:template>
  2665. <xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2666. </xsl:template>
  2667. <xsl:template name="sect4.titlepage.before.recto">
  2668. </xsl:template>
  2669. <xsl:template name="sect4.titlepage.before.verso">
  2670. </xsl:template>
  2671. <xsl:template name="sect4.titlepage">
  2672. <div class="titlepage">
  2673. <xsl:variable name="recto.content">
  2674. <xsl:call-template name="sect4.titlepage.before.recto"/>
  2675. <xsl:call-template name="sect4.titlepage.recto"/>
  2676. </xsl:variable>
  2677. <xsl:variable name="recto.elements.count">
  2678. <xsl:choose>
  2679. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2680. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2681. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2682. <xsl:otherwise>1</xsl:otherwise>
  2683. </xsl:choose>
  2684. </xsl:variable>
  2685. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2686. <div><xsl:copy-of select="$recto.content"/></div>
  2687. </xsl:if>
  2688. <xsl:variable name="verso.content">
  2689. <xsl:call-template name="sect4.titlepage.before.verso"/>
  2690. <xsl:call-template name="sect4.titlepage.verso"/>
  2691. </xsl:variable>
  2692. <xsl:variable name="verso.elements.count">
  2693. <xsl:choose>
  2694. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2695. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2696. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2697. <xsl:otherwise>1</xsl:otherwise>
  2698. </xsl:choose>
  2699. </xsl:variable>
  2700. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2701. <div><xsl:copy-of select="$verso.content"/></div>
  2702. </xsl:if>
  2703. <xsl:call-template name="sect4.titlepage.separator"/>
  2704. </div>
  2705. </xsl:template>
  2706. <xsl:template match="*" mode="sect4.titlepage.recto.mode">
  2707. <!-- if an element isn't found in this mode, -->
  2708. <!-- try the generic titlepage.mode -->
  2709. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2710. </xsl:template>
  2711. <xsl:template match="*" mode="sect4.titlepage.verso.mode">
  2712. <!-- if an element isn't found in this mode, -->
  2713. <!-- try the generic titlepage.mode -->
  2714. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2715. </xsl:template>
  2716. <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
  2717. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2718. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2719. </div>
  2720. </xsl:template>
  2721. <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
  2722. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2723. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2724. </div>
  2725. </xsl:template>
  2726. <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
  2727. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2728. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2729. </div>
  2730. </xsl:template>
  2731. <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
  2732. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2733. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2734. </div>
  2735. </xsl:template>
  2736. <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
  2737. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2738. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2739. </div>
  2740. </xsl:template>
  2741. <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
  2742. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2743. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2744. </div>
  2745. </xsl:template>
  2746. <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
  2747. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2748. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2749. </div>
  2750. </xsl:template>
  2751. <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
  2752. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2753. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2754. </div>
  2755. </xsl:template>
  2756. <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
  2757. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2758. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2759. </div>
  2760. </xsl:template>
  2761. <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
  2762. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2763. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2764. </div>
  2765. </xsl:template>
  2766. <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
  2767. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2768. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2769. </div>
  2770. </xsl:template>
  2771. <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
  2772. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2773. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2774. </div>
  2775. </xsl:template>
  2776. <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
  2777. <div xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2778. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2779. </div>
  2780. </xsl:template>
  2781. <xsl:template name="sect5.titlepage.recto">
  2782. <xsl:choose>
  2783. <xsl:when test="sect5info/title">
  2784. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
  2785. </xsl:when>
  2786. <xsl:when test="info/title">
  2787. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
  2788. </xsl:when>
  2789. <xsl:when test="title">
  2790. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
  2791. </xsl:when>
  2792. </xsl:choose>
  2793. <xsl:choose>
  2794. <xsl:when test="sect5info/subtitle">
  2795. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
  2796. </xsl:when>
  2797. <xsl:when test="info/subtitle">
  2798. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
  2799. </xsl:when>
  2800. <xsl:when test="subtitle">
  2801. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
  2802. </xsl:when>
  2803. </xsl:choose>
  2804. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
  2805. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2806. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
  2807. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2808. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
  2809. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
  2810. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
  2811. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
  2812. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
  2813. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2814. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
  2815. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
  2816. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
  2817. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2818. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
  2819. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
  2820. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
  2821. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
  2822. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
  2823. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
  2824. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
  2825. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
  2826. </xsl:template>
  2827. <xsl:template name="sect5.titlepage.verso">
  2828. </xsl:template>
  2829. <xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  2830. </xsl:template>
  2831. <xsl:template name="sect5.titlepage.before.recto">
  2832. </xsl:template>
  2833. <xsl:template name="sect5.titlepage.before.verso">
  2834. </xsl:template>
  2835. <xsl:template name="sect5.titlepage">
  2836. <div class="titlepage">
  2837. <xsl:variable name="recto.content">
  2838. <xsl:call-template name="sect5.titlepage.before.recto"/>
  2839. <xsl:call-template name="sect5.titlepage.recto"/>
  2840. </xsl:variable>
  2841. <xsl:variable name="recto.elements.count">
  2842. <xsl:choose>
  2843. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2844. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2845. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2846. <xsl:otherwise>1</xsl:otherwise>
  2847. </xsl:choose>
  2848. </xsl:variable>
  2849. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2850. <div><xsl:copy-of select="$recto.content"/></div>
  2851. </xsl:if>
  2852. <xsl:variable name="verso.content">
  2853. <xsl:call-template name="sect5.titlepage.before.verso"/>
  2854. <xsl:call-template name="sect5.titlepage.verso"/>
  2855. </xsl:variable>
  2856. <xsl:variable name="verso.elements.count">
  2857. <xsl:choose>
  2858. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2859. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2860. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2861. <xsl:otherwise>1</xsl:otherwise>
  2862. </xsl:choose>
  2863. </xsl:variable>
  2864. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2865. <div><xsl:copy-of select="$verso.content"/></div>
  2866. </xsl:if>
  2867. <xsl:call-template name="sect5.titlepage.separator"/>
  2868. </div>
  2869. </xsl:template>
  2870. <xsl:template match="*" mode="sect5.titlepage.recto.mode">
  2871. <!-- if an element isn't found in this mode, -->
  2872. <!-- try the generic titlepage.mode -->
  2873. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2874. </xsl:template>
  2875. <xsl:template match="*" mode="sect5.titlepage.verso.mode">
  2876. <!-- if an element isn't found in this mode, -->
  2877. <!-- try the generic titlepage.mode -->
  2878. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2879. </xsl:template>
  2880. <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
  2881. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2882. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2883. </div>
  2884. </xsl:template>
  2885. <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
  2886. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2887. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2888. </div>
  2889. </xsl:template>
  2890. <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
  2891. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2892. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2893. </div>
  2894. </xsl:template>
  2895. <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
  2896. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2897. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2898. </div>
  2899. </xsl:template>
  2900. <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
  2901. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2902. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2903. </div>
  2904. </xsl:template>
  2905. <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
  2906. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2907. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2908. </div>
  2909. </xsl:template>
  2910. <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
  2911. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2912. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2913. </div>
  2914. </xsl:template>
  2915. <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
  2916. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2917. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2918. </div>
  2919. </xsl:template>
  2920. <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
  2921. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2922. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2923. </div>
  2924. </xsl:template>
  2925. <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
  2926. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2927. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2928. </div>
  2929. </xsl:template>
  2930. <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
  2931. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2932. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2933. </div>
  2934. </xsl:template>
  2935. <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
  2936. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2937. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2938. </div>
  2939. </xsl:template>
  2940. <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
  2941. <div xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2942. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2943. </div>
  2944. </xsl:template>
  2945. <xsl:template name="simplesect.titlepage.recto">
  2946. <xsl:choose>
  2947. <xsl:when test="simplesectinfo/title">
  2948. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
  2949. </xsl:when>
  2950. <xsl:when test="docinfo/title">
  2951. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
  2952. </xsl:when>
  2953. <xsl:when test="info/title">
  2954. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
  2955. </xsl:when>
  2956. <xsl:when test="title">
  2957. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
  2958. </xsl:when>
  2959. </xsl:choose>
  2960. <xsl:choose>
  2961. <xsl:when test="simplesectinfo/subtitle">
  2962. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
  2963. </xsl:when>
  2964. <xsl:when test="docinfo/subtitle">
  2965. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  2966. </xsl:when>
  2967. <xsl:when test="info/subtitle">
  2968. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
  2969. </xsl:when>
  2970. <xsl:when test="subtitle">
  2971. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
  2972. </xsl:when>
  2973. </xsl:choose>
  2974. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
  2975. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  2976. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2977. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
  2978. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  2979. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2980. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
  2981. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
  2982. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
  2983. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
  2984. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  2985. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
  2986. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
  2987. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  2988. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2989. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
  2990. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  2991. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
  2992. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
  2993. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  2994. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2995. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
  2996. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  2997. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
  2998. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
  2999. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
  3000. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
  3001. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
  3002. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  3003. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
  3004. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
  3005. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  3006. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
  3007. </xsl:template>
  3008. <xsl:template name="simplesect.titlepage.verso">
  3009. </xsl:template>
  3010. <xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
  3011. </xsl:template>
  3012. <xsl:template name="simplesect.titlepage.before.recto">
  3013. </xsl:template>
  3014. <xsl:template name="simplesect.titlepage.before.verso">
  3015. </xsl:template>
  3016. <xsl:template name="simplesect.titlepage">
  3017. <div class="titlepage">
  3018. <xsl:variable name="recto.content">
  3019. <xsl:call-template name="simplesect.titlepage.before.recto"/>
  3020. <xsl:call-template name="simplesect.titlepage.recto"/>
  3021. </xsl:variable>
  3022. <xsl:variable name="recto.elements.count">
  3023. <xsl:choose>
  3024. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3025. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3026. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3027. <xsl:otherwise>1</xsl:otherwise>
  3028. </xsl:choose>
  3029. </xsl:variable>
  3030. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3031. <div><xsl:copy-of select="$recto.content"/></div>
  3032. </xsl:if>
  3033. <xsl:variable name="verso.content">
  3034. <xsl:call-template name="simplesect.titlepage.before.verso"/>
  3035. <xsl:call-template name="simplesect.titlepage.verso"/>
  3036. </xsl:variable>
  3037. <xsl:variable name="verso.elements.count">
  3038. <xsl:choose>
  3039. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3040. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3041. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3042. <xsl:otherwise>1</xsl:otherwise>
  3043. </xsl:choose>
  3044. </xsl:variable>
  3045. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3046. <div><xsl:copy-of select="$verso.content"/></div>
  3047. </xsl:if>
  3048. <xsl:call-template name="simplesect.titlepage.separator"/>
  3049. </div>
  3050. </xsl:template>
  3051. <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
  3052. <!-- if an element isn't found in this mode, -->
  3053. <!-- try the generic titlepage.mode -->
  3054. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3055. </xsl:template>
  3056. <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
  3057. <!-- if an element isn't found in this mode, -->
  3058. <!-- try the generic titlepage.mode -->
  3059. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3060. </xsl:template>
  3061. <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
  3062. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3063. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3064. </div>
  3065. </xsl:template>
  3066. <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
  3067. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3068. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3069. </div>
  3070. </xsl:template>
  3071. <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
  3072. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3073. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3074. </div>
  3075. </xsl:template>
  3076. <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
  3077. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3078. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3079. </div>
  3080. </xsl:template>
  3081. <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
  3082. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3083. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3084. </div>
  3085. </xsl:template>
  3086. <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
  3087. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3088. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3089. </div>
  3090. </xsl:template>
  3091. <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
  3092. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3093. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3094. </div>
  3095. </xsl:template>
  3096. <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
  3097. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3098. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3099. </div>
  3100. </xsl:template>
  3101. <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
  3102. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3103. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3104. </div>
  3105. </xsl:template>
  3106. <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
  3107. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3108. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3109. </div>
  3110. </xsl:template>
  3111. <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
  3112. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3113. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3114. </div>
  3115. </xsl:template>
  3116. <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
  3117. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3118. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3119. </div>
  3120. </xsl:template>
  3121. <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
  3122. <div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3123. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3124. </div>
  3125. </xsl:template>
  3126. <xsl:template name="bibliography.titlepage.recto">
  3127. <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
  3128. <xsl:call-template name="component.title">
  3129. <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
  3130. </xsl:call-template></div>
  3131. <xsl:choose>
  3132. <xsl:when test="bibliographyinfo/subtitle">
  3133. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
  3134. </xsl:when>
  3135. <xsl:when test="docinfo/subtitle">
  3136. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3137. </xsl:when>
  3138. <xsl:when test="info/subtitle">
  3139. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
  3140. </xsl:when>
  3141. <xsl:when test="subtitle">
  3142. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
  3143. </xsl:when>
  3144. </xsl:choose>
  3145. </xsl:template>
  3146. <xsl:template name="bibliography.titlepage.verso">
  3147. </xsl:template>
  3148. <xsl:template name="bibliography.titlepage.separator">
  3149. </xsl:template>
  3150. <xsl:template name="bibliography.titlepage.before.recto">
  3151. </xsl:template>
  3152. <xsl:template name="bibliography.titlepage.before.verso">
  3153. </xsl:template>
  3154. <xsl:template name="bibliography.titlepage">
  3155. <div class="titlepage">
  3156. <xsl:variable name="recto.content">
  3157. <xsl:call-template name="bibliography.titlepage.before.recto"/>
  3158. <xsl:call-template name="bibliography.titlepage.recto"/>
  3159. </xsl:variable>
  3160. <xsl:variable name="recto.elements.count">
  3161. <xsl:choose>
  3162. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3163. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3164. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3165. <xsl:otherwise>1</xsl:otherwise>
  3166. </xsl:choose>
  3167. </xsl:variable>
  3168. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3169. <div><xsl:copy-of select="$recto.content"/></div>
  3170. </xsl:if>
  3171. <xsl:variable name="verso.content">
  3172. <xsl:call-template name="bibliography.titlepage.before.verso"/>
  3173. <xsl:call-template name="bibliography.titlepage.verso"/>
  3174. </xsl:variable>
  3175. <xsl:variable name="verso.elements.count">
  3176. <xsl:choose>
  3177. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3178. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3179. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3180. <xsl:otherwise>1</xsl:otherwise>
  3181. </xsl:choose>
  3182. </xsl:variable>
  3183. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3184. <div><xsl:copy-of select="$verso.content"/></div>
  3185. </xsl:if>
  3186. <xsl:call-template name="bibliography.titlepage.separator"/>
  3187. </div>
  3188. </xsl:template>
  3189. <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
  3190. <!-- if an element isn't found in this mode, -->
  3191. <!-- try the generic titlepage.mode -->
  3192. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3193. </xsl:template>
  3194. <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
  3195. <!-- if an element isn't found in this mode, -->
  3196. <!-- try the generic titlepage.mode -->
  3197. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3198. </xsl:template>
  3199. <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
  3200. <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
  3201. <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
  3202. </div>
  3203. </xsl:template>
  3204. <xsl:template name="glossary.titlepage.recto">
  3205. <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
  3206. <xsl:call-template name="component.title">
  3207. <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
  3208. </xsl:call-template></div>
  3209. <xsl:choose>
  3210. <xsl:when test="glossaryinfo/subtitle">
  3211. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
  3212. </xsl:when>
  3213. <xsl:when test="docinfo/subtitle">
  3214. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3215. </xsl:when>
  3216. <xsl:when test="info/subtitle">
  3217. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
  3218. </xsl:when>
  3219. <xsl:when test="subtitle">
  3220. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
  3221. </xsl:when>
  3222. </xsl:choose>
  3223. </xsl:template>
  3224. <xsl:template name="glossary.titlepage.verso">
  3225. </xsl:template>
  3226. <xsl:template name="glossary.titlepage.separator">
  3227. </xsl:template>
  3228. <xsl:template name="glossary.titlepage.before.recto">
  3229. </xsl:template>
  3230. <xsl:template name="glossary.titlepage.before.verso">
  3231. </xsl:template>
  3232. <xsl:template name="glossary.titlepage">
  3233. <div class="titlepage">
  3234. <xsl:variable name="recto.content">
  3235. <xsl:call-template name="glossary.titlepage.before.recto"/>
  3236. <xsl:call-template name="glossary.titlepage.recto"/>
  3237. </xsl:variable>
  3238. <xsl:variable name="recto.elements.count">
  3239. <xsl:choose>
  3240. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3241. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3242. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3243. <xsl:otherwise>1</xsl:otherwise>
  3244. </xsl:choose>
  3245. </xsl:variable>
  3246. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3247. <div><xsl:copy-of select="$recto.content"/></div>
  3248. </xsl:if>
  3249. <xsl:variable name="verso.content">
  3250. <xsl:call-template name="glossary.titlepage.before.verso"/>
  3251. <xsl:call-template name="glossary.titlepage.verso"/>
  3252. </xsl:variable>
  3253. <xsl:variable name="verso.elements.count">
  3254. <xsl:choose>
  3255. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3256. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3257. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3258. <xsl:otherwise>1</xsl:otherwise>
  3259. </xsl:choose>
  3260. </xsl:variable>
  3261. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3262. <div><xsl:copy-of select="$verso.content"/></div>
  3263. </xsl:if>
  3264. <xsl:call-template name="glossary.titlepage.separator"/>
  3265. </div>
  3266. </xsl:template>
  3267. <xsl:template match="*" mode="glossary.titlepage.recto.mode">
  3268. <!-- if an element isn't found in this mode, -->
  3269. <!-- try the generic titlepage.mode -->
  3270. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3271. </xsl:template>
  3272. <xsl:template match="*" mode="glossary.titlepage.verso.mode">
  3273. <!-- if an element isn't found in this mode, -->
  3274. <!-- try the generic titlepage.mode -->
  3275. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3276. </xsl:template>
  3277. <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
  3278. <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
  3279. <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
  3280. </div>
  3281. </xsl:template>
  3282. <xsl:template name="index.titlepage.recto">
  3283. <div xsl:use-attribute-sets="index.titlepage.recto.style">
  3284. <xsl:call-template name="component.title">
  3285. <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
  3286. </xsl:call-template></div>
  3287. <xsl:choose>
  3288. <xsl:when test="indexinfo/subtitle">
  3289. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
  3290. </xsl:when>
  3291. <xsl:when test="docinfo/subtitle">
  3292. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3293. </xsl:when>
  3294. <xsl:when test="info/subtitle">
  3295. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
  3296. </xsl:when>
  3297. <xsl:when test="subtitle">
  3298. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
  3299. </xsl:when>
  3300. </xsl:choose>
  3301. </xsl:template>
  3302. <xsl:template name="index.titlepage.verso">
  3303. </xsl:template>
  3304. <xsl:template name="index.titlepage.separator">
  3305. </xsl:template>
  3306. <xsl:template name="index.titlepage.before.recto">
  3307. </xsl:template>
  3308. <xsl:template name="index.titlepage.before.verso">
  3309. </xsl:template>
  3310. <xsl:template name="index.titlepage">
  3311. <div class="titlepage">
  3312. <xsl:variable name="recto.content">
  3313. <xsl:call-template name="index.titlepage.before.recto"/>
  3314. <xsl:call-template name="index.titlepage.recto"/>
  3315. </xsl:variable>
  3316. <xsl:variable name="recto.elements.count">
  3317. <xsl:choose>
  3318. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3319. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3320. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3321. <xsl:otherwise>1</xsl:otherwise>
  3322. </xsl:choose>
  3323. </xsl:variable>
  3324. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3325. <div><xsl:copy-of select="$recto.content"/></div>
  3326. </xsl:if>
  3327. <xsl:variable name="verso.content">
  3328. <xsl:call-template name="index.titlepage.before.verso"/>
  3329. <xsl:call-template name="index.titlepage.verso"/>
  3330. </xsl:variable>
  3331. <xsl:variable name="verso.elements.count">
  3332. <xsl:choose>
  3333. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3334. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3335. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3336. <xsl:otherwise>1</xsl:otherwise>
  3337. </xsl:choose>
  3338. </xsl:variable>
  3339. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3340. <div><xsl:copy-of select="$verso.content"/></div>
  3341. </xsl:if>
  3342. <xsl:call-template name="index.titlepage.separator"/>
  3343. </div>
  3344. </xsl:template>
  3345. <xsl:template match="*" mode="index.titlepage.recto.mode">
  3346. <!-- if an element isn't found in this mode, -->
  3347. <!-- try the generic titlepage.mode -->
  3348. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3349. </xsl:template>
  3350. <xsl:template match="*" mode="index.titlepage.verso.mode">
  3351. <!-- if an element isn't found in this mode, -->
  3352. <!-- try the generic titlepage.mode -->
  3353. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3354. </xsl:template>
  3355. <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
  3356. <div xsl:use-attribute-sets="index.titlepage.recto.style">
  3357. <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
  3358. </div>
  3359. </xsl:template>
  3360. <xsl:template name="setindex.titlepage.recto">
  3361. <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
  3362. <xsl:call-template name="component.title">
  3363. <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
  3364. </xsl:call-template></div>
  3365. <xsl:choose>
  3366. <xsl:when test="setindexinfo/subtitle">
  3367. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
  3368. </xsl:when>
  3369. <xsl:when test="docinfo/subtitle">
  3370. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3371. </xsl:when>
  3372. <xsl:when test="info/subtitle">
  3373. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
  3374. </xsl:when>
  3375. <xsl:when test="subtitle">
  3376. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
  3377. </xsl:when>
  3378. </xsl:choose>
  3379. </xsl:template>
  3380. <xsl:template name="setindex.titlepage.verso">
  3381. </xsl:template>
  3382. <xsl:template name="setindex.titlepage.separator">
  3383. </xsl:template>
  3384. <xsl:template name="setindex.titlepage.before.recto">
  3385. </xsl:template>
  3386. <xsl:template name="setindex.titlepage.before.verso">
  3387. </xsl:template>
  3388. <xsl:template name="setindex.titlepage">
  3389. <div class="titlepage">
  3390. <xsl:variable name="recto.content">
  3391. <xsl:call-template name="setindex.titlepage.before.recto"/>
  3392. <xsl:call-template name="setindex.titlepage.recto"/>
  3393. </xsl:variable>
  3394. <xsl:variable name="recto.elements.count">
  3395. <xsl:choose>
  3396. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3397. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3398. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3399. <xsl:otherwise>1</xsl:otherwise>
  3400. </xsl:choose>
  3401. </xsl:variable>
  3402. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3403. <div><xsl:copy-of select="$recto.content"/></div>
  3404. </xsl:if>
  3405. <xsl:variable name="verso.content">
  3406. <xsl:call-template name="setindex.titlepage.before.verso"/>
  3407. <xsl:call-template name="setindex.titlepage.verso"/>
  3408. </xsl:variable>
  3409. <xsl:variable name="verso.elements.count">
  3410. <xsl:choose>
  3411. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3412. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3413. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3414. <xsl:otherwise>1</xsl:otherwise>
  3415. </xsl:choose>
  3416. </xsl:variable>
  3417. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3418. <div><xsl:copy-of select="$verso.content"/></div>
  3419. </xsl:if>
  3420. <xsl:call-template name="setindex.titlepage.separator"/>
  3421. </div>
  3422. </xsl:template>
  3423. <xsl:template match="*" mode="setindex.titlepage.recto.mode">
  3424. <!-- if an element isn't found in this mode, -->
  3425. <!-- try the generic titlepage.mode -->
  3426. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3427. </xsl:template>
  3428. <xsl:template match="*" mode="setindex.titlepage.verso.mode">
  3429. <!-- if an element isn't found in this mode, -->
  3430. <!-- try the generic titlepage.mode -->
  3431. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3432. </xsl:template>
  3433. <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
  3434. <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
  3435. <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
  3436. </div>
  3437. </xsl:template>
  3438. <xsl:template name="sidebar.titlepage.recto">
  3439. <xsl:choose>
  3440. <xsl:when test="sidebarinfo/title">
  3441. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
  3442. </xsl:when>
  3443. <xsl:when test="docinfo/title">
  3444. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
  3445. </xsl:when>
  3446. <xsl:when test="info/title">
  3447. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
  3448. </xsl:when>
  3449. <xsl:when test="title">
  3450. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
  3451. </xsl:when>
  3452. </xsl:choose>
  3453. <xsl:choose>
  3454. <xsl:when test="sidebarinfo/subtitle">
  3455. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
  3456. </xsl:when>
  3457. <xsl:when test="docinfo/subtitle">
  3458. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3459. </xsl:when>
  3460. <xsl:when test="info/subtitle">
  3461. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
  3462. </xsl:when>
  3463. <xsl:when test="subtitle">
  3464. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
  3465. </xsl:when>
  3466. </xsl:choose>
  3467. </xsl:template>
  3468. <xsl:template name="sidebar.titlepage.verso">
  3469. </xsl:template>
  3470. <xsl:template name="sidebar.titlepage.separator">
  3471. </xsl:template>
  3472. <xsl:template name="sidebar.titlepage.before.recto">
  3473. </xsl:template>
  3474. <xsl:template name="sidebar.titlepage.before.verso">
  3475. </xsl:template>
  3476. <xsl:template name="sidebar.titlepage">
  3477. <div class="titlepage">
  3478. <xsl:variable name="recto.content">
  3479. <xsl:call-template name="sidebar.titlepage.before.recto"/>
  3480. <xsl:call-template name="sidebar.titlepage.recto"/>
  3481. </xsl:variable>
  3482. <xsl:variable name="recto.elements.count">
  3483. <xsl:choose>
  3484. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3485. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3486. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3487. <xsl:otherwise>1</xsl:otherwise>
  3488. </xsl:choose>
  3489. </xsl:variable>
  3490. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3491. <div><xsl:copy-of select="$recto.content"/></div>
  3492. </xsl:if>
  3493. <xsl:variable name="verso.content">
  3494. <xsl:call-template name="sidebar.titlepage.before.verso"/>
  3495. <xsl:call-template name="sidebar.titlepage.verso"/>
  3496. </xsl:variable>
  3497. <xsl:variable name="verso.elements.count">
  3498. <xsl:choose>
  3499. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3500. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3501. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3502. <xsl:otherwise>1</xsl:otherwise>
  3503. </xsl:choose>
  3504. </xsl:variable>
  3505. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3506. <div><xsl:copy-of select="$verso.content"/></div>
  3507. </xsl:if>
  3508. <xsl:call-template name="sidebar.titlepage.separator"/>
  3509. </div>
  3510. </xsl:template>
  3511. <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
  3512. <!-- if an element isn't found in this mode, -->
  3513. <!-- try the generic titlepage.mode -->
  3514. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3515. </xsl:template>
  3516. <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
  3517. <!-- if an element isn't found in this mode, -->
  3518. <!-- try the generic titlepage.mode -->
  3519. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3520. </xsl:template>
  3521. <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
  3522. <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
  3523. <xsl:call-template name="formal.object.heading">
  3524. <xsl:with-param name="object" select="ancestor-or-self::sidebar[1]"/>
  3525. </xsl:call-template>
  3526. </div>
  3527. </xsl:template>
  3528. <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
  3529. <div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
  3530. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  3531. </div>
  3532. </xsl:template>
  3533. </xsl:stylesheet>