titlepage.templates.xsl 164 KB

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