titlepage.templates.xsl 172 KB

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