titlepage.templates.xsl 182 KB

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