brief-yoctoprojectqs-titlepage.xsl 172 KB

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