titlepage.templates.xsl 164 KB

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