titlepage.templates.xsl 180 KB

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