mytitlepage.xsl 247 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121
  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">
  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. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  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. <fo:block start-indent="0pt" text-align="left"><xsl:copy-of select="$recto.content"/></fo:block>
  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. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  106. </xsl:if>
  107. <xsl:call-template name="article.titlepage.separator"/>
  108. </fo:block>
  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. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
  122. <xsl:call-template name="component.title">
  123. <xsl:with-param name="node" select="ancestor-or-self::article[1]"/>
  124. </xsl:call-template>
  125. </fo:block>
  126. </xsl:template>
  127. <xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
  128. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style">
  129. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  130. </fo:block>
  131. </xsl:template>
  132. <xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
  133. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  134. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  135. </fo:block>
  136. </xsl:template>
  137. <xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
  138. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  139. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  140. </fo:block>
  141. </xsl:template>
  142. <xsl:template match="author" mode="article.titlepage.recto.auto.mode">
  143. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  144. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  145. </fo:block>
  146. </xsl:template>
  147. <xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
  148. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  149. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  150. </fo:block>
  151. </xsl:template>
  152. <xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
  153. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  154. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  155. </fo:block>
  156. </xsl:template>
  157. <xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
  158. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  159. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  160. </fo:block>
  161. </xsl:template>
  162. <xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
  163. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  164. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  165. </fo:block>
  166. </xsl:template>
  167. <xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
  168. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  169. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  170. </fo:block>
  171. </xsl:template>
  172. <xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
  173. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  174. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  175. </fo:block>
  176. </xsl:template>
  177. <xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
  178. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em">
  179. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  180. </fo:block>
  181. </xsl:template>
  182. <xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
  183. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="article.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  184. <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
  185. </fo:block>
  186. </xsl:template>
  187. <xsl:template name="set.titlepage.recto">
  188. <xsl:choose>
  189. <xsl:when test="setinfo/title">
  190. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
  191. </xsl:when>
  192. <xsl:when test="info/title">
  193. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
  194. </xsl:when>
  195. <xsl:when test="title">
  196. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
  197. </xsl:when>
  198. </xsl:choose>
  199. <xsl:choose>
  200. <xsl:when test="setinfo/subtitle">
  201. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
  202. </xsl:when>
  203. <xsl:when test="info/subtitle">
  204. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
  205. </xsl:when>
  206. <xsl:when test="subtitle">
  207. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
  208. </xsl:when>
  209. </xsl:choose>
  210. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/mediaobject"/>
  211. <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/mediaobject"/>
  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:template>
  215. <xsl:template name="set.titlepage.verso">
  216. </xsl:template>
  217. <xsl:template name="set.titlepage.separator">
  218. </xsl:template>
  219. <xsl:template name="set.titlepage.before.recto">
  220. </xsl:template>
  221. <xsl:template name="set.titlepage.before.verso">
  222. </xsl:template>
  223. <xsl:template name="set.titlepage">
  224. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  225. <xsl:variable name="recto.content">
  226. <xsl:call-template name="set.titlepage.before.recto"/>
  227. <xsl:call-template name="set.titlepage.recto"/>
  228. </xsl:variable>
  229. <xsl:variable name="recto.elements.count">
  230. <xsl:choose>
  231. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  232. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  233. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  234. <xsl:otherwise>1</xsl:otherwise>
  235. </xsl:choose>
  236. </xsl:variable>
  237. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  238. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  239. </xsl:if>
  240. <xsl:variable name="verso.content">
  241. <xsl:call-template name="set.titlepage.before.verso"/>
  242. <xsl:call-template name="set.titlepage.verso"/>
  243. </xsl:variable>
  244. <xsl:variable name="verso.elements.count">
  245. <xsl:choose>
  246. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  247. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  248. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  249. <xsl:otherwise>1</xsl:otherwise>
  250. </xsl:choose>
  251. </xsl:variable>
  252. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  253. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  254. </xsl:if>
  255. <xsl:call-template name="set.titlepage.separator"/>
  256. </fo:block>
  257. </xsl:template>
  258. <xsl:template match="*" mode="set.titlepage.recto.mode">
  259. <!-- if an element isn't found in this mode, -->
  260. <!-- try the generic titlepage.mode -->
  261. <xsl:apply-templates select="." mode="titlepage.mode"/>
  262. </xsl:template>
  263. <xsl:template match="*" mode="set.titlepage.verso.mode">
  264. <!-- if an element isn't found in this mode, -->
  265. <!-- try the generic titlepage.mode -->
  266. <xsl:apply-templates select="." mode="titlepage.mode"/>
  267. </xsl:template>
  268. <xsl:template match="title" mode="set.titlepage.recto.auto.mode">
  269. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" text-align="left" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  270. <xsl:call-template name="division.title">
  271. <xsl:with-param name="node" select="ancestor-or-self::set[1]"/>
  272. </xsl:call-template>
  273. </fo:block>
  274. </xsl:template>
  275. <xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
  276. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style" font-family="{$title.fontset}" text-align="left">
  277. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  278. </fo:block>
  279. </xsl:template>
  280. <xsl:template match="mediaobject" mode="set.titlepage.recto.auto.mode">
  281. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  282. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  283. </fo:block>
  284. </xsl:template>
  285. <xsl:template match="author" mode="set.titlepage.recto.auto.mode">
  286. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="set.titlepage.recto.style">
  287. <xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
  288. </fo:block>
  289. </xsl:template>
  290. <xsl:template name="book.titlepage.recto">
  291. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/mediaobject[not(@role) or @role != 'logo']"/>
  292. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/mediaobject[not(@role) or @role != 'logo']"/>
  293. <xsl:choose>
  294. <xsl:when test="bookinfo/title">
  295. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
  296. </xsl:when>
  297. <xsl:when test="info/title">
  298. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
  299. </xsl:when>
  300. <xsl:when test="title">
  301. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
  302. </xsl:when>
  303. </xsl:choose>
  304. <xsl:choose>
  305. <xsl:when test="bookinfo/subtitle">
  306. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
  307. </xsl:when>
  308. <xsl:when test="info/subtitle">
  309. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
  310. </xsl:when>
  311. <xsl:when test="subtitle">
  312. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
  313. </xsl:when>
  314. </xsl:choose>
  315. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
  316. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
  317. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
  318. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
  319. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
  320. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
  321. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/mediaobject[@role = 'logo']"/>
  322. <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/mediaobject[@role = 'logo']"/>
  323. </xsl:template>
  324. <xsl:template name="book.titlepage.verso">
  325. <xsl:choose>
  326. <xsl:when test="bookinfo/title">
  327. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/title"/>
  328. </xsl:when>
  329. <xsl:when test="info/title">
  330. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/title"/>
  331. </xsl:when>
  332. <xsl:when test="title">
  333. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="title"/>
  334. </xsl:when>
  335. </xsl:choose>
  336. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/corpauthor"/>
  337. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/corpauthor"/>
  338. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/authorgroup"/>
  339. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/authorgroup"/>
  340. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/author"/>
  341. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/author"/>
  342. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/othercredit"/>
  343. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/othercredit"/>
  344. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/revhistory"/>
  345. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/revhistory"/>
  346. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/copyright"/>
  347. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/copyright"/>
  348. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/abstract"/>
  349. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/abstract"/>
  350. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/legalnotice"/>
  351. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/legalnotice"/>
  352. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="bookinfo/date"/>
  353. <xsl:apply-templates mode="book.titlepage.verso.auto.mode" select="info/date"/>
  354. </xsl:template>
  355. <xsl:template name="book.titlepage.separator"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  356. </xsl:template>
  357. <xsl:template name="book.titlepage.before.recto">
  358. </xsl:template>
  359. <xsl:template name="book.titlepage.before.verso"><fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" break-after="page"/>
  360. </xsl:template>
  361. <xsl:template name="book.titlepage">
  362. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  363. <xsl:variable name="recto.content">
  364. <xsl:call-template name="book.titlepage.before.recto"/>
  365. <xsl:call-template name="book.titlepage.recto"/>
  366. </xsl:variable>
  367. <xsl:variable name="recto.elements.count">
  368. <xsl:choose>
  369. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  370. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  371. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  372. <xsl:otherwise>1</xsl:otherwise>
  373. </xsl:choose>
  374. </xsl:variable>
  375. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  376. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  377. </xsl:if>
  378. <xsl:variable name="verso.content">
  379. <xsl:call-template name="book.titlepage.before.verso"/>
  380. <xsl:call-template name="book.titlepage.verso"/>
  381. </xsl:variable>
  382. <xsl:variable name="verso.elements.count">
  383. <xsl:choose>
  384. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  385. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  386. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  387. <xsl:otherwise>1</xsl:otherwise>
  388. </xsl:choose>
  389. </xsl:variable>
  390. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  391. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  392. </xsl:if>
  393. <xsl:call-template name="book.titlepage.separator"/>
  394. </fo:block>
  395. </xsl:template>
  396. <xsl:template match="*" mode="book.titlepage.recto.mode">
  397. <!-- if an element isn't found in this mode, -->
  398. <!-- try the generic titlepage.mode -->
  399. <xsl:apply-templates select="." mode="titlepage.mode"/>
  400. </xsl:template>
  401. <xsl:template match="*" mode="book.titlepage.verso.mode">
  402. <!-- if an element isn't found in this mode, -->
  403. <!-- try the generic titlepage.mode -->
  404. <xsl:apply-templates select="." mode="titlepage.mode"/>
  405. </xsl:template>
  406. <xsl:template match="mediaobject" mode="book.titlepage.recto.auto.mode">
  407. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="50pt">
  408. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  409. </fo:block>
  410. </xsl:template>
  411. <xsl:template match="title" mode="book.titlepage.recto.auto.mode">
  412. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  413. <xsl:call-template name="division.title">
  414. <xsl:with-param name="node" select="ancestor-or-self::book[1]"/>
  415. </xsl:call-template>
  416. </fo:block>
  417. </xsl:template>
  418. <xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
  419. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" text-align="left" font-size="20.736pt" space-before="15.552pt" font-family="{$title.fontset}">
  420. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  421. </fo:block>
  422. </xsl:template>
  423. <xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
  424. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" keep-with-next.within-column="always">
  425. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  426. </fo:block>
  427. </xsl:template>
  428. <xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
  429. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" space-before="2in">
  430. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  431. </fo:block>
  432. </xsl:template>
  433. <xsl:template match="author" mode="book.titlepage.recto.auto.mode">
  434. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.recto.style" font-size="17.28pt" space-before="10.8pt" text-align="left" keep-with-next.within-column="always">
  435. <xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
  436. </fo:block>
  437. </xsl:template>
  438. <xsl:template match="title" mode="book.titlepage.verso.auto.mode">
  439. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="14.4pt" font-weight="bold" font-family="{$title.fontset}">
  440. <xsl:call-template name="book.verso.title">
  441. </xsl:call-template>
  442. </fo:block>
  443. </xsl:template>
  444. <xsl:template match="corpauthor" mode="book.titlepage.verso.auto.mode">
  445. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  446. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  447. </fo:block>
  448. </xsl:template>
  449. <xsl:template match="authorgroup" mode="book.titlepage.verso.auto.mode">
  450. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  451. <xsl:call-template name="verso.authorgroup">
  452. </xsl:call-template>
  453. </fo:block>
  454. </xsl:template>
  455. <xsl:template match="author" mode="book.titlepage.verso.auto.mode">
  456. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  457. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  458. </fo:block>
  459. </xsl:template>
  460. <xsl:template match="othercredit" mode="book.titlepage.verso.auto.mode">
  461. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  462. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  463. </fo:block>
  464. </xsl:template>
  465. <xsl:template match="revhistory" mode="book.titlepage.verso.auto.mode">
  466. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="0.5em">
  467. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  468. </fo:block>
  469. </xsl:template>
  470. <xsl:template match="copyright" mode="book.titlepage.verso.auto.mode">
  471. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  472. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  473. </fo:block>
  474. </xsl:template>
  475. <xsl:template match="abstract" mode="book.titlepage.verso.auto.mode">
  476. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style">
  477. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  478. </fo:block>
  479. </xsl:template>
  480. <xsl:template match="legalnotice" mode="book.titlepage.verso.auto.mode">
  481. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" font-size="8pt">
  482. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  483. </fo:block>
  484. </xsl:template>
  485. <xsl:template match="date" mode="book.titlepage.verso.auto.mode">
  486. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="book.titlepage.verso.style" space-before="1em">
  487. <xsl:apply-templates select="." mode="book.titlepage.verso.mode"/>
  488. </fo:block>
  489. </xsl:template>
  490. <xsl:template name="part.titlepage.recto">
  491. <xsl:choose>
  492. <xsl:when test="partinfo/title">
  493. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/title"/>
  494. </xsl:when>
  495. <xsl:when test="docinfo/title">
  496. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/title"/>
  497. </xsl:when>
  498. <xsl:when test="info/title">
  499. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/title"/>
  500. </xsl:when>
  501. <xsl:when test="title">
  502. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="title"/>
  503. </xsl:when>
  504. </xsl:choose>
  505. <xsl:choose>
  506. <xsl:when test="partinfo/subtitle">
  507. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
  508. </xsl:when>
  509. <xsl:when test="docinfo/subtitle">
  510. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  511. </xsl:when>
  512. <xsl:when test="info/subtitle">
  513. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
  514. </xsl:when>
  515. <xsl:when test="subtitle">
  516. <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
  517. </xsl:when>
  518. </xsl:choose>
  519. </xsl:template>
  520. <xsl:template name="part.titlepage.verso">
  521. </xsl:template>
  522. <xsl:template name="part.titlepage.separator">
  523. </xsl:template>
  524. <xsl:template name="part.titlepage.before.recto">
  525. </xsl:template>
  526. <xsl:template name="part.titlepage.before.verso">
  527. </xsl:template>
  528. <xsl:template name="part.titlepage">
  529. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  530. <xsl:variable name="recto.content">
  531. <xsl:call-template name="part.titlepage.before.recto"/>
  532. <xsl:call-template name="part.titlepage.recto"/>
  533. </xsl:variable>
  534. <xsl:variable name="recto.elements.count">
  535. <xsl:choose>
  536. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  537. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  538. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  539. <xsl:otherwise>1</xsl:otherwise>
  540. </xsl:choose>
  541. </xsl:variable>
  542. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  543. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  544. </xsl:if>
  545. <xsl:variable name="verso.content">
  546. <xsl:call-template name="part.titlepage.before.verso"/>
  547. <xsl:call-template name="part.titlepage.verso"/>
  548. </xsl:variable>
  549. <xsl:variable name="verso.elements.count">
  550. <xsl:choose>
  551. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  552. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  553. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  554. <xsl:otherwise>1</xsl:otherwise>
  555. </xsl:choose>
  556. </xsl:variable>
  557. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  558. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  559. </xsl:if>
  560. <xsl:call-template name="part.titlepage.separator"/>
  561. </fo:block>
  562. </xsl:template>
  563. <xsl:template match="*" mode="part.titlepage.recto.mode">
  564. <!-- if an element isn't found in this mode, -->
  565. <!-- try the generic titlepage.mode -->
  566. <xsl:apply-templates select="." mode="titlepage.mode"/>
  567. </xsl:template>
  568. <xsl:template match="*" mode="part.titlepage.verso.mode">
  569. <!-- if an element isn't found in this mode, -->
  570. <!-- try the generic titlepage.mode -->
  571. <xsl:apply-templates select="." mode="titlepage.mode"/>
  572. </xsl:template>
  573. <xsl:template match="title" mode="part.titlepage.recto.auto.mode">
  574. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  575. <xsl:call-template name="division.title">
  576. <xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
  577. </xsl:call-template>
  578. </fo:block>
  579. </xsl:template>
  580. <xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
  581. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="part.titlepage.recto.style" text-align="center" font-size="20.736pt" space-before="15.552pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
  582. <xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
  583. </fo:block>
  584. </xsl:template>
  585. <xsl:template name="partintro.titlepage.recto">
  586. <xsl:choose>
  587. <xsl:when test="partintroinfo/title">
  588. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
  589. </xsl:when>
  590. <xsl:when test="docinfo/title">
  591. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
  592. </xsl:when>
  593. <xsl:when test="info/title">
  594. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
  595. </xsl:when>
  596. <xsl:when test="title">
  597. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
  598. </xsl:when>
  599. </xsl:choose>
  600. <xsl:choose>
  601. <xsl:when test="partintroinfo/subtitle">
  602. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
  603. </xsl:when>
  604. <xsl:when test="docinfo/subtitle">
  605. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  606. </xsl:when>
  607. <xsl:when test="info/subtitle">
  608. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
  609. </xsl:when>
  610. <xsl:when test="subtitle">
  611. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
  612. </xsl:when>
  613. </xsl:choose>
  614. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
  615. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  616. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
  617. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
  618. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  619. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
  620. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
  621. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
  622. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
  623. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
  624. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  625. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
  626. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
  627. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  628. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  629. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
  630. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  631. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
  632. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
  633. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  634. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
  635. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
  636. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  637. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
  638. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
  639. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
  640. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
  641. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
  642. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  643. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
  644. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
  645. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  646. <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
  647. </xsl:template>
  648. <xsl:template name="partintro.titlepage.verso">
  649. </xsl:template>
  650. <xsl:template name="partintro.titlepage.separator">
  651. </xsl:template>
  652. <xsl:template name="partintro.titlepage.before.recto">
  653. </xsl:template>
  654. <xsl:template name="partintro.titlepage.before.verso">
  655. </xsl:template>
  656. <xsl:template name="partintro.titlepage">
  657. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  658. <xsl:variable name="recto.content">
  659. <xsl:call-template name="partintro.titlepage.before.recto"/>
  660. <xsl:call-template name="partintro.titlepage.recto"/>
  661. </xsl:variable>
  662. <xsl:variable name="recto.elements.count">
  663. <xsl:choose>
  664. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  665. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  666. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  667. <xsl:otherwise>1</xsl:otherwise>
  668. </xsl:choose>
  669. </xsl:variable>
  670. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  671. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  672. </xsl:if>
  673. <xsl:variable name="verso.content">
  674. <xsl:call-template name="partintro.titlepage.before.verso"/>
  675. <xsl:call-template name="partintro.titlepage.verso"/>
  676. </xsl:variable>
  677. <xsl:variable name="verso.elements.count">
  678. <xsl:choose>
  679. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  680. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  681. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  682. <xsl:otherwise>1</xsl:otherwise>
  683. </xsl:choose>
  684. </xsl:variable>
  685. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  686. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  687. </xsl:if>
  688. <xsl:call-template name="partintro.titlepage.separator"/>
  689. </fo:block>
  690. </xsl:template>
  691. <xsl:template match="*" mode="partintro.titlepage.recto.mode">
  692. <!-- if an element isn't found in this mode, -->
  693. <!-- try the generic titlepage.mode -->
  694. <xsl:apply-templates select="." mode="titlepage.mode"/>
  695. </xsl:template>
  696. <xsl:template match="*" mode="partintro.titlepage.verso.mode">
  697. <!-- if an element isn't found in this mode, -->
  698. <!-- try the generic titlepage.mode -->
  699. <xsl:apply-templates select="." mode="titlepage.mode"/>
  700. </xsl:template>
  701. <xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
  702. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="24.8832pt" font-weight="bold" space-before="1em" font-family="{$title.fontset}">
  703. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  704. </fo:block>
  705. </xsl:template>
  706. <xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
  707. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style" text-align="center" font-size="14.4pt" font-weight="bold" font-style="italic" font-family="{$title.fontset}">
  708. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  709. </fo:block>
  710. </xsl:template>
  711. <xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
  712. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  713. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  714. </fo:block>
  715. </xsl:template>
  716. <xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
  717. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  718. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  719. </fo:block>
  720. </xsl:template>
  721. <xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
  722. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  723. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  724. </fo:block>
  725. </xsl:template>
  726. <xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
  727. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  728. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  729. </fo:block>
  730. </xsl:template>
  731. <xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
  732. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  733. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  734. </fo:block>
  735. </xsl:template>
  736. <xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
  737. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  738. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  739. </fo:block>
  740. </xsl:template>
  741. <xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
  742. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  743. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  744. </fo:block>
  745. </xsl:template>
  746. <xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
  747. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  748. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  749. </fo:block>
  750. </xsl:template>
  751. <xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
  752. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  753. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  754. </fo:block>
  755. </xsl:template>
  756. <xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
  757. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  758. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  759. </fo:block>
  760. </xsl:template>
  761. <xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
  762. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="partintro.titlepage.recto.style">
  763. <xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
  764. </fo:block>
  765. </xsl:template>
  766. <xsl:template name="reference.titlepage.recto">
  767. <xsl:choose>
  768. <xsl:when test="referenceinfo/title">
  769. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
  770. </xsl:when>
  771. <xsl:when test="docinfo/title">
  772. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
  773. </xsl:when>
  774. <xsl:when test="info/title">
  775. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
  776. </xsl:when>
  777. <xsl:when test="title">
  778. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
  779. </xsl:when>
  780. </xsl:choose>
  781. <xsl:choose>
  782. <xsl:when test="referenceinfo/subtitle">
  783. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
  784. </xsl:when>
  785. <xsl:when test="docinfo/subtitle">
  786. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  787. </xsl:when>
  788. <xsl:when test="info/subtitle">
  789. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
  790. </xsl:when>
  791. <xsl:when test="subtitle">
  792. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
  793. </xsl:when>
  794. </xsl:choose>
  795. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
  796. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  797. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
  798. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
  799. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  800. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
  801. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
  802. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
  803. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
  804. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
  805. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  806. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
  807. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
  808. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  809. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  810. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
  811. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  812. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
  813. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
  814. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  815. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
  816. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
  817. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  818. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
  819. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
  820. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
  821. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
  822. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
  823. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  824. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
  825. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
  826. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  827. <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
  828. </xsl:template>
  829. <xsl:template name="reference.titlepage.verso">
  830. </xsl:template>
  831. <xsl:template name="reference.titlepage.separator">
  832. </xsl:template>
  833. <xsl:template name="reference.titlepage.before.recto">
  834. </xsl:template>
  835. <xsl:template name="reference.titlepage.before.verso">
  836. </xsl:template>
  837. <xsl:template name="reference.titlepage">
  838. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  839. <xsl:variable name="recto.content">
  840. <xsl:call-template name="reference.titlepage.before.recto"/>
  841. <xsl:call-template name="reference.titlepage.recto"/>
  842. </xsl:variable>
  843. <xsl:variable name="recto.elements.count">
  844. <xsl:choose>
  845. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  846. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  847. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  848. <xsl:otherwise>1</xsl:otherwise>
  849. </xsl:choose>
  850. </xsl:variable>
  851. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  852. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  853. </xsl:if>
  854. <xsl:variable name="verso.content">
  855. <xsl:call-template name="reference.titlepage.before.verso"/>
  856. <xsl:call-template name="reference.titlepage.verso"/>
  857. </xsl:variable>
  858. <xsl:variable name="verso.elements.count">
  859. <xsl:choose>
  860. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  861. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  862. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  863. <xsl:otherwise>1</xsl:otherwise>
  864. </xsl:choose>
  865. </xsl:variable>
  866. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  867. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  868. </xsl:if>
  869. <xsl:call-template name="reference.titlepage.separator"/>
  870. </fo:block>
  871. </xsl:template>
  872. <xsl:template match="*" mode="reference.titlepage.recto.mode">
  873. <!-- if an element isn't found in this mode, -->
  874. <!-- try the generic titlepage.mode -->
  875. <xsl:apply-templates select="." mode="titlepage.mode"/>
  876. </xsl:template>
  877. <xsl:template match="*" mode="reference.titlepage.verso.mode">
  878. <!-- if an element isn't found in this mode, -->
  879. <!-- try the generic titlepage.mode -->
  880. <xsl:apply-templates select="." mode="titlepage.mode"/>
  881. </xsl:template>
  882. <xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
  883. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" text-align="center" font-size="24.8832pt" space-before="18.6624pt" font-weight="bold" font-family="{$title.fontset}">
  884. <xsl:call-template name="division.title">
  885. <xsl:with-param name="node" select="ancestor-or-self::reference[1]"/>
  886. </xsl:call-template>
  887. </fo:block>
  888. </xsl:template>
  889. <xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
  890. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style" font-family="{$title.fontset}" text-align="center">
  891. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  892. </fo:block>
  893. </xsl:template>
  894. <xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
  895. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  896. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  897. </fo:block>
  898. </xsl:template>
  899. <xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
  900. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  901. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  902. </fo:block>
  903. </xsl:template>
  904. <xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
  905. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  906. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  907. </fo:block>
  908. </xsl:template>
  909. <xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
  910. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  911. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  912. </fo:block>
  913. </xsl:template>
  914. <xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
  915. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  916. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  917. </fo:block>
  918. </xsl:template>
  919. <xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
  920. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  921. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  922. </fo:block>
  923. </xsl:template>
  924. <xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
  925. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  926. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  927. </fo:block>
  928. </xsl:template>
  929. <xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
  930. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  931. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  932. </fo:block>
  933. </xsl:template>
  934. <xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
  935. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  936. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  937. </fo:block>
  938. </xsl:template>
  939. <xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
  940. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  941. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  942. </fo:block>
  943. </xsl:template>
  944. <xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
  945. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="reference.titlepage.recto.style">
  946. <xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
  947. </fo:block>
  948. </xsl:template>
  949. <xsl:template name="refsynopsisdiv.titlepage.recto">
  950. <xsl:choose>
  951. <xsl:when test="refsynopsisdivinfo/title">
  952. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="refsynopsisdivinfo/title"/>
  953. </xsl:when>
  954. <xsl:when test="docinfo/title">
  955. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  956. </xsl:when>
  957. <xsl:when test="info/title">
  958. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="info/title"/>
  959. </xsl:when>
  960. <xsl:when test="title">
  961. <xsl:apply-templates mode="refsynopsisdiv.titlepage.recto.auto.mode" select="title"/>
  962. </xsl:when>
  963. </xsl:choose>
  964. </xsl:template>
  965. <xsl:template name="refsynopsisdiv.titlepage.verso">
  966. </xsl:template>
  967. <xsl:template name="refsynopsisdiv.titlepage.separator">
  968. </xsl:template>
  969. <xsl:template name="refsynopsisdiv.titlepage.before.recto">
  970. </xsl:template>
  971. <xsl:template name="refsynopsisdiv.titlepage.before.verso">
  972. </xsl:template>
  973. <xsl:template name="refsynopsisdiv.titlepage">
  974. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  975. <xsl:variable name="recto.content">
  976. <xsl:call-template name="refsynopsisdiv.titlepage.before.recto"/>
  977. <xsl:call-template name="refsynopsisdiv.titlepage.recto"/>
  978. </xsl:variable>
  979. <xsl:variable name="recto.elements.count">
  980. <xsl:choose>
  981. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  982. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  983. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  984. <xsl:otherwise>1</xsl:otherwise>
  985. </xsl:choose>
  986. </xsl:variable>
  987. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  988. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  989. </xsl:if>
  990. <xsl:variable name="verso.content">
  991. <xsl:call-template name="refsynopsisdiv.titlepage.before.verso"/>
  992. <xsl:call-template name="refsynopsisdiv.titlepage.verso"/>
  993. </xsl:variable>
  994. <xsl:variable name="verso.elements.count">
  995. <xsl:choose>
  996. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  997. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  998. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  999. <xsl:otherwise>1</xsl:otherwise>
  1000. </xsl:choose>
  1001. </xsl:variable>
  1002. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1003. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1004. </xsl:if>
  1005. <xsl:call-template name="refsynopsisdiv.titlepage.separator"/>
  1006. </fo:block>
  1007. </xsl:template>
  1008. <xsl:template match="*" mode="refsynopsisdiv.titlepage.recto.mode">
  1009. <!-- if an element isn't found in this mode, -->
  1010. <!-- try the generic titlepage.mode -->
  1011. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1012. </xsl:template>
  1013. <xsl:template match="*" mode="refsynopsisdiv.titlepage.verso.mode">
  1014. <!-- if an element isn't found in this mode, -->
  1015. <!-- try the generic titlepage.mode -->
  1016. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1017. </xsl:template>
  1018. <xsl:template match="title" mode="refsynopsisdiv.titlepage.recto.auto.mode">
  1019. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsynopsisdiv.titlepage.recto.style" font-family="{$title.fontset}">
  1020. <xsl:apply-templates select="." mode="refsynopsisdiv.titlepage.recto.mode"/>
  1021. </fo:block>
  1022. </xsl:template>
  1023. <xsl:template name="refsection.titlepage.recto">
  1024. <xsl:choose>
  1025. <xsl:when test="refsectioninfo/title">
  1026. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="refsectioninfo/title"/>
  1027. </xsl:when>
  1028. <xsl:when test="docinfo/title">
  1029. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="docinfo/title"/>
  1030. </xsl:when>
  1031. <xsl:when test="info/title">
  1032. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="info/title"/>
  1033. </xsl:when>
  1034. <xsl:when test="title">
  1035. <xsl:apply-templates mode="refsection.titlepage.recto.auto.mode" select="title"/>
  1036. </xsl:when>
  1037. </xsl:choose>
  1038. </xsl:template>
  1039. <xsl:template name="refsection.titlepage.verso">
  1040. </xsl:template>
  1041. <xsl:template name="refsection.titlepage.separator">
  1042. </xsl:template>
  1043. <xsl:template name="refsection.titlepage.before.recto">
  1044. </xsl:template>
  1045. <xsl:template name="refsection.titlepage.before.verso">
  1046. </xsl:template>
  1047. <xsl:template name="refsection.titlepage">
  1048. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1049. <xsl:variable name="recto.content">
  1050. <xsl:call-template name="refsection.titlepage.before.recto"/>
  1051. <xsl:call-template name="refsection.titlepage.recto"/>
  1052. </xsl:variable>
  1053. <xsl:variable name="recto.elements.count">
  1054. <xsl:choose>
  1055. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1056. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1057. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1058. <xsl:otherwise>1</xsl:otherwise>
  1059. </xsl:choose>
  1060. </xsl:variable>
  1061. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1062. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1063. </xsl:if>
  1064. <xsl:variable name="verso.content">
  1065. <xsl:call-template name="refsection.titlepage.before.verso"/>
  1066. <xsl:call-template name="refsection.titlepage.verso"/>
  1067. </xsl:variable>
  1068. <xsl:variable name="verso.elements.count">
  1069. <xsl:choose>
  1070. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1071. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1072. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1073. <xsl:otherwise>1</xsl:otherwise>
  1074. </xsl:choose>
  1075. </xsl:variable>
  1076. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1077. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1078. </xsl:if>
  1079. <xsl:call-template name="refsection.titlepage.separator"/>
  1080. </fo:block>
  1081. </xsl:template>
  1082. <xsl:template match="*" mode="refsection.titlepage.recto.mode">
  1083. <!-- if an element isn't found in this mode, -->
  1084. <!-- try the generic titlepage.mode -->
  1085. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1086. </xsl:template>
  1087. <xsl:template match="*" mode="refsection.titlepage.verso.mode">
  1088. <!-- if an element isn't found in this mode, -->
  1089. <!-- try the generic titlepage.mode -->
  1090. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1091. </xsl:template>
  1092. <xsl:template match="title" mode="refsection.titlepage.recto.auto.mode">
  1093. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsection.titlepage.recto.style" font-family="{$title.fontset}">
  1094. <xsl:apply-templates select="." mode="refsection.titlepage.recto.mode"/>
  1095. </fo:block>
  1096. </xsl:template>
  1097. <xsl:template name="refsect1.titlepage.recto">
  1098. <xsl:choose>
  1099. <xsl:when test="refsect1info/title">
  1100. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="refsect1info/title"/>
  1101. </xsl:when>
  1102. <xsl:when test="docinfo/title">
  1103. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="docinfo/title"/>
  1104. </xsl:when>
  1105. <xsl:when test="info/title">
  1106. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="info/title"/>
  1107. </xsl:when>
  1108. <xsl:when test="title">
  1109. <xsl:apply-templates mode="refsect1.titlepage.recto.auto.mode" select="title"/>
  1110. </xsl:when>
  1111. </xsl:choose>
  1112. </xsl:template>
  1113. <xsl:template name="refsect1.titlepage.verso">
  1114. </xsl:template>
  1115. <xsl:template name="refsect1.titlepage.separator">
  1116. </xsl:template>
  1117. <xsl:template name="refsect1.titlepage.before.recto">
  1118. </xsl:template>
  1119. <xsl:template name="refsect1.titlepage.before.verso">
  1120. </xsl:template>
  1121. <xsl:template name="refsect1.titlepage">
  1122. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1123. <xsl:variable name="recto.content">
  1124. <xsl:call-template name="refsect1.titlepage.before.recto"/>
  1125. <xsl:call-template name="refsect1.titlepage.recto"/>
  1126. </xsl:variable>
  1127. <xsl:variable name="recto.elements.count">
  1128. <xsl:choose>
  1129. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1130. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1131. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1132. <xsl:otherwise>1</xsl:otherwise>
  1133. </xsl:choose>
  1134. </xsl:variable>
  1135. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1136. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1137. </xsl:if>
  1138. <xsl:variable name="verso.content">
  1139. <xsl:call-template name="refsect1.titlepage.before.verso"/>
  1140. <xsl:call-template name="refsect1.titlepage.verso"/>
  1141. </xsl:variable>
  1142. <xsl:variable name="verso.elements.count">
  1143. <xsl:choose>
  1144. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1145. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1146. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1147. <xsl:otherwise>1</xsl:otherwise>
  1148. </xsl:choose>
  1149. </xsl:variable>
  1150. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1151. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1152. </xsl:if>
  1153. <xsl:call-template name="refsect1.titlepage.separator"/>
  1154. </fo:block>
  1155. </xsl:template>
  1156. <xsl:template match="*" mode="refsect1.titlepage.recto.mode">
  1157. <!-- if an element isn't found in this mode, -->
  1158. <!-- try the generic titlepage.mode -->
  1159. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1160. </xsl:template>
  1161. <xsl:template match="*" mode="refsect1.titlepage.verso.mode">
  1162. <!-- if an element isn't found in this mode, -->
  1163. <!-- try the generic titlepage.mode -->
  1164. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1165. </xsl:template>
  1166. <xsl:template match="title" mode="refsect1.titlepage.recto.auto.mode">
  1167. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect1.titlepage.recto.style" font-family="{$title.fontset}">
  1168. <xsl:apply-templates select="." mode="refsect1.titlepage.recto.mode"/>
  1169. </fo:block>
  1170. </xsl:template>
  1171. <xsl:template name="refsect2.titlepage.recto">
  1172. <xsl:choose>
  1173. <xsl:when test="refsect2info/title">
  1174. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="refsect2info/title"/>
  1175. </xsl:when>
  1176. <xsl:when test="docinfo/title">
  1177. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="docinfo/title"/>
  1178. </xsl:when>
  1179. <xsl:when test="info/title">
  1180. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="info/title"/>
  1181. </xsl:when>
  1182. <xsl:when test="title">
  1183. <xsl:apply-templates mode="refsect2.titlepage.recto.auto.mode" select="title"/>
  1184. </xsl:when>
  1185. </xsl:choose>
  1186. </xsl:template>
  1187. <xsl:template name="refsect2.titlepage.verso">
  1188. </xsl:template>
  1189. <xsl:template name="refsect2.titlepage.separator">
  1190. </xsl:template>
  1191. <xsl:template name="refsect2.titlepage.before.recto">
  1192. </xsl:template>
  1193. <xsl:template name="refsect2.titlepage.before.verso">
  1194. </xsl:template>
  1195. <xsl:template name="refsect2.titlepage">
  1196. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1197. <xsl:variable name="recto.content">
  1198. <xsl:call-template name="refsect2.titlepage.before.recto"/>
  1199. <xsl:call-template name="refsect2.titlepage.recto"/>
  1200. </xsl:variable>
  1201. <xsl:variable name="recto.elements.count">
  1202. <xsl:choose>
  1203. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1204. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1205. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1206. <xsl:otherwise>1</xsl:otherwise>
  1207. </xsl:choose>
  1208. </xsl:variable>
  1209. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1210. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1211. </xsl:if>
  1212. <xsl:variable name="verso.content">
  1213. <xsl:call-template name="refsect2.titlepage.before.verso"/>
  1214. <xsl:call-template name="refsect2.titlepage.verso"/>
  1215. </xsl:variable>
  1216. <xsl:variable name="verso.elements.count">
  1217. <xsl:choose>
  1218. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1219. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1220. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1221. <xsl:otherwise>1</xsl:otherwise>
  1222. </xsl:choose>
  1223. </xsl:variable>
  1224. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1225. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1226. </xsl:if>
  1227. <xsl:call-template name="refsect2.titlepage.separator"/>
  1228. </fo:block>
  1229. </xsl:template>
  1230. <xsl:template match="*" mode="refsect2.titlepage.recto.mode">
  1231. <!-- if an element isn't found in this mode, -->
  1232. <!-- try the generic titlepage.mode -->
  1233. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1234. </xsl:template>
  1235. <xsl:template match="*" mode="refsect2.titlepage.verso.mode">
  1236. <!-- if an element isn't found in this mode, -->
  1237. <!-- try the generic titlepage.mode -->
  1238. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1239. </xsl:template>
  1240. <xsl:template match="title" mode="refsect2.titlepage.recto.auto.mode">
  1241. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect2.titlepage.recto.style" font-family="{$title.fontset}">
  1242. <xsl:apply-templates select="." mode="refsect2.titlepage.recto.mode"/>
  1243. </fo:block>
  1244. </xsl:template>
  1245. <xsl:template name="refsect3.titlepage.recto">
  1246. <xsl:choose>
  1247. <xsl:when test="refsect3info/title">
  1248. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="refsect3info/title"/>
  1249. </xsl:when>
  1250. <xsl:when test="docinfo/title">
  1251. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="docinfo/title"/>
  1252. </xsl:when>
  1253. <xsl:when test="info/title">
  1254. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="info/title"/>
  1255. </xsl:when>
  1256. <xsl:when test="title">
  1257. <xsl:apply-templates mode="refsect3.titlepage.recto.auto.mode" select="title"/>
  1258. </xsl:when>
  1259. </xsl:choose>
  1260. </xsl:template>
  1261. <xsl:template name="refsect3.titlepage.verso">
  1262. </xsl:template>
  1263. <xsl:template name="refsect3.titlepage.separator">
  1264. </xsl:template>
  1265. <xsl:template name="refsect3.titlepage.before.recto">
  1266. </xsl:template>
  1267. <xsl:template name="refsect3.titlepage.before.verso">
  1268. </xsl:template>
  1269. <xsl:template name="refsect3.titlepage">
  1270. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1271. <xsl:variable name="recto.content">
  1272. <xsl:call-template name="refsect3.titlepage.before.recto"/>
  1273. <xsl:call-template name="refsect3.titlepage.recto"/>
  1274. </xsl:variable>
  1275. <xsl:variable name="recto.elements.count">
  1276. <xsl:choose>
  1277. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1278. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1279. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1280. <xsl:otherwise>1</xsl:otherwise>
  1281. </xsl:choose>
  1282. </xsl:variable>
  1283. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1284. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1285. </xsl:if>
  1286. <xsl:variable name="verso.content">
  1287. <xsl:call-template name="refsect3.titlepage.before.verso"/>
  1288. <xsl:call-template name="refsect3.titlepage.verso"/>
  1289. </xsl:variable>
  1290. <xsl:variable name="verso.elements.count">
  1291. <xsl:choose>
  1292. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1293. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1294. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1295. <xsl:otherwise>1</xsl:otherwise>
  1296. </xsl:choose>
  1297. </xsl:variable>
  1298. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1299. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1300. </xsl:if>
  1301. <xsl:call-template name="refsect3.titlepage.separator"/>
  1302. </fo:block>
  1303. </xsl:template>
  1304. <xsl:template match="*" mode="refsect3.titlepage.recto.mode">
  1305. <!-- if an element isn't found in this mode, -->
  1306. <!-- try the generic titlepage.mode -->
  1307. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1308. </xsl:template>
  1309. <xsl:template match="*" mode="refsect3.titlepage.verso.mode">
  1310. <!-- if an element isn't found in this mode, -->
  1311. <!-- try the generic titlepage.mode -->
  1312. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1313. </xsl:template>
  1314. <xsl:template match="title" mode="refsect3.titlepage.recto.auto.mode">
  1315. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="refsect3.titlepage.recto.style" font-family="{$title.fontset}">
  1316. <xsl:apply-templates select="." mode="refsect3.titlepage.recto.mode"/>
  1317. </fo:block>
  1318. </xsl:template>
  1319. <xsl:template name="dedication.titlepage.recto">
  1320. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1321. <xsl:call-template name="component.title">
  1322. <xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
  1323. </xsl:call-template></fo:block>
  1324. <xsl:choose>
  1325. <xsl:when test="dedicationinfo/subtitle">
  1326. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
  1327. </xsl:when>
  1328. <xsl:when test="docinfo/subtitle">
  1329. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1330. </xsl:when>
  1331. <xsl:when test="info/subtitle">
  1332. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
  1333. </xsl:when>
  1334. <xsl:when test="subtitle">
  1335. <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
  1336. </xsl:when>
  1337. </xsl:choose>
  1338. </xsl:template>
  1339. <xsl:template name="dedication.titlepage.verso">
  1340. </xsl:template>
  1341. <xsl:template name="dedication.titlepage.separator">
  1342. </xsl:template>
  1343. <xsl:template name="dedication.titlepage.before.recto">
  1344. </xsl:template>
  1345. <xsl:template name="dedication.titlepage.before.verso">
  1346. </xsl:template>
  1347. <xsl:template name="dedication.titlepage">
  1348. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1349. <xsl:variable name="recto.content">
  1350. <xsl:call-template name="dedication.titlepage.before.recto"/>
  1351. <xsl:call-template name="dedication.titlepage.recto"/>
  1352. </xsl:variable>
  1353. <xsl:variable name="recto.elements.count">
  1354. <xsl:choose>
  1355. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1356. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1357. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1358. <xsl:otherwise>1</xsl:otherwise>
  1359. </xsl:choose>
  1360. </xsl:variable>
  1361. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1362. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1363. </xsl:if>
  1364. <xsl:variable name="verso.content">
  1365. <xsl:call-template name="dedication.titlepage.before.verso"/>
  1366. <xsl:call-template name="dedication.titlepage.verso"/>
  1367. </xsl:variable>
  1368. <xsl:variable name="verso.elements.count">
  1369. <xsl:choose>
  1370. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1371. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1372. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1373. <xsl:otherwise>1</xsl:otherwise>
  1374. </xsl:choose>
  1375. </xsl:variable>
  1376. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1377. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1378. </xsl:if>
  1379. <xsl:call-template name="dedication.titlepage.separator"/>
  1380. </fo:block>
  1381. </xsl:template>
  1382. <xsl:template match="*" mode="dedication.titlepage.recto.mode">
  1383. <!-- if an element isn't found in this mode, -->
  1384. <!-- try the generic titlepage.mode -->
  1385. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1386. </xsl:template>
  1387. <xsl:template match="*" mode="dedication.titlepage.verso.mode">
  1388. <!-- if an element isn't found in this mode, -->
  1389. <!-- try the generic titlepage.mode -->
  1390. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1391. </xsl:template>
  1392. <xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
  1393. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="dedication.titlepage.recto.style" font-family="{$title.fontset}">
  1394. <xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
  1395. </fo:block>
  1396. </xsl:template>
  1397. <xsl:template name="acknowledgements.titlepage.recto">
  1398. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1399. <xsl:call-template name="component.title">
  1400. <xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
  1401. </xsl:call-template></fo:block>
  1402. <xsl:choose>
  1403. <xsl:when test="acknowledgementsinfo/subtitle">
  1404. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
  1405. </xsl:when>
  1406. <xsl:when test="docinfo/subtitle">
  1407. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1408. </xsl:when>
  1409. <xsl:when test="info/subtitle">
  1410. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
  1411. </xsl:when>
  1412. <xsl:when test="subtitle">
  1413. <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
  1414. </xsl:when>
  1415. </xsl:choose>
  1416. </xsl:template>
  1417. <xsl:template name="acknowledgements.titlepage.verso">
  1418. </xsl:template>
  1419. <xsl:template name="acknowledgements.titlepage.separator">
  1420. </xsl:template>
  1421. <xsl:template name="acknowledgements.titlepage.before.recto">
  1422. </xsl:template>
  1423. <xsl:template name="acknowledgements.titlepage.before.verso">
  1424. </xsl:template>
  1425. <xsl:template name="acknowledgements.titlepage">
  1426. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1427. <xsl:variable name="recto.content">
  1428. <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
  1429. <xsl:call-template name="acknowledgements.titlepage.recto"/>
  1430. </xsl:variable>
  1431. <xsl:variable name="recto.elements.count">
  1432. <xsl:choose>
  1433. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1434. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1435. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1436. <xsl:otherwise>1</xsl:otherwise>
  1437. </xsl:choose>
  1438. </xsl:variable>
  1439. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1440. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1441. </xsl:if>
  1442. <xsl:variable name="verso.content">
  1443. <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
  1444. <xsl:call-template name="acknowledgements.titlepage.verso"/>
  1445. </xsl:variable>
  1446. <xsl:variable name="verso.elements.count">
  1447. <xsl:choose>
  1448. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1449. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1450. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1451. <xsl:otherwise>1</xsl:otherwise>
  1452. </xsl:choose>
  1453. </xsl:variable>
  1454. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1455. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1456. </xsl:if>
  1457. <xsl:call-template name="acknowledgements.titlepage.separator"/>
  1458. </fo:block>
  1459. </xsl:template>
  1460. <xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
  1461. <!-- if an element isn't found in this mode, -->
  1462. <!-- try the generic titlepage.mode -->
  1463. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1464. </xsl:template>
  1465. <xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
  1466. <!-- if an element isn't found in this mode, -->
  1467. <!-- try the generic titlepage.mode -->
  1468. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1469. </xsl:template>
  1470. <xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
  1471. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="acknowledgements.titlepage.recto.style" font-family="{$title.fontset}">
  1472. <xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
  1473. </fo:block>
  1474. </xsl:template>
  1475. <xsl:template name="preface.titlepage.recto">
  1476. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  1477. <xsl:call-template name="component.title">
  1478. <xsl:with-param name="node" select="ancestor-or-self::preface[1]"/>
  1479. </xsl:call-template></fo:block>
  1480. <xsl:choose>
  1481. <xsl:when test="prefaceinfo/subtitle">
  1482. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
  1483. </xsl:when>
  1484. <xsl:when test="docinfo/subtitle">
  1485. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1486. </xsl:when>
  1487. <xsl:when test="info/subtitle">
  1488. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
  1489. </xsl:when>
  1490. <xsl:when test="subtitle">
  1491. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
  1492. </xsl:when>
  1493. </xsl:choose>
  1494. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
  1495. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1496. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1497. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
  1498. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1499. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1500. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
  1501. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
  1502. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
  1503. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
  1504. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1505. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
  1506. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
  1507. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1508. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1509. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
  1510. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1511. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
  1512. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
  1513. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1514. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1515. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
  1516. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1517. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
  1518. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
  1519. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1520. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
  1521. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
  1522. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1523. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
  1524. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
  1525. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1526. <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
  1527. </xsl:template>
  1528. <xsl:template name="preface.titlepage.verso">
  1529. </xsl:template>
  1530. <xsl:template name="preface.titlepage.separator">
  1531. </xsl:template>
  1532. <xsl:template name="preface.titlepage.before.recto">
  1533. </xsl:template>
  1534. <xsl:template name="preface.titlepage.before.verso">
  1535. </xsl:template>
  1536. <xsl:template name="preface.titlepage">
  1537. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1538. <xsl:variable name="recto.content">
  1539. <xsl:call-template name="preface.titlepage.before.recto"/>
  1540. <xsl:call-template name="preface.titlepage.recto"/>
  1541. </xsl:variable>
  1542. <xsl:variable name="recto.elements.count">
  1543. <xsl:choose>
  1544. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1545. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1546. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1547. <xsl:otherwise>1</xsl:otherwise>
  1548. </xsl:choose>
  1549. </xsl:variable>
  1550. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1551. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1552. </xsl:if>
  1553. <xsl:variable name="verso.content">
  1554. <xsl:call-template name="preface.titlepage.before.verso"/>
  1555. <xsl:call-template name="preface.titlepage.verso"/>
  1556. </xsl:variable>
  1557. <xsl:variable name="verso.elements.count">
  1558. <xsl:choose>
  1559. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1560. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1561. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1562. <xsl:otherwise>1</xsl:otherwise>
  1563. </xsl:choose>
  1564. </xsl:variable>
  1565. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1566. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1567. </xsl:if>
  1568. <xsl:call-template name="preface.titlepage.separator"/>
  1569. </fo:block>
  1570. </xsl:template>
  1571. <xsl:template match="*" mode="preface.titlepage.recto.mode">
  1572. <!-- if an element isn't found in this mode, -->
  1573. <!-- try the generic titlepage.mode -->
  1574. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1575. </xsl:template>
  1576. <xsl:template match="*" mode="preface.titlepage.verso.mode">
  1577. <!-- if an element isn't found in this mode, -->
  1578. <!-- try the generic titlepage.mode -->
  1579. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1580. </xsl:template>
  1581. <xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
  1582. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style" font-family="{$title.fontset}">
  1583. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1584. </fo:block>
  1585. </xsl:template>
  1586. <xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
  1587. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1588. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1589. </fo:block>
  1590. </xsl:template>
  1591. <xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
  1592. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1593. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1594. </fo:block>
  1595. </xsl:template>
  1596. <xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
  1597. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1598. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1599. </fo:block>
  1600. </xsl:template>
  1601. <xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
  1602. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1603. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1604. </fo:block>
  1605. </xsl:template>
  1606. <xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
  1607. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1608. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1609. </fo:block>
  1610. </xsl:template>
  1611. <xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
  1612. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1613. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1614. </fo:block>
  1615. </xsl:template>
  1616. <xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
  1617. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1618. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1619. </fo:block>
  1620. </xsl:template>
  1621. <xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
  1622. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1623. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1624. </fo:block>
  1625. </xsl:template>
  1626. <xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
  1627. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1628. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1629. </fo:block>
  1630. </xsl:template>
  1631. <xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
  1632. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1633. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1634. </fo:block>
  1635. </xsl:template>
  1636. <xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
  1637. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="preface.titlepage.recto.style">
  1638. <xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
  1639. </fo:block>
  1640. </xsl:template>
  1641. <xsl:template name="chapter.titlepage.recto">
  1642. <xsl:choose>
  1643. <xsl:when test="chapterinfo/title">
  1644. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
  1645. </xsl:when>
  1646. <xsl:when test="docinfo/title">
  1647. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
  1648. </xsl:when>
  1649. <xsl:when test="info/title">
  1650. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
  1651. </xsl:when>
  1652. <xsl:when test="title">
  1653. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
  1654. </xsl:when>
  1655. </xsl:choose>
  1656. <xsl:choose>
  1657. <xsl:when test="chapterinfo/subtitle">
  1658. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
  1659. </xsl:when>
  1660. <xsl:when test="docinfo/subtitle">
  1661. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1662. </xsl:when>
  1663. <xsl:when test="info/subtitle">
  1664. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
  1665. </xsl:when>
  1666. <xsl:when test="subtitle">
  1667. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
  1668. </xsl:when>
  1669. </xsl:choose>
  1670. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
  1671. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1672. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1673. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
  1674. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1675. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1676. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
  1677. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
  1678. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
  1679. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
  1680. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1681. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
  1682. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
  1683. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1684. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1685. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
  1686. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1687. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
  1688. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
  1689. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1690. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1691. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
  1692. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1693. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
  1694. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
  1695. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1696. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
  1697. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
  1698. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1699. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
  1700. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
  1701. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1702. <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
  1703. </xsl:template>
  1704. <xsl:template name="chapter.titlepage.verso">
  1705. </xsl:template>
  1706. <xsl:template name="chapter.titlepage.separator">
  1707. </xsl:template>
  1708. <xsl:template name="chapter.titlepage.before.recto">
  1709. </xsl:template>
  1710. <xsl:template name="chapter.titlepage.before.verso">
  1711. </xsl:template>
  1712. <xsl:template name="chapter.titlepage">
  1713. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  1714. <xsl:variable name="recto.content">
  1715. <xsl:call-template name="chapter.titlepage.before.recto"/>
  1716. <xsl:call-template name="chapter.titlepage.recto"/>
  1717. </xsl:variable>
  1718. <xsl:variable name="recto.elements.count">
  1719. <xsl:choose>
  1720. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1721. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1722. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1723. <xsl:otherwise>1</xsl:otherwise>
  1724. </xsl:choose>
  1725. </xsl:variable>
  1726. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1727. <fo:block margin-left="{$title.margin.left}"><xsl:copy-of select="$recto.content"/></fo:block>
  1728. </xsl:if>
  1729. <xsl:variable name="verso.content">
  1730. <xsl:call-template name="chapter.titlepage.before.verso"/>
  1731. <xsl:call-template name="chapter.titlepage.verso"/>
  1732. </xsl:variable>
  1733. <xsl:variable name="verso.elements.count">
  1734. <xsl:choose>
  1735. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1736. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1737. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1738. <xsl:otherwise>1</xsl:otherwise>
  1739. </xsl:choose>
  1740. </xsl:variable>
  1741. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1742. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1743. </xsl:if>
  1744. <xsl:call-template name="chapter.titlepage.separator"/>
  1745. </fo:block>
  1746. </xsl:template>
  1747. <xsl:template match="*" mode="chapter.titlepage.recto.mode">
  1748. <!-- if an element isn't found in this mode, -->
  1749. <!-- try the generic titlepage.mode -->
  1750. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1751. </xsl:template>
  1752. <xsl:template match="*" mode="chapter.titlepage.verso.mode">
  1753. <!-- if an element isn't found in this mode, -->
  1754. <!-- try the generic titlepage.mode -->
  1755. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1756. </xsl:template>
  1757. <xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
  1758. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" font-size="24.8832pt" font-weight="bold">
  1759. <xsl:call-template name="component.title">
  1760. <xsl:with-param name="node" select="ancestor-or-self::chapter[1]"/>
  1761. </xsl:call-template>
  1762. </fo:block>
  1763. </xsl:template>
  1764. <xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
  1765. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" font-style="italic" font-size="14.4pt" font-weight="bold">
  1766. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1767. </fo:block>
  1768. </xsl:template>
  1769. <xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
  1770. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1771. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1772. </fo:block>
  1773. </xsl:template>
  1774. <xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
  1775. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1776. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1777. </fo:block>
  1778. </xsl:template>
  1779. <xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
  1780. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style" space-before="0.5em" space-after="0.5em" font-size="14.4pt">
  1781. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1782. </fo:block>
  1783. </xsl:template>
  1784. <xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
  1785. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1786. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1787. </fo:block>
  1788. </xsl:template>
  1789. <xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
  1790. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1791. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1792. </fo:block>
  1793. </xsl:template>
  1794. <xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
  1795. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1796. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1797. </fo:block>
  1798. </xsl:template>
  1799. <xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
  1800. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1801. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1802. </fo:block>
  1803. </xsl:template>
  1804. <xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
  1805. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1806. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1807. </fo:block>
  1808. </xsl:template>
  1809. <xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
  1810. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1811. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1812. </fo:block>
  1813. </xsl:template>
  1814. <xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
  1815. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1816. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1817. </fo:block>
  1818. </xsl:template>
  1819. <xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
  1820. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="chapter.titlepage.recto.style">
  1821. <xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
  1822. </fo:block>
  1823. </xsl:template>
  1824. <xsl:template name="appendix.titlepage.recto">
  1825. <xsl:choose>
  1826. <xsl:when test="appendixinfo/title">
  1827. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
  1828. </xsl:when>
  1829. <xsl:when test="docinfo/title">
  1830. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
  1831. </xsl:when>
  1832. <xsl:when test="info/title">
  1833. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
  1834. </xsl:when>
  1835. <xsl:when test="title">
  1836. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
  1837. </xsl:when>
  1838. </xsl:choose>
  1839. <xsl:choose>
  1840. <xsl:when test="appendixinfo/subtitle">
  1841. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
  1842. </xsl:when>
  1843. <xsl:when test="docinfo/subtitle">
  1844. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  1845. </xsl:when>
  1846. <xsl:when test="info/subtitle">
  1847. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
  1848. </xsl:when>
  1849. <xsl:when test="subtitle">
  1850. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
  1851. </xsl:when>
  1852. </xsl:choose>
  1853. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
  1854. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  1855. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
  1856. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
  1857. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  1858. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
  1859. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
  1860. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
  1861. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
  1862. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
  1863. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  1864. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
  1865. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
  1866. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  1867. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  1868. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
  1869. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  1870. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
  1871. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
  1872. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  1873. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
  1874. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
  1875. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  1876. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
  1877. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
  1878. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
  1879. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
  1880. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
  1881. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  1882. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
  1883. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
  1884. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  1885. <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
  1886. </xsl:template>
  1887. <xsl:template name="appendix.titlepage.verso">
  1888. </xsl:template>
  1889. <xsl:template name="appendix.titlepage.separator">
  1890. </xsl:template>
  1891. <xsl:template name="appendix.titlepage.before.recto">
  1892. </xsl:template>
  1893. <xsl:template name="appendix.titlepage.before.verso">
  1894. </xsl:template>
  1895. <xsl:template name="appendix.titlepage">
  1896. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  1897. <xsl:variable name="recto.content">
  1898. <xsl:call-template name="appendix.titlepage.before.recto"/>
  1899. <xsl:call-template name="appendix.titlepage.recto"/>
  1900. </xsl:variable>
  1901. <xsl:variable name="recto.elements.count">
  1902. <xsl:choose>
  1903. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1904. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1905. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  1906. <xsl:otherwise>1</xsl:otherwise>
  1907. </xsl:choose>
  1908. </xsl:variable>
  1909. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  1910. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  1911. </xsl:if>
  1912. <xsl:variable name="verso.content">
  1913. <xsl:call-template name="appendix.titlepage.before.verso"/>
  1914. <xsl:call-template name="appendix.titlepage.verso"/>
  1915. </xsl:variable>
  1916. <xsl:variable name="verso.elements.count">
  1917. <xsl:choose>
  1918. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1919. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  1920. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  1921. <xsl:otherwise>1</xsl:otherwise>
  1922. </xsl:choose>
  1923. </xsl:variable>
  1924. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  1925. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  1926. </xsl:if>
  1927. <xsl:call-template name="appendix.titlepage.separator"/>
  1928. </fo:block>
  1929. </xsl:template>
  1930. <xsl:template match="*" mode="appendix.titlepage.recto.mode">
  1931. <!-- if an element isn't found in this mode, -->
  1932. <!-- try the generic titlepage.mode -->
  1933. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1934. </xsl:template>
  1935. <xsl:template match="*" mode="appendix.titlepage.verso.mode">
  1936. <!-- if an element isn't found in this mode, -->
  1937. <!-- try the generic titlepage.mode -->
  1938. <xsl:apply-templates select="." mode="titlepage.mode"/>
  1939. </xsl:template>
  1940. <xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
  1941. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-weight="bold" font-family="{$title.fontset}">
  1942. <xsl:call-template name="component.title">
  1943. <xsl:with-param name="node" select="ancestor-or-self::appendix[1]"/>
  1944. </xsl:call-template>
  1945. </fo:block>
  1946. </xsl:template>
  1947. <xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
  1948. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style" font-family="{$title.fontset}">
  1949. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1950. </fo:block>
  1951. </xsl:template>
  1952. <xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
  1953. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1954. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1955. </fo:block>
  1956. </xsl:template>
  1957. <xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
  1958. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1959. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1960. </fo:block>
  1961. </xsl:template>
  1962. <xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
  1963. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1964. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1965. </fo:block>
  1966. </xsl:template>
  1967. <xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
  1968. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1969. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1970. </fo:block>
  1971. </xsl:template>
  1972. <xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
  1973. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1974. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1975. </fo:block>
  1976. </xsl:template>
  1977. <xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
  1978. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1979. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1980. </fo:block>
  1981. </xsl:template>
  1982. <xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
  1983. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1984. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1985. </fo:block>
  1986. </xsl:template>
  1987. <xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
  1988. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1989. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1990. </fo:block>
  1991. </xsl:template>
  1992. <xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
  1993. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1994. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  1995. </fo:block>
  1996. </xsl:template>
  1997. <xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
  1998. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  1999. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2000. </fo:block>
  2001. </xsl:template>
  2002. <xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
  2003. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="appendix.titlepage.recto.style">
  2004. <xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
  2005. </fo:block>
  2006. </xsl:template>
  2007. <xsl:template name="section.titlepage.recto">
  2008. <xsl:choose>
  2009. <xsl:when test="sectioninfo/title">
  2010. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
  2011. </xsl:when>
  2012. <xsl:when test="info/title">
  2013. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
  2014. </xsl:when>
  2015. <xsl:when test="title">
  2016. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
  2017. </xsl:when>
  2018. </xsl:choose>
  2019. <xsl:choose>
  2020. <xsl:when test="sectioninfo/subtitle">
  2021. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
  2022. </xsl:when>
  2023. <xsl:when test="info/subtitle">
  2024. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
  2025. </xsl:when>
  2026. <xsl:when test="subtitle">
  2027. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
  2028. </xsl:when>
  2029. </xsl:choose>
  2030. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
  2031. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2032. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
  2033. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2034. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
  2035. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
  2036. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
  2037. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
  2038. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
  2039. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2040. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
  2041. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
  2042. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
  2043. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2044. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
  2045. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
  2046. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
  2047. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
  2048. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
  2049. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
  2050. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
  2051. <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
  2052. </xsl:template>
  2053. <xsl:template name="section.titlepage.verso">
  2054. </xsl:template>
  2055. <xsl:template name="section.titlepage.separator">
  2056. </xsl:template>
  2057. <xsl:template name="section.titlepage.before.recto">
  2058. </xsl:template>
  2059. <xsl:template name="section.titlepage.before.verso">
  2060. </xsl:template>
  2061. <xsl:template name="section.titlepage">
  2062. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2063. <xsl:variable name="recto.content">
  2064. <xsl:call-template name="section.titlepage.before.recto"/>
  2065. <xsl:call-template name="section.titlepage.recto"/>
  2066. </xsl:variable>
  2067. <xsl:variable name="recto.elements.count">
  2068. <xsl:choose>
  2069. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2070. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2071. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2072. <xsl:otherwise>1</xsl:otherwise>
  2073. </xsl:choose>
  2074. </xsl:variable>
  2075. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2076. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2077. </xsl:if>
  2078. <xsl:variable name="verso.content">
  2079. <xsl:call-template name="section.titlepage.before.verso"/>
  2080. <xsl:call-template name="section.titlepage.verso"/>
  2081. </xsl:variable>
  2082. <xsl:variable name="verso.elements.count">
  2083. <xsl:choose>
  2084. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2085. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2086. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2087. <xsl:otherwise>1</xsl:otherwise>
  2088. </xsl:choose>
  2089. </xsl:variable>
  2090. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2091. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2092. </xsl:if>
  2093. <xsl:call-template name="section.titlepage.separator"/>
  2094. </fo:block>
  2095. </xsl:template>
  2096. <xsl:template match="*" mode="section.titlepage.recto.mode">
  2097. <!-- if an element isn't found in this mode, -->
  2098. <!-- try the generic titlepage.mode -->
  2099. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2100. </xsl:template>
  2101. <xsl:template match="*" mode="section.titlepage.verso.mode">
  2102. <!-- if an element isn't found in this mode, -->
  2103. <!-- try the generic titlepage.mode -->
  2104. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2105. </xsl:template>
  2106. <xsl:template match="title" mode="section.titlepage.recto.auto.mode">
  2107. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2108. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2109. </fo:block>
  2110. </xsl:template>
  2111. <xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
  2112. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style" font-family="{$title.fontset}">
  2113. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2114. </fo:block>
  2115. </xsl:template>
  2116. <xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
  2117. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2118. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2119. </fo:block>
  2120. </xsl:template>
  2121. <xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
  2122. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2123. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2124. </fo:block>
  2125. </xsl:template>
  2126. <xsl:template match="author" mode="section.titlepage.recto.auto.mode">
  2127. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2128. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2129. </fo:block>
  2130. </xsl:template>
  2131. <xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
  2132. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2133. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2134. </fo:block>
  2135. </xsl:template>
  2136. <xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
  2137. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2138. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2139. </fo:block>
  2140. </xsl:template>
  2141. <xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
  2142. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2143. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2144. </fo:block>
  2145. </xsl:template>
  2146. <xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
  2147. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2148. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2149. </fo:block>
  2150. </xsl:template>
  2151. <xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
  2152. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2153. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2154. </fo:block>
  2155. </xsl:template>
  2156. <xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
  2157. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2158. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2159. </fo:block>
  2160. </xsl:template>
  2161. <xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
  2162. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2163. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2164. </fo:block>
  2165. </xsl:template>
  2166. <xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
  2167. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="section.titlepage.recto.style">
  2168. <xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
  2169. </fo:block>
  2170. </xsl:template>
  2171. <xsl:template name="sect1.titlepage.recto">
  2172. <xsl:choose>
  2173. <xsl:when test="sect1info/title">
  2174. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
  2175. </xsl:when>
  2176. <xsl:when test="info/title">
  2177. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
  2178. </xsl:when>
  2179. <xsl:when test="title">
  2180. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
  2181. </xsl:when>
  2182. </xsl:choose>
  2183. <xsl:choose>
  2184. <xsl:when test="sect1info/subtitle">
  2185. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
  2186. </xsl:when>
  2187. <xsl:when test="info/subtitle">
  2188. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
  2189. </xsl:when>
  2190. <xsl:when test="subtitle">
  2191. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
  2192. </xsl:when>
  2193. </xsl:choose>
  2194. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
  2195. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2196. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
  2197. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2198. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
  2199. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
  2200. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
  2201. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
  2202. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
  2203. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2204. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
  2205. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
  2206. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
  2207. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2208. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
  2209. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
  2210. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
  2211. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
  2212. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
  2213. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
  2214. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
  2215. <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
  2216. </xsl:template>
  2217. <xsl:template name="sect1.titlepage.verso">
  2218. </xsl:template>
  2219. <xsl:template name="sect1.titlepage.separator">
  2220. </xsl:template>
  2221. <xsl:template name="sect1.titlepage.before.recto">
  2222. </xsl:template>
  2223. <xsl:template name="sect1.titlepage.before.verso">
  2224. </xsl:template>
  2225. <xsl:template name="sect1.titlepage">
  2226. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2227. <xsl:variable name="recto.content">
  2228. <xsl:call-template name="sect1.titlepage.before.recto"/>
  2229. <xsl:call-template name="sect1.titlepage.recto"/>
  2230. </xsl:variable>
  2231. <xsl:variable name="recto.elements.count">
  2232. <xsl:choose>
  2233. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2234. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2235. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2236. <xsl:otherwise>1</xsl:otherwise>
  2237. </xsl:choose>
  2238. </xsl:variable>
  2239. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2240. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2241. </xsl:if>
  2242. <xsl:variable name="verso.content">
  2243. <xsl:call-template name="sect1.titlepage.before.verso"/>
  2244. <xsl:call-template name="sect1.titlepage.verso"/>
  2245. </xsl:variable>
  2246. <xsl:variable name="verso.elements.count">
  2247. <xsl:choose>
  2248. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2249. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2250. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2251. <xsl:otherwise>1</xsl:otherwise>
  2252. </xsl:choose>
  2253. </xsl:variable>
  2254. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2255. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2256. </xsl:if>
  2257. <xsl:call-template name="sect1.titlepage.separator"/>
  2258. </fo:block>
  2259. </xsl:template>
  2260. <xsl:template match="*" mode="sect1.titlepage.recto.mode">
  2261. <!-- if an element isn't found in this mode, -->
  2262. <!-- try the generic titlepage.mode -->
  2263. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2264. </xsl:template>
  2265. <xsl:template match="*" mode="sect1.titlepage.verso.mode">
  2266. <!-- if an element isn't found in this mode, -->
  2267. <!-- try the generic titlepage.mode -->
  2268. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2269. </xsl:template>
  2270. <xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
  2271. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2272. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2273. </fo:block>
  2274. </xsl:template>
  2275. <xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
  2276. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style" font-family="{$title.fontset}">
  2277. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2278. </fo:block>
  2279. </xsl:template>
  2280. <xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
  2281. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2282. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2283. </fo:block>
  2284. </xsl:template>
  2285. <xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
  2286. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2287. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2288. </fo:block>
  2289. </xsl:template>
  2290. <xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
  2291. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2292. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2293. </fo:block>
  2294. </xsl:template>
  2295. <xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
  2296. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2297. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2298. </fo:block>
  2299. </xsl:template>
  2300. <xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
  2301. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2302. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2303. </fo:block>
  2304. </xsl:template>
  2305. <xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
  2306. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2307. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2308. </fo:block>
  2309. </xsl:template>
  2310. <xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
  2311. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2312. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2313. </fo:block>
  2314. </xsl:template>
  2315. <xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
  2316. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2317. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2318. </fo:block>
  2319. </xsl:template>
  2320. <xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
  2321. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2322. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2323. </fo:block>
  2324. </xsl:template>
  2325. <xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
  2326. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2327. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2328. </fo:block>
  2329. </xsl:template>
  2330. <xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
  2331. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect1.titlepage.recto.style">
  2332. <xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
  2333. </fo:block>
  2334. </xsl:template>
  2335. <xsl:template name="sect2.titlepage.recto">
  2336. <xsl:choose>
  2337. <xsl:when test="sect2info/title">
  2338. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
  2339. </xsl:when>
  2340. <xsl:when test="info/title">
  2341. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
  2342. </xsl:when>
  2343. <xsl:when test="title">
  2344. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
  2345. </xsl:when>
  2346. </xsl:choose>
  2347. <xsl:choose>
  2348. <xsl:when test="sect2info/subtitle">
  2349. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
  2350. </xsl:when>
  2351. <xsl:when test="info/subtitle">
  2352. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
  2353. </xsl:when>
  2354. <xsl:when test="subtitle">
  2355. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
  2356. </xsl:when>
  2357. </xsl:choose>
  2358. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
  2359. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2360. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
  2361. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2362. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
  2363. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
  2364. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
  2365. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
  2366. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
  2367. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2368. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
  2369. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
  2370. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
  2371. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2372. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
  2373. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
  2374. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
  2375. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
  2376. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
  2377. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
  2378. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
  2379. <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
  2380. </xsl:template>
  2381. <xsl:template name="sect2.titlepage.verso">
  2382. </xsl:template>
  2383. <xsl:template name="sect2.titlepage.separator">
  2384. </xsl:template>
  2385. <xsl:template name="sect2.titlepage.before.recto">
  2386. </xsl:template>
  2387. <xsl:template name="sect2.titlepage.before.verso">
  2388. </xsl:template>
  2389. <xsl:template name="sect2.titlepage">
  2390. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2391. <xsl:variable name="recto.content">
  2392. <xsl:call-template name="sect2.titlepage.before.recto"/>
  2393. <xsl:call-template name="sect2.titlepage.recto"/>
  2394. </xsl:variable>
  2395. <xsl:variable name="recto.elements.count">
  2396. <xsl:choose>
  2397. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2398. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2399. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2400. <xsl:otherwise>1</xsl:otherwise>
  2401. </xsl:choose>
  2402. </xsl:variable>
  2403. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2404. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2405. </xsl:if>
  2406. <xsl:variable name="verso.content">
  2407. <xsl:call-template name="sect2.titlepage.before.verso"/>
  2408. <xsl:call-template name="sect2.titlepage.verso"/>
  2409. </xsl:variable>
  2410. <xsl:variable name="verso.elements.count">
  2411. <xsl:choose>
  2412. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2413. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2414. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2415. <xsl:otherwise>1</xsl:otherwise>
  2416. </xsl:choose>
  2417. </xsl:variable>
  2418. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2419. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2420. </xsl:if>
  2421. <xsl:call-template name="sect2.titlepage.separator"/>
  2422. </fo:block>
  2423. </xsl:template>
  2424. <xsl:template match="*" mode="sect2.titlepage.recto.mode">
  2425. <!-- if an element isn't found in this mode, -->
  2426. <!-- try the generic titlepage.mode -->
  2427. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2428. </xsl:template>
  2429. <xsl:template match="*" mode="sect2.titlepage.verso.mode">
  2430. <!-- if an element isn't found in this mode, -->
  2431. <!-- try the generic titlepage.mode -->
  2432. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2433. </xsl:template>
  2434. <xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
  2435. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2436. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2437. </fo:block>
  2438. </xsl:template>
  2439. <xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
  2440. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style" font-family="{$title.fontset}">
  2441. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2442. </fo:block>
  2443. </xsl:template>
  2444. <xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
  2445. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2446. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2447. </fo:block>
  2448. </xsl:template>
  2449. <xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
  2450. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2451. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2452. </fo:block>
  2453. </xsl:template>
  2454. <xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
  2455. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2456. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2457. </fo:block>
  2458. </xsl:template>
  2459. <xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
  2460. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2461. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2462. </fo:block>
  2463. </xsl:template>
  2464. <xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
  2465. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2466. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2467. </fo:block>
  2468. </xsl:template>
  2469. <xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
  2470. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2471. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2472. </fo:block>
  2473. </xsl:template>
  2474. <xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
  2475. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2476. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2477. </fo:block>
  2478. </xsl:template>
  2479. <xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
  2480. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2481. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2482. </fo:block>
  2483. </xsl:template>
  2484. <xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
  2485. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2486. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2487. </fo:block>
  2488. </xsl:template>
  2489. <xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
  2490. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2491. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2492. </fo:block>
  2493. </xsl:template>
  2494. <xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
  2495. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect2.titlepage.recto.style">
  2496. <xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
  2497. </fo:block>
  2498. </xsl:template>
  2499. <xsl:template name="sect3.titlepage.recto">
  2500. <xsl:choose>
  2501. <xsl:when test="sect3info/title">
  2502. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
  2503. </xsl:when>
  2504. <xsl:when test="info/title">
  2505. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
  2506. </xsl:when>
  2507. <xsl:when test="title">
  2508. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
  2509. </xsl:when>
  2510. </xsl:choose>
  2511. <xsl:choose>
  2512. <xsl:when test="sect3info/subtitle">
  2513. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
  2514. </xsl:when>
  2515. <xsl:when test="info/subtitle">
  2516. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
  2517. </xsl:when>
  2518. <xsl:when test="subtitle">
  2519. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
  2520. </xsl:when>
  2521. </xsl:choose>
  2522. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
  2523. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2524. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
  2525. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2526. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
  2527. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
  2528. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
  2529. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
  2530. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
  2531. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2532. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
  2533. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
  2534. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
  2535. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2536. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
  2537. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
  2538. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
  2539. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
  2540. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
  2541. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
  2542. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
  2543. <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
  2544. </xsl:template>
  2545. <xsl:template name="sect3.titlepage.verso">
  2546. </xsl:template>
  2547. <xsl:template name="sect3.titlepage.separator">
  2548. </xsl:template>
  2549. <xsl:template name="sect3.titlepage.before.recto">
  2550. </xsl:template>
  2551. <xsl:template name="sect3.titlepage.before.verso">
  2552. </xsl:template>
  2553. <xsl:template name="sect3.titlepage">
  2554. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2555. <xsl:variable name="recto.content">
  2556. <xsl:call-template name="sect3.titlepage.before.recto"/>
  2557. <xsl:call-template name="sect3.titlepage.recto"/>
  2558. </xsl:variable>
  2559. <xsl:variable name="recto.elements.count">
  2560. <xsl:choose>
  2561. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2562. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2563. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2564. <xsl:otherwise>1</xsl:otherwise>
  2565. </xsl:choose>
  2566. </xsl:variable>
  2567. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2568. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2569. </xsl:if>
  2570. <xsl:variable name="verso.content">
  2571. <xsl:call-template name="sect3.titlepage.before.verso"/>
  2572. <xsl:call-template name="sect3.titlepage.verso"/>
  2573. </xsl:variable>
  2574. <xsl:variable name="verso.elements.count">
  2575. <xsl:choose>
  2576. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2577. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2578. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2579. <xsl:otherwise>1</xsl:otherwise>
  2580. </xsl:choose>
  2581. </xsl:variable>
  2582. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2583. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2584. </xsl:if>
  2585. <xsl:call-template name="sect3.titlepage.separator"/>
  2586. </fo:block>
  2587. </xsl:template>
  2588. <xsl:template match="*" mode="sect3.titlepage.recto.mode">
  2589. <!-- if an element isn't found in this mode, -->
  2590. <!-- try the generic titlepage.mode -->
  2591. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2592. </xsl:template>
  2593. <xsl:template match="*" mode="sect3.titlepage.verso.mode">
  2594. <!-- if an element isn't found in this mode, -->
  2595. <!-- try the generic titlepage.mode -->
  2596. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2597. </xsl:template>
  2598. <xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
  2599. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2600. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2601. </fo:block>
  2602. </xsl:template>
  2603. <xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
  2604. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style" font-family="{$title.fontset}">
  2605. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2606. </fo:block>
  2607. </xsl:template>
  2608. <xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
  2609. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2610. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2611. </fo:block>
  2612. </xsl:template>
  2613. <xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
  2614. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2615. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2616. </fo:block>
  2617. </xsl:template>
  2618. <xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
  2619. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2620. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2621. </fo:block>
  2622. </xsl:template>
  2623. <xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
  2624. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2625. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2626. </fo:block>
  2627. </xsl:template>
  2628. <xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
  2629. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2630. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2631. </fo:block>
  2632. </xsl:template>
  2633. <xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
  2634. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2635. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2636. </fo:block>
  2637. </xsl:template>
  2638. <xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
  2639. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2640. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2641. </fo:block>
  2642. </xsl:template>
  2643. <xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
  2644. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2645. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2646. </fo:block>
  2647. </xsl:template>
  2648. <xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
  2649. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2650. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2651. </fo:block>
  2652. </xsl:template>
  2653. <xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
  2654. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2655. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2656. </fo:block>
  2657. </xsl:template>
  2658. <xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
  2659. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect3.titlepage.recto.style">
  2660. <xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
  2661. </fo:block>
  2662. </xsl:template>
  2663. <xsl:template name="sect4.titlepage.recto">
  2664. <xsl:choose>
  2665. <xsl:when test="sect4info/title">
  2666. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
  2667. </xsl:when>
  2668. <xsl:when test="info/title">
  2669. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
  2670. </xsl:when>
  2671. <xsl:when test="title">
  2672. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
  2673. </xsl:when>
  2674. </xsl:choose>
  2675. <xsl:choose>
  2676. <xsl:when test="sect4info/subtitle">
  2677. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
  2678. </xsl:when>
  2679. <xsl:when test="info/subtitle">
  2680. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
  2681. </xsl:when>
  2682. <xsl:when test="subtitle">
  2683. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
  2684. </xsl:when>
  2685. </xsl:choose>
  2686. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
  2687. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2688. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
  2689. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2690. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
  2691. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
  2692. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
  2693. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
  2694. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
  2695. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2696. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
  2697. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
  2698. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
  2699. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2700. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
  2701. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
  2702. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
  2703. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
  2704. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
  2705. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
  2706. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
  2707. <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
  2708. </xsl:template>
  2709. <xsl:template name="sect4.titlepage.verso">
  2710. </xsl:template>
  2711. <xsl:template name="sect4.titlepage.separator">
  2712. </xsl:template>
  2713. <xsl:template name="sect4.titlepage.before.recto">
  2714. </xsl:template>
  2715. <xsl:template name="sect4.titlepage.before.verso">
  2716. </xsl:template>
  2717. <xsl:template name="sect4.titlepage">
  2718. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2719. <xsl:variable name="recto.content">
  2720. <xsl:call-template name="sect4.titlepage.before.recto"/>
  2721. <xsl:call-template name="sect4.titlepage.recto"/>
  2722. </xsl:variable>
  2723. <xsl:variable name="recto.elements.count">
  2724. <xsl:choose>
  2725. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2726. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2727. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2728. <xsl:otherwise>1</xsl:otherwise>
  2729. </xsl:choose>
  2730. </xsl:variable>
  2731. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2732. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2733. </xsl:if>
  2734. <xsl:variable name="verso.content">
  2735. <xsl:call-template name="sect4.titlepage.before.verso"/>
  2736. <xsl:call-template name="sect4.titlepage.verso"/>
  2737. </xsl:variable>
  2738. <xsl:variable name="verso.elements.count">
  2739. <xsl:choose>
  2740. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2741. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2742. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2743. <xsl:otherwise>1</xsl:otherwise>
  2744. </xsl:choose>
  2745. </xsl:variable>
  2746. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2747. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2748. </xsl:if>
  2749. <xsl:call-template name="sect4.titlepage.separator"/>
  2750. </fo:block>
  2751. </xsl:template>
  2752. <xsl:template match="*" mode="sect4.titlepage.recto.mode">
  2753. <!-- if an element isn't found in this mode, -->
  2754. <!-- try the generic titlepage.mode -->
  2755. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2756. </xsl:template>
  2757. <xsl:template match="*" mode="sect4.titlepage.verso.mode">
  2758. <!-- if an element isn't found in this mode, -->
  2759. <!-- try the generic titlepage.mode -->
  2760. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2761. </xsl:template>
  2762. <xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
  2763. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2764. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2765. </fo:block>
  2766. </xsl:template>
  2767. <xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
  2768. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style" font-family="{$title.fontset}">
  2769. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2770. </fo:block>
  2771. </xsl:template>
  2772. <xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
  2773. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2774. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2775. </fo:block>
  2776. </xsl:template>
  2777. <xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
  2778. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2779. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2780. </fo:block>
  2781. </xsl:template>
  2782. <xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
  2783. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2784. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2785. </fo:block>
  2786. </xsl:template>
  2787. <xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
  2788. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2789. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2790. </fo:block>
  2791. </xsl:template>
  2792. <xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
  2793. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2794. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2795. </fo:block>
  2796. </xsl:template>
  2797. <xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
  2798. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2799. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2800. </fo:block>
  2801. </xsl:template>
  2802. <xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
  2803. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2804. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2805. </fo:block>
  2806. </xsl:template>
  2807. <xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
  2808. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2809. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2810. </fo:block>
  2811. </xsl:template>
  2812. <xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
  2813. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2814. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2815. </fo:block>
  2816. </xsl:template>
  2817. <xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
  2818. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2819. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2820. </fo:block>
  2821. </xsl:template>
  2822. <xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
  2823. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect4.titlepage.recto.style">
  2824. <xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
  2825. </fo:block>
  2826. </xsl:template>
  2827. <xsl:template name="sect5.titlepage.recto">
  2828. <xsl:choose>
  2829. <xsl:when test="sect5info/title">
  2830. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
  2831. </xsl:when>
  2832. <xsl:when test="info/title">
  2833. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
  2834. </xsl:when>
  2835. <xsl:when test="title">
  2836. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
  2837. </xsl:when>
  2838. </xsl:choose>
  2839. <xsl:choose>
  2840. <xsl:when test="sect5info/subtitle">
  2841. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
  2842. </xsl:when>
  2843. <xsl:when test="info/subtitle">
  2844. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
  2845. </xsl:when>
  2846. <xsl:when test="subtitle">
  2847. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
  2848. </xsl:when>
  2849. </xsl:choose>
  2850. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
  2851. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
  2852. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
  2853. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
  2854. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
  2855. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
  2856. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
  2857. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
  2858. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
  2859. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  2860. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
  2861. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
  2862. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
  2863. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
  2864. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
  2865. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
  2866. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
  2867. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
  2868. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
  2869. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
  2870. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
  2871. <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
  2872. </xsl:template>
  2873. <xsl:template name="sect5.titlepage.verso">
  2874. </xsl:template>
  2875. <xsl:template name="sect5.titlepage.separator">
  2876. </xsl:template>
  2877. <xsl:template name="sect5.titlepage.before.recto">
  2878. </xsl:template>
  2879. <xsl:template name="sect5.titlepage.before.verso">
  2880. </xsl:template>
  2881. <xsl:template name="sect5.titlepage">
  2882. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  2883. <xsl:variable name="recto.content">
  2884. <xsl:call-template name="sect5.titlepage.before.recto"/>
  2885. <xsl:call-template name="sect5.titlepage.recto"/>
  2886. </xsl:variable>
  2887. <xsl:variable name="recto.elements.count">
  2888. <xsl:choose>
  2889. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2890. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2891. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  2892. <xsl:otherwise>1</xsl:otherwise>
  2893. </xsl:choose>
  2894. </xsl:variable>
  2895. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  2896. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  2897. </xsl:if>
  2898. <xsl:variable name="verso.content">
  2899. <xsl:call-template name="sect5.titlepage.before.verso"/>
  2900. <xsl:call-template name="sect5.titlepage.verso"/>
  2901. </xsl:variable>
  2902. <xsl:variable name="verso.elements.count">
  2903. <xsl:choose>
  2904. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2905. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  2906. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  2907. <xsl:otherwise>1</xsl:otherwise>
  2908. </xsl:choose>
  2909. </xsl:variable>
  2910. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  2911. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  2912. </xsl:if>
  2913. <xsl:call-template name="sect5.titlepage.separator"/>
  2914. </fo:block>
  2915. </xsl:template>
  2916. <xsl:template match="*" mode="sect5.titlepage.recto.mode">
  2917. <!-- if an element isn't found in this mode, -->
  2918. <!-- try the generic titlepage.mode -->
  2919. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2920. </xsl:template>
  2921. <xsl:template match="*" mode="sect5.titlepage.verso.mode">
  2922. <!-- if an element isn't found in this mode, -->
  2923. <!-- try the generic titlepage.mode -->
  2924. <xsl:apply-templates select="." mode="titlepage.mode"/>
  2925. </xsl:template>
  2926. <xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
  2927. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  2928. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2929. </fo:block>
  2930. </xsl:template>
  2931. <xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
  2932. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style" font-family="{$title.fontset}">
  2933. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2934. </fo:block>
  2935. </xsl:template>
  2936. <xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
  2937. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2938. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2939. </fo:block>
  2940. </xsl:template>
  2941. <xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
  2942. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2943. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2944. </fo:block>
  2945. </xsl:template>
  2946. <xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
  2947. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2948. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2949. </fo:block>
  2950. </xsl:template>
  2951. <xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
  2952. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2953. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2954. </fo:block>
  2955. </xsl:template>
  2956. <xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
  2957. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2958. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2959. </fo:block>
  2960. </xsl:template>
  2961. <xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
  2962. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2963. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2964. </fo:block>
  2965. </xsl:template>
  2966. <xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
  2967. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2968. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2969. </fo:block>
  2970. </xsl:template>
  2971. <xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
  2972. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2973. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2974. </fo:block>
  2975. </xsl:template>
  2976. <xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
  2977. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2978. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2979. </fo:block>
  2980. </xsl:template>
  2981. <xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
  2982. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2983. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2984. </fo:block>
  2985. </xsl:template>
  2986. <xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
  2987. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sect5.titlepage.recto.style">
  2988. <xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
  2989. </fo:block>
  2990. </xsl:template>
  2991. <xsl:template name="simplesect.titlepage.recto">
  2992. <xsl:choose>
  2993. <xsl:when test="simplesectinfo/title">
  2994. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
  2995. </xsl:when>
  2996. <xsl:when test="docinfo/title">
  2997. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
  2998. </xsl:when>
  2999. <xsl:when test="info/title">
  3000. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
  3001. </xsl:when>
  3002. <xsl:when test="title">
  3003. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
  3004. </xsl:when>
  3005. </xsl:choose>
  3006. <xsl:choose>
  3007. <xsl:when test="simplesectinfo/subtitle">
  3008. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
  3009. </xsl:when>
  3010. <xsl:when test="docinfo/subtitle">
  3011. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3012. </xsl:when>
  3013. <xsl:when test="info/subtitle">
  3014. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
  3015. </xsl:when>
  3016. <xsl:when test="subtitle">
  3017. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
  3018. </xsl:when>
  3019. </xsl:choose>
  3020. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
  3021. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
  3022. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
  3023. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
  3024. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
  3025. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3026. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
  3027. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
  3028. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
  3029. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
  3030. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
  3031. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
  3032. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
  3033. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
  3034. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3035. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
  3036. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
  3037. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
  3038. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
  3039. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
  3040. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3041. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
  3042. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
  3043. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
  3044. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
  3045. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
  3046. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
  3047. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
  3048. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
  3049. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
  3050. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
  3051. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
  3052. <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
  3053. </xsl:template>
  3054. <xsl:template name="simplesect.titlepage.verso">
  3055. </xsl:template>
  3056. <xsl:template name="simplesect.titlepage.separator">
  3057. </xsl:template>
  3058. <xsl:template name="simplesect.titlepage.before.recto">
  3059. </xsl:template>
  3060. <xsl:template name="simplesect.titlepage.before.verso">
  3061. </xsl:template>
  3062. <xsl:template name="simplesect.titlepage">
  3063. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3064. <xsl:variable name="recto.content">
  3065. <xsl:call-template name="simplesect.titlepage.before.recto"/>
  3066. <xsl:call-template name="simplesect.titlepage.recto"/>
  3067. </xsl:variable>
  3068. <xsl:variable name="recto.elements.count">
  3069. <xsl:choose>
  3070. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3071. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3072. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3073. <xsl:otherwise>1</xsl:otherwise>
  3074. </xsl:choose>
  3075. </xsl:variable>
  3076. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3077. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3078. </xsl:if>
  3079. <xsl:variable name="verso.content">
  3080. <xsl:call-template name="simplesect.titlepage.before.verso"/>
  3081. <xsl:call-template name="simplesect.titlepage.verso"/>
  3082. </xsl:variable>
  3083. <xsl:variable name="verso.elements.count">
  3084. <xsl:choose>
  3085. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3086. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3087. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3088. <xsl:otherwise>1</xsl:otherwise>
  3089. </xsl:choose>
  3090. </xsl:variable>
  3091. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3092. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3093. </xsl:if>
  3094. <xsl:call-template name="simplesect.titlepage.separator"/>
  3095. </fo:block>
  3096. </xsl:template>
  3097. <xsl:template match="*" mode="simplesect.titlepage.recto.mode">
  3098. <!-- if an element isn't found in this mode, -->
  3099. <!-- try the generic titlepage.mode -->
  3100. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3101. </xsl:template>
  3102. <xsl:template match="*" mode="simplesect.titlepage.verso.mode">
  3103. <!-- if an element isn't found in this mode, -->
  3104. <!-- try the generic titlepage.mode -->
  3105. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3106. </xsl:template>
  3107. <xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
  3108. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" margin-left="{$title.margin.left}" font-family="{$title.fontset}">
  3109. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3110. </fo:block>
  3111. </xsl:template>
  3112. <xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
  3113. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style" font-family="{$title.fontset}">
  3114. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3115. </fo:block>
  3116. </xsl:template>
  3117. <xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
  3118. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3119. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3120. </fo:block>
  3121. </xsl:template>
  3122. <xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
  3123. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3124. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3125. </fo:block>
  3126. </xsl:template>
  3127. <xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
  3128. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3129. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3130. </fo:block>
  3131. </xsl:template>
  3132. <xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
  3133. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3134. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3135. </fo:block>
  3136. </xsl:template>
  3137. <xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
  3138. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3139. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3140. </fo:block>
  3141. </xsl:template>
  3142. <xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
  3143. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3144. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3145. </fo:block>
  3146. </xsl:template>
  3147. <xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
  3148. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3149. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3150. </fo:block>
  3151. </xsl:template>
  3152. <xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
  3153. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3154. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3155. </fo:block>
  3156. </xsl:template>
  3157. <xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
  3158. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3159. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3160. </fo:block>
  3161. </xsl:template>
  3162. <xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
  3163. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3164. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3165. </fo:block>
  3166. </xsl:template>
  3167. <xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
  3168. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="simplesect.titlepage.recto.style">
  3169. <xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
  3170. </fo:block>
  3171. </xsl:template>
  3172. <xsl:template name="bibliography.titlepage.recto">
  3173. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3174. <xsl:call-template name="component.title">
  3175. <xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
  3176. </xsl:call-template></fo:block>
  3177. <xsl:choose>
  3178. <xsl:when test="bibliographyinfo/subtitle">
  3179. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
  3180. </xsl:when>
  3181. <xsl:when test="docinfo/subtitle">
  3182. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3183. </xsl:when>
  3184. <xsl:when test="info/subtitle">
  3185. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
  3186. </xsl:when>
  3187. <xsl:when test="subtitle">
  3188. <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
  3189. </xsl:when>
  3190. </xsl:choose>
  3191. </xsl:template>
  3192. <xsl:template name="bibliography.titlepage.verso">
  3193. </xsl:template>
  3194. <xsl:template name="bibliography.titlepage.separator">
  3195. </xsl:template>
  3196. <xsl:template name="bibliography.titlepage.before.recto">
  3197. </xsl:template>
  3198. <xsl:template name="bibliography.titlepage.before.verso">
  3199. </xsl:template>
  3200. <xsl:template name="bibliography.titlepage">
  3201. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3202. <xsl:variable name="recto.content">
  3203. <xsl:call-template name="bibliography.titlepage.before.recto"/>
  3204. <xsl:call-template name="bibliography.titlepage.recto"/>
  3205. </xsl:variable>
  3206. <xsl:variable name="recto.elements.count">
  3207. <xsl:choose>
  3208. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3209. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3210. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3211. <xsl:otherwise>1</xsl:otherwise>
  3212. </xsl:choose>
  3213. </xsl:variable>
  3214. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3215. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3216. </xsl:if>
  3217. <xsl:variable name="verso.content">
  3218. <xsl:call-template name="bibliography.titlepage.before.verso"/>
  3219. <xsl:call-template name="bibliography.titlepage.verso"/>
  3220. </xsl:variable>
  3221. <xsl:variable name="verso.elements.count">
  3222. <xsl:choose>
  3223. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3224. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3225. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3226. <xsl:otherwise>1</xsl:otherwise>
  3227. </xsl:choose>
  3228. </xsl:variable>
  3229. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3230. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3231. </xsl:if>
  3232. <xsl:call-template name="bibliography.titlepage.separator"/>
  3233. </fo:block>
  3234. </xsl:template>
  3235. <xsl:template match="*" mode="bibliography.titlepage.recto.mode">
  3236. <!-- if an element isn't found in this mode, -->
  3237. <!-- try the generic titlepage.mode -->
  3238. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3239. </xsl:template>
  3240. <xsl:template match="*" mode="bibliography.titlepage.verso.mode">
  3241. <!-- if an element isn't found in this mode, -->
  3242. <!-- try the generic titlepage.mode -->
  3243. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3244. </xsl:template>
  3245. <xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
  3246. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliography.titlepage.recto.style" font-family="{$title.fontset}">
  3247. <xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
  3248. </fo:block>
  3249. </xsl:template>
  3250. <xsl:template name="bibliodiv.titlepage.recto">
  3251. <xsl:choose>
  3252. <xsl:when test="bibliodivinfo/title">
  3253. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/title"/>
  3254. </xsl:when>
  3255. <xsl:when test="docinfo/title">
  3256. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3257. </xsl:when>
  3258. <xsl:when test="info/title">
  3259. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/title"/>
  3260. </xsl:when>
  3261. <xsl:when test="title">
  3262. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="title"/>
  3263. </xsl:when>
  3264. </xsl:choose>
  3265. <xsl:choose>
  3266. <xsl:when test="bibliodivinfo/subtitle">
  3267. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="bibliodivinfo/subtitle"/>
  3268. </xsl:when>
  3269. <xsl:when test="docinfo/subtitle">
  3270. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3271. </xsl:when>
  3272. <xsl:when test="info/subtitle">
  3273. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3274. </xsl:when>
  3275. <xsl:when test="subtitle">
  3276. <xsl:apply-templates mode="bibliodiv.titlepage.recto.auto.mode" select="subtitle"/>
  3277. </xsl:when>
  3278. </xsl:choose>
  3279. </xsl:template>
  3280. <xsl:template name="bibliodiv.titlepage.verso">
  3281. </xsl:template>
  3282. <xsl:template name="bibliodiv.titlepage.separator">
  3283. </xsl:template>
  3284. <xsl:template name="bibliodiv.titlepage.before.recto">
  3285. </xsl:template>
  3286. <xsl:template name="bibliodiv.titlepage.before.verso">
  3287. </xsl:template>
  3288. <xsl:template name="bibliodiv.titlepage">
  3289. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3290. <xsl:variable name="recto.content">
  3291. <xsl:call-template name="bibliodiv.titlepage.before.recto"/>
  3292. <xsl:call-template name="bibliodiv.titlepage.recto"/>
  3293. </xsl:variable>
  3294. <xsl:variable name="recto.elements.count">
  3295. <xsl:choose>
  3296. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3297. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3298. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3299. <xsl:otherwise>1</xsl:otherwise>
  3300. </xsl:choose>
  3301. </xsl:variable>
  3302. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3303. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3304. </xsl:if>
  3305. <xsl:variable name="verso.content">
  3306. <xsl:call-template name="bibliodiv.titlepage.before.verso"/>
  3307. <xsl:call-template name="bibliodiv.titlepage.verso"/>
  3308. </xsl:variable>
  3309. <xsl:variable name="verso.elements.count">
  3310. <xsl:choose>
  3311. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3312. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3313. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3314. <xsl:otherwise>1</xsl:otherwise>
  3315. </xsl:choose>
  3316. </xsl:variable>
  3317. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3318. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3319. </xsl:if>
  3320. <xsl:call-template name="bibliodiv.titlepage.separator"/>
  3321. </fo:block>
  3322. </xsl:template>
  3323. <xsl:template match="*" mode="bibliodiv.titlepage.recto.mode">
  3324. <!-- if an element isn't found in this mode, -->
  3325. <!-- try the generic titlepage.mode -->
  3326. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3327. </xsl:template>
  3328. <xsl:template match="*" mode="bibliodiv.titlepage.verso.mode">
  3329. <!-- if an element isn't found in this mode, -->
  3330. <!-- try the generic titlepage.mode -->
  3331. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3332. </xsl:template>
  3333. <xsl:template match="title" mode="bibliodiv.titlepage.recto.auto.mode">
  3334. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
  3335. <xsl:call-template name="component.title">
  3336. <xsl:with-param name="node" select="ancestor-or-self::bibliodiv[1]"/>
  3337. </xsl:call-template>
  3338. </fo:block>
  3339. </xsl:template>
  3340. <xsl:template match="subtitle" mode="bibliodiv.titlepage.recto.auto.mode">
  3341. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="bibliodiv.titlepage.recto.style" font-family="{$title.fontset}">
  3342. <xsl:apply-templates select="." mode="bibliodiv.titlepage.recto.mode"/>
  3343. </fo:block>
  3344. </xsl:template>
  3345. <xsl:template name="glossary.titlepage.recto">
  3346. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3347. <xsl:call-template name="component.title">
  3348. <xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
  3349. </xsl:call-template></fo:block>
  3350. <xsl:choose>
  3351. <xsl:when test="glossaryinfo/subtitle">
  3352. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
  3353. </xsl:when>
  3354. <xsl:when test="docinfo/subtitle">
  3355. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3356. </xsl:when>
  3357. <xsl:when test="info/subtitle">
  3358. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
  3359. </xsl:when>
  3360. <xsl:when test="subtitle">
  3361. <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
  3362. </xsl:when>
  3363. </xsl:choose>
  3364. </xsl:template>
  3365. <xsl:template name="glossary.titlepage.verso">
  3366. </xsl:template>
  3367. <xsl:template name="glossary.titlepage.separator">
  3368. </xsl:template>
  3369. <xsl:template name="glossary.titlepage.before.recto">
  3370. </xsl:template>
  3371. <xsl:template name="glossary.titlepage.before.verso">
  3372. </xsl:template>
  3373. <xsl:template name="glossary.titlepage">
  3374. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3375. <xsl:variable name="recto.content">
  3376. <xsl:call-template name="glossary.titlepage.before.recto"/>
  3377. <xsl:call-template name="glossary.titlepage.recto"/>
  3378. </xsl:variable>
  3379. <xsl:variable name="recto.elements.count">
  3380. <xsl:choose>
  3381. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3382. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3383. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3384. <xsl:otherwise>1</xsl:otherwise>
  3385. </xsl:choose>
  3386. </xsl:variable>
  3387. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3388. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3389. </xsl:if>
  3390. <xsl:variable name="verso.content">
  3391. <xsl:call-template name="glossary.titlepage.before.verso"/>
  3392. <xsl:call-template name="glossary.titlepage.verso"/>
  3393. </xsl:variable>
  3394. <xsl:variable name="verso.elements.count">
  3395. <xsl:choose>
  3396. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3397. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3398. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3399. <xsl:otherwise>1</xsl:otherwise>
  3400. </xsl:choose>
  3401. </xsl:variable>
  3402. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3403. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3404. </xsl:if>
  3405. <xsl:call-template name="glossary.titlepage.separator"/>
  3406. </fo:block>
  3407. </xsl:template>
  3408. <xsl:template match="*" mode="glossary.titlepage.recto.mode">
  3409. <!-- if an element isn't found in this mode, -->
  3410. <!-- try the generic titlepage.mode -->
  3411. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3412. </xsl:template>
  3413. <xsl:template match="*" mode="glossary.titlepage.verso.mode">
  3414. <!-- if an element isn't found in this mode, -->
  3415. <!-- try the generic titlepage.mode -->
  3416. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3417. </xsl:template>
  3418. <xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
  3419. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossary.titlepage.recto.style" font-family="{$title.fontset}">
  3420. <xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
  3421. </fo:block>
  3422. </xsl:template>
  3423. <xsl:template name="glossdiv.titlepage.recto">
  3424. <xsl:choose>
  3425. <xsl:when test="glossdivinfo/title">
  3426. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/title"/>
  3427. </xsl:when>
  3428. <xsl:when test="docinfo/title">
  3429. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/title"/>
  3430. </xsl:when>
  3431. <xsl:when test="info/title">
  3432. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/title"/>
  3433. </xsl:when>
  3434. <xsl:when test="title">
  3435. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="title"/>
  3436. </xsl:when>
  3437. </xsl:choose>
  3438. <xsl:choose>
  3439. <xsl:when test="glossdivinfo/subtitle">
  3440. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="glossdivinfo/subtitle"/>
  3441. </xsl:when>
  3442. <xsl:when test="docinfo/subtitle">
  3443. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3444. </xsl:when>
  3445. <xsl:when test="info/subtitle">
  3446. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3447. </xsl:when>
  3448. <xsl:when test="subtitle">
  3449. <xsl:apply-templates mode="glossdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3450. </xsl:when>
  3451. </xsl:choose>
  3452. </xsl:template>
  3453. <xsl:template name="glossdiv.titlepage.verso">
  3454. </xsl:template>
  3455. <xsl:template name="glossdiv.titlepage.separator">
  3456. </xsl:template>
  3457. <xsl:template name="glossdiv.titlepage.before.recto">
  3458. </xsl:template>
  3459. <xsl:template name="glossdiv.titlepage.before.verso">
  3460. </xsl:template>
  3461. <xsl:template name="glossdiv.titlepage">
  3462. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3463. <xsl:variable name="recto.content">
  3464. <xsl:call-template name="glossdiv.titlepage.before.recto"/>
  3465. <xsl:call-template name="glossdiv.titlepage.recto"/>
  3466. </xsl:variable>
  3467. <xsl:variable name="recto.elements.count">
  3468. <xsl:choose>
  3469. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3470. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3471. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3472. <xsl:otherwise>1</xsl:otherwise>
  3473. </xsl:choose>
  3474. </xsl:variable>
  3475. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3476. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3477. </xsl:if>
  3478. <xsl:variable name="verso.content">
  3479. <xsl:call-template name="glossdiv.titlepage.before.verso"/>
  3480. <xsl:call-template name="glossdiv.titlepage.verso"/>
  3481. </xsl:variable>
  3482. <xsl:variable name="verso.elements.count">
  3483. <xsl:choose>
  3484. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3485. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3486. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3487. <xsl:otherwise>1</xsl:otherwise>
  3488. </xsl:choose>
  3489. </xsl:variable>
  3490. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3491. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3492. </xsl:if>
  3493. <xsl:call-template name="glossdiv.titlepage.separator"/>
  3494. </fo:block>
  3495. </xsl:template>
  3496. <xsl:template match="*" mode="glossdiv.titlepage.recto.mode">
  3497. <!-- if an element isn't found in this mode, -->
  3498. <!-- try the generic titlepage.mode -->
  3499. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3500. </xsl:template>
  3501. <xsl:template match="*" mode="glossdiv.titlepage.verso.mode">
  3502. <!-- if an element isn't found in this mode, -->
  3503. <!-- try the generic titlepage.mode -->
  3504. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3505. </xsl:template>
  3506. <xsl:template match="title" mode="glossdiv.titlepage.recto.auto.mode">
  3507. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="20.736pt" font-family="{$title.fontset}" font-weight="bold">
  3508. <xsl:call-template name="component.title">
  3509. <xsl:with-param name="node" select="ancestor-or-self::glossdiv[1]"/>
  3510. </xsl:call-template>
  3511. </fo:block>
  3512. </xsl:template>
  3513. <xsl:template match="subtitle" mode="glossdiv.titlepage.recto.auto.mode">
  3514. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="glossdiv.titlepage.recto.style" font-family="{$title.fontset}">
  3515. <xsl:apply-templates select="." mode="glossdiv.titlepage.recto.mode"/>
  3516. </fo:block>
  3517. </xsl:template>
  3518. <xsl:template name="index.titlepage.recto">
  3519. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3520. <xsl:call-template name="component.title">
  3521. <xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
  3522. <xsl:with-param name="pagewide" select="1"/>
  3523. </xsl:call-template></fo:block>
  3524. <xsl:choose>
  3525. <xsl:when test="indexinfo/subtitle">
  3526. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
  3527. </xsl:when>
  3528. <xsl:when test="docinfo/subtitle">
  3529. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3530. </xsl:when>
  3531. <xsl:when test="info/subtitle">
  3532. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
  3533. </xsl:when>
  3534. <xsl:when test="subtitle">
  3535. <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
  3536. </xsl:when>
  3537. </xsl:choose>
  3538. </xsl:template>
  3539. <xsl:template name="index.titlepage.verso">
  3540. </xsl:template>
  3541. <xsl:template name="index.titlepage.separator">
  3542. </xsl:template>
  3543. <xsl:template name="index.titlepage.before.recto">
  3544. </xsl:template>
  3545. <xsl:template name="index.titlepage.before.verso">
  3546. </xsl:template>
  3547. <xsl:template name="index.titlepage">
  3548. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3549. <xsl:variable name="recto.content">
  3550. <xsl:call-template name="index.titlepage.before.recto"/>
  3551. <xsl:call-template name="index.titlepage.recto"/>
  3552. </xsl:variable>
  3553. <xsl:variable name="recto.elements.count">
  3554. <xsl:choose>
  3555. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3556. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3557. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3558. <xsl:otherwise>1</xsl:otherwise>
  3559. </xsl:choose>
  3560. </xsl:variable>
  3561. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3562. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3563. </xsl:if>
  3564. <xsl:variable name="verso.content">
  3565. <xsl:call-template name="index.titlepage.before.verso"/>
  3566. <xsl:call-template name="index.titlepage.verso"/>
  3567. </xsl:variable>
  3568. <xsl:variable name="verso.elements.count">
  3569. <xsl:choose>
  3570. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3571. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3572. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3573. <xsl:otherwise>1</xsl:otherwise>
  3574. </xsl:choose>
  3575. </xsl:variable>
  3576. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3577. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3578. </xsl:if>
  3579. <xsl:call-template name="index.titlepage.separator"/>
  3580. </fo:block>
  3581. </xsl:template>
  3582. <xsl:template match="*" mode="index.titlepage.recto.mode">
  3583. <!-- if an element isn't found in this mode, -->
  3584. <!-- try the generic titlepage.mode -->
  3585. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3586. </xsl:template>
  3587. <xsl:template match="*" mode="index.titlepage.verso.mode">
  3588. <!-- if an element isn't found in this mode, -->
  3589. <!-- try the generic titlepage.mode -->
  3590. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3591. </xsl:template>
  3592. <xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
  3593. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="index.titlepage.recto.style" font-family="{$title.fontset}">
  3594. <xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
  3595. </fo:block>
  3596. </xsl:template>
  3597. <xsl:template name="indexdiv.titlepage.recto">
  3598. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style">
  3599. <xsl:call-template name="indexdiv.title">
  3600. <xsl:with-param name="title" select="title"/>
  3601. </xsl:call-template></fo:block>
  3602. <xsl:choose>
  3603. <xsl:when test="indexdivinfo/subtitle">
  3604. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="indexdivinfo/subtitle"/>
  3605. </xsl:when>
  3606. <xsl:when test="docinfo/subtitle">
  3607. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3608. </xsl:when>
  3609. <xsl:when test="info/subtitle">
  3610. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="info/subtitle"/>
  3611. </xsl:when>
  3612. <xsl:when test="subtitle">
  3613. <xsl:apply-templates mode="indexdiv.titlepage.recto.auto.mode" select="subtitle"/>
  3614. </xsl:when>
  3615. </xsl:choose>
  3616. </xsl:template>
  3617. <xsl:template name="indexdiv.titlepage.verso">
  3618. </xsl:template>
  3619. <xsl:template name="indexdiv.titlepage.separator">
  3620. </xsl:template>
  3621. <xsl:template name="indexdiv.titlepage.before.recto">
  3622. </xsl:template>
  3623. <xsl:template name="indexdiv.titlepage.before.verso">
  3624. </xsl:template>
  3625. <xsl:template name="indexdiv.titlepage">
  3626. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3627. <xsl:variable name="recto.content">
  3628. <xsl:call-template name="indexdiv.titlepage.before.recto"/>
  3629. <xsl:call-template name="indexdiv.titlepage.recto"/>
  3630. </xsl:variable>
  3631. <xsl:variable name="recto.elements.count">
  3632. <xsl:choose>
  3633. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3634. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3635. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3636. <xsl:otherwise>1</xsl:otherwise>
  3637. </xsl:choose>
  3638. </xsl:variable>
  3639. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3640. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3641. </xsl:if>
  3642. <xsl:variable name="verso.content">
  3643. <xsl:call-template name="indexdiv.titlepage.before.verso"/>
  3644. <xsl:call-template name="indexdiv.titlepage.verso"/>
  3645. </xsl:variable>
  3646. <xsl:variable name="verso.elements.count">
  3647. <xsl:choose>
  3648. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3649. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3650. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3651. <xsl:otherwise>1</xsl:otherwise>
  3652. </xsl:choose>
  3653. </xsl:variable>
  3654. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3655. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3656. </xsl:if>
  3657. <xsl:call-template name="indexdiv.titlepage.separator"/>
  3658. </fo:block>
  3659. </xsl:template>
  3660. <xsl:template match="*" mode="indexdiv.titlepage.recto.mode">
  3661. <!-- if an element isn't found in this mode, -->
  3662. <!-- try the generic titlepage.mode -->
  3663. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3664. </xsl:template>
  3665. <xsl:template match="*" mode="indexdiv.titlepage.verso.mode">
  3666. <!-- if an element isn't found in this mode, -->
  3667. <!-- try the generic titlepage.mode -->
  3668. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3669. </xsl:template>
  3670. <xsl:template match="subtitle" mode="indexdiv.titlepage.recto.auto.mode">
  3671. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="indexdiv.titlepage.recto.style" font-family="{$title.fontset}">
  3672. <xsl:apply-templates select="." mode="indexdiv.titlepage.recto.mode"/>
  3673. </fo:block>
  3674. </xsl:template>
  3675. <xsl:template name="setindex.titlepage.recto">
  3676. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" margin-left="0pt" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3677. <xsl:call-template name="component.title">
  3678. <xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
  3679. <xsl:with-param name="pagewide" select="1"/>
  3680. </xsl:call-template></fo:block>
  3681. <xsl:choose>
  3682. <xsl:when test="setindexinfo/subtitle">
  3683. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
  3684. </xsl:when>
  3685. <xsl:when test="docinfo/subtitle">
  3686. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3687. </xsl:when>
  3688. <xsl:when test="info/subtitle">
  3689. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
  3690. </xsl:when>
  3691. <xsl:when test="subtitle">
  3692. <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
  3693. </xsl:when>
  3694. </xsl:choose>
  3695. </xsl:template>
  3696. <xsl:template name="setindex.titlepage.verso">
  3697. </xsl:template>
  3698. <xsl:template name="setindex.titlepage.separator">
  3699. </xsl:template>
  3700. <xsl:template name="setindex.titlepage.before.recto">
  3701. </xsl:template>
  3702. <xsl:template name="setindex.titlepage.before.verso">
  3703. </xsl:template>
  3704. <xsl:template name="setindex.titlepage">
  3705. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3706. <xsl:variable name="recto.content">
  3707. <xsl:call-template name="setindex.titlepage.before.recto"/>
  3708. <xsl:call-template name="setindex.titlepage.recto"/>
  3709. </xsl:variable>
  3710. <xsl:variable name="recto.elements.count">
  3711. <xsl:choose>
  3712. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3713. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3714. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3715. <xsl:otherwise>1</xsl:otherwise>
  3716. </xsl:choose>
  3717. </xsl:variable>
  3718. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3719. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3720. </xsl:if>
  3721. <xsl:variable name="verso.content">
  3722. <xsl:call-template name="setindex.titlepage.before.verso"/>
  3723. <xsl:call-template name="setindex.titlepage.verso"/>
  3724. </xsl:variable>
  3725. <xsl:variable name="verso.elements.count">
  3726. <xsl:choose>
  3727. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3728. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3729. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3730. <xsl:otherwise>1</xsl:otherwise>
  3731. </xsl:choose>
  3732. </xsl:variable>
  3733. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3734. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3735. </xsl:if>
  3736. <xsl:call-template name="setindex.titlepage.separator"/>
  3737. </fo:block>
  3738. </xsl:template>
  3739. <xsl:template match="*" mode="setindex.titlepage.recto.mode">
  3740. <!-- if an element isn't found in this mode, -->
  3741. <!-- try the generic titlepage.mode -->
  3742. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3743. </xsl:template>
  3744. <xsl:template match="*" mode="setindex.titlepage.verso.mode">
  3745. <!-- if an element isn't found in this mode, -->
  3746. <!-- try the generic titlepage.mode -->
  3747. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3748. </xsl:template>
  3749. <xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
  3750. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="setindex.titlepage.recto.style" font-family="{$title.fontset}">
  3751. <xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
  3752. </fo:block>
  3753. </xsl:template>
  3754. <xsl:template name="colophon.titlepage.recto">
  3755. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" margin-left="{$title.margin.left}" font-size="24.8832pt" font-family="{$title.fontset}" font-weight="bold">
  3756. <xsl:call-template name="component.title">
  3757. <xsl:with-param name="node" select="ancestor-or-self::colophon[1]"/>
  3758. </xsl:call-template></fo:block>
  3759. <xsl:choose>
  3760. <xsl:when test="colophoninfo/subtitle">
  3761. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="colophoninfo/subtitle"/>
  3762. </xsl:when>
  3763. <xsl:when test="docinfo/subtitle">
  3764. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3765. </xsl:when>
  3766. <xsl:when test="info/subtitle">
  3767. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="info/subtitle"/>
  3768. </xsl:when>
  3769. <xsl:when test="subtitle">
  3770. <xsl:apply-templates mode="colophon.titlepage.recto.auto.mode" select="subtitle"/>
  3771. </xsl:when>
  3772. </xsl:choose>
  3773. </xsl:template>
  3774. <xsl:template name="colophon.titlepage.verso">
  3775. </xsl:template>
  3776. <xsl:template name="colophon.titlepage.separator">
  3777. </xsl:template>
  3778. <xsl:template name="colophon.titlepage.before.recto">
  3779. </xsl:template>
  3780. <xsl:template name="colophon.titlepage.before.verso">
  3781. </xsl:template>
  3782. <xsl:template name="colophon.titlepage">
  3783. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3784. <xsl:variable name="recto.content">
  3785. <xsl:call-template name="colophon.titlepage.before.recto"/>
  3786. <xsl:call-template name="colophon.titlepage.recto"/>
  3787. </xsl:variable>
  3788. <xsl:variable name="recto.elements.count">
  3789. <xsl:choose>
  3790. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3791. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3792. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3793. <xsl:otherwise>1</xsl:otherwise>
  3794. </xsl:choose>
  3795. </xsl:variable>
  3796. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3797. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3798. </xsl:if>
  3799. <xsl:variable name="verso.content">
  3800. <xsl:call-template name="colophon.titlepage.before.verso"/>
  3801. <xsl:call-template name="colophon.titlepage.verso"/>
  3802. </xsl:variable>
  3803. <xsl:variable name="verso.elements.count">
  3804. <xsl:choose>
  3805. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3806. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3807. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3808. <xsl:otherwise>1</xsl:otherwise>
  3809. </xsl:choose>
  3810. </xsl:variable>
  3811. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3812. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3813. </xsl:if>
  3814. <xsl:call-template name="colophon.titlepage.separator"/>
  3815. </fo:block>
  3816. </xsl:template>
  3817. <xsl:template match="*" mode="colophon.titlepage.recto.mode">
  3818. <!-- if an element isn't found in this mode, -->
  3819. <!-- try the generic titlepage.mode -->
  3820. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3821. </xsl:template>
  3822. <xsl:template match="*" mode="colophon.titlepage.verso.mode">
  3823. <!-- if an element isn't found in this mode, -->
  3824. <!-- try the generic titlepage.mode -->
  3825. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3826. </xsl:template>
  3827. <xsl:template match="subtitle" mode="colophon.titlepage.recto.auto.mode">
  3828. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="colophon.titlepage.recto.style" font-family="{$title.fontset}">
  3829. <xsl:apply-templates select="." mode="colophon.titlepage.recto.mode"/>
  3830. </fo:block>
  3831. </xsl:template>
  3832. <xsl:template name="sidebar.titlepage.recto">
  3833. <xsl:choose>
  3834. <xsl:when test="sidebarinfo/title">
  3835. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
  3836. </xsl:when>
  3837. <xsl:when test="docinfo/title">
  3838. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
  3839. </xsl:when>
  3840. <xsl:when test="info/title">
  3841. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
  3842. </xsl:when>
  3843. <xsl:when test="title">
  3844. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
  3845. </xsl:when>
  3846. </xsl:choose>
  3847. <xsl:choose>
  3848. <xsl:when test="sidebarinfo/subtitle">
  3849. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
  3850. </xsl:when>
  3851. <xsl:when test="docinfo/subtitle">
  3852. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
  3853. </xsl:when>
  3854. <xsl:when test="info/subtitle">
  3855. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
  3856. </xsl:when>
  3857. <xsl:when test="subtitle">
  3858. <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
  3859. </xsl:when>
  3860. </xsl:choose>
  3861. </xsl:template>
  3862. <xsl:template name="sidebar.titlepage.verso">
  3863. </xsl:template>
  3864. <xsl:template name="sidebar.titlepage.separator">
  3865. </xsl:template>
  3866. <xsl:template name="sidebar.titlepage.before.recto">
  3867. </xsl:template>
  3868. <xsl:template name="sidebar.titlepage.before.verso">
  3869. </xsl:template>
  3870. <xsl:template name="sidebar.titlepage">
  3871. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  3872. <xsl:variable name="recto.content">
  3873. <xsl:call-template name="sidebar.titlepage.before.recto"/>
  3874. <xsl:call-template name="sidebar.titlepage.recto"/>
  3875. </xsl:variable>
  3876. <xsl:variable name="recto.elements.count">
  3877. <xsl:choose>
  3878. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3879. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3880. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  3881. <xsl:otherwise>1</xsl:otherwise>
  3882. </xsl:choose>
  3883. </xsl:variable>
  3884. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  3885. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  3886. </xsl:if>
  3887. <xsl:variable name="verso.content">
  3888. <xsl:call-template name="sidebar.titlepage.before.verso"/>
  3889. <xsl:call-template name="sidebar.titlepage.verso"/>
  3890. </xsl:variable>
  3891. <xsl:variable name="verso.elements.count">
  3892. <xsl:choose>
  3893. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3894. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  3895. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  3896. <xsl:otherwise>1</xsl:otherwise>
  3897. </xsl:choose>
  3898. </xsl:variable>
  3899. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  3900. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  3901. </xsl:if>
  3902. <xsl:call-template name="sidebar.titlepage.separator"/>
  3903. </fo:block>
  3904. </xsl:template>
  3905. <xsl:template match="*" mode="sidebar.titlepage.recto.mode">
  3906. <!-- if an element isn't found in this mode, -->
  3907. <!-- try the generic titlepage.mode -->
  3908. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3909. </xsl:template>
  3910. <xsl:template match="*" mode="sidebar.titlepage.verso.mode">
  3911. <!-- if an element isn't found in this mode, -->
  3912. <!-- try the generic titlepage.mode -->
  3913. <xsl:apply-templates select="." mode="titlepage.mode"/>
  3914. </xsl:template>
  3915. <xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
  3916. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}" font-weight="bold">
  3917. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  3918. </fo:block>
  3919. </xsl:template>
  3920. <xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
  3921. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="sidebar.titlepage.recto.style" font-family="{$title.fontset}">
  3922. <xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
  3923. </fo:block>
  3924. </xsl:template>
  3925. <xsl:template name="qandaset.titlepage.recto">
  3926. <xsl:choose>
  3927. <xsl:when test="qandasetinfo/title">
  3928. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/title"/>
  3929. </xsl:when>
  3930. <xsl:when test="blockinfo/title">
  3931. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/title"/>
  3932. </xsl:when>
  3933. <xsl:when test="info/title">
  3934. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/title"/>
  3935. </xsl:when>
  3936. <xsl:when test="title">
  3937. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="title"/>
  3938. </xsl:when>
  3939. </xsl:choose>
  3940. <xsl:choose>
  3941. <xsl:when test="qandasetinfo/subtitle">
  3942. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/subtitle"/>
  3943. </xsl:when>
  3944. <xsl:when test="blockinfo/subtitle">
  3945. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/subtitle"/>
  3946. </xsl:when>
  3947. <xsl:when test="info/subtitle">
  3948. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/subtitle"/>
  3949. </xsl:when>
  3950. <xsl:when test="subtitle">
  3951. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="subtitle"/>
  3952. </xsl:when>
  3953. </xsl:choose>
  3954. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/corpauthor"/>
  3955. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/corpauthor"/>
  3956. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/corpauthor"/>
  3957. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/authorgroup"/>
  3958. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/authorgroup"/>
  3959. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/authorgroup"/>
  3960. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/author"/>
  3961. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/author"/>
  3962. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/author"/>
  3963. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/othercredit"/>
  3964. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/othercredit"/>
  3965. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/othercredit"/>
  3966. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/releaseinfo"/>
  3967. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/releaseinfo"/>
  3968. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/releaseinfo"/>
  3969. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/copyright"/>
  3970. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/copyright"/>
  3971. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/copyright"/>
  3972. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/legalnotice"/>
  3973. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/legalnotice"/>
  3974. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/legalnotice"/>
  3975. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/pubdate"/>
  3976. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/pubdate"/>
  3977. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/pubdate"/>
  3978. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revision"/>
  3979. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revision"/>
  3980. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revision"/>
  3981. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/revhistory"/>
  3982. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/revhistory"/>
  3983. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/revhistory"/>
  3984. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="qandasetinfo/abstract"/>
  3985. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="blockinfo/abstract"/>
  3986. <xsl:apply-templates mode="qandaset.titlepage.recto.auto.mode" select="info/abstract"/>
  3987. </xsl:template>
  3988. <xsl:template name="qandaset.titlepage.verso">
  3989. </xsl:template>
  3990. <xsl:template name="qandaset.titlepage.separator">
  3991. </xsl:template>
  3992. <xsl:template name="qandaset.titlepage.before.recto">
  3993. </xsl:template>
  3994. <xsl:template name="qandaset.titlepage.before.verso">
  3995. </xsl:template>
  3996. <xsl:template name="qandaset.titlepage">
  3997. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="{$title.fontset}">
  3998. <xsl:variable name="recto.content">
  3999. <xsl:call-template name="qandaset.titlepage.before.recto"/>
  4000. <xsl:call-template name="qandaset.titlepage.recto"/>
  4001. </xsl:variable>
  4002. <xsl:variable name="recto.elements.count">
  4003. <xsl:choose>
  4004. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4005. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4006. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4007. <xsl:otherwise>1</xsl:otherwise>
  4008. </xsl:choose>
  4009. </xsl:variable>
  4010. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4011. <fo:block start-indent="0pt" text-align="center"><xsl:copy-of select="$recto.content"/></fo:block>
  4012. </xsl:if>
  4013. <xsl:variable name="verso.content">
  4014. <xsl:call-template name="qandaset.titlepage.before.verso"/>
  4015. <xsl:call-template name="qandaset.titlepage.verso"/>
  4016. </xsl:variable>
  4017. <xsl:variable name="verso.elements.count">
  4018. <xsl:choose>
  4019. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4020. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4021. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4022. <xsl:otherwise>1</xsl:otherwise>
  4023. </xsl:choose>
  4024. </xsl:variable>
  4025. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4026. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4027. </xsl:if>
  4028. <xsl:call-template name="qandaset.titlepage.separator"/>
  4029. </fo:block>
  4030. </xsl:template>
  4031. <xsl:template match="*" mode="qandaset.titlepage.recto.mode">
  4032. <!-- if an element isn't found in this mode, -->
  4033. <!-- try the generic titlepage.mode -->
  4034. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4035. </xsl:template>
  4036. <xsl:template match="*" mode="qandaset.titlepage.verso.mode">
  4037. <!-- if an element isn't found in this mode, -->
  4038. <!-- try the generic titlepage.mode -->
  4039. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4040. </xsl:template>
  4041. <xsl:template match="title" mode="qandaset.titlepage.recto.auto.mode">
  4042. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" keep-with-next.within-column="always" font-size="24.8832pt" font-weight="bold">
  4043. <xsl:call-template name="component.title">
  4044. <xsl:with-param name="node" select="ancestor-or-self::qandaset[1]"/>
  4045. </xsl:call-template>
  4046. </fo:block>
  4047. </xsl:template>
  4048. <xsl:template match="subtitle" mode="qandaset.titlepage.recto.auto.mode">
  4049. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style">
  4050. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4051. </fo:block>
  4052. </xsl:template>
  4053. <xsl:template match="corpauthor" mode="qandaset.titlepage.recto.auto.mode">
  4054. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4055. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4056. </fo:block>
  4057. </xsl:template>
  4058. <xsl:template match="authorgroup" mode="qandaset.titlepage.recto.auto.mode">
  4059. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4060. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4061. </fo:block>
  4062. </xsl:template>
  4063. <xsl:template match="author" mode="qandaset.titlepage.recto.auto.mode">
  4064. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" font-size="14.4pt">
  4065. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4066. </fo:block>
  4067. </xsl:template>
  4068. <xsl:template match="othercredit" mode="qandaset.titlepage.recto.auto.mode">
  4069. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4070. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4071. </fo:block>
  4072. </xsl:template>
  4073. <xsl:template match="releaseinfo" mode="qandaset.titlepage.recto.auto.mode">
  4074. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4075. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4076. </fo:block>
  4077. </xsl:template>
  4078. <xsl:template match="copyright" mode="qandaset.titlepage.recto.auto.mode">
  4079. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4080. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4081. </fo:block>
  4082. </xsl:template>
  4083. <xsl:template match="legalnotice" mode="qandaset.titlepage.recto.auto.mode">
  4084. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  4085. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4086. </fo:block>
  4087. </xsl:template>
  4088. <xsl:template match="pubdate" mode="qandaset.titlepage.recto.auto.mode">
  4089. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4090. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4091. </fo:block>
  4092. </xsl:template>
  4093. <xsl:template match="revision" mode="qandaset.titlepage.recto.auto.mode">
  4094. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4095. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4096. </fo:block>
  4097. </xsl:template>
  4098. <xsl:template match="revhistory" mode="qandaset.titlepage.recto.auto.mode">
  4099. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em">
  4100. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4101. </fo:block>
  4102. </xsl:template>
  4103. <xsl:template match="abstract" mode="qandaset.titlepage.recto.auto.mode">
  4104. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="qandaset.titlepage.recto.style" space-before="0.5em" text-align="start" margin-left="0.5in" margin-right="0.5in" font-family="{$body.fontset}">
  4105. <xsl:apply-templates select="." mode="qandaset.titlepage.recto.mode"/>
  4106. </fo:block>
  4107. </xsl:template>
  4108. <xsl:template name="table.of.contents.titlepage.recto">
  4109. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="table.of.contents.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4110. <xsl:call-template name="gentext">
  4111. <xsl:with-param name="key" select="'TableofContents'"/>
  4112. </xsl:call-template></fo:block>
  4113. </xsl:template>
  4114. <xsl:template name="table.of.contents.titlepage.verso">
  4115. </xsl:template>
  4116. <xsl:template name="table.of.contents.titlepage.separator">
  4117. </xsl:template>
  4118. <xsl:template name="table.of.contents.titlepage.before.recto">
  4119. </xsl:template>
  4120. <xsl:template name="table.of.contents.titlepage.before.verso">
  4121. </xsl:template>
  4122. <xsl:template name="table.of.contents.titlepage">
  4123. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4124. <xsl:variable name="recto.content">
  4125. <xsl:call-template name="table.of.contents.titlepage.before.recto"/>
  4126. <xsl:call-template name="table.of.contents.titlepage.recto"/>
  4127. </xsl:variable>
  4128. <xsl:variable name="recto.elements.count">
  4129. <xsl:choose>
  4130. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4131. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4132. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4133. <xsl:otherwise>1</xsl:otherwise>
  4134. </xsl:choose>
  4135. </xsl:variable>
  4136. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4137. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4138. </xsl:if>
  4139. <xsl:variable name="verso.content">
  4140. <xsl:call-template name="table.of.contents.titlepage.before.verso"/>
  4141. <xsl:call-template name="table.of.contents.titlepage.verso"/>
  4142. </xsl:variable>
  4143. <xsl:variable name="verso.elements.count">
  4144. <xsl:choose>
  4145. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4146. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4147. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4148. <xsl:otherwise>1</xsl:otherwise>
  4149. </xsl:choose>
  4150. </xsl:variable>
  4151. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4152. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4153. </xsl:if>
  4154. <xsl:call-template name="table.of.contents.titlepage.separator"/>
  4155. </fo:block>
  4156. </xsl:template>
  4157. <xsl:template match="*" mode="table.of.contents.titlepage.recto.mode">
  4158. <!-- if an element isn't found in this mode, -->
  4159. <!-- try the generic titlepage.mode -->
  4160. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4161. </xsl:template>
  4162. <xsl:template match="*" mode="table.of.contents.titlepage.verso.mode">
  4163. <!-- if an element isn't found in this mode, -->
  4164. <!-- try the generic titlepage.mode -->
  4165. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4166. </xsl:template>
  4167. <xsl:template name="list.of.tables.titlepage.recto">
  4168. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.tables.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4169. <xsl:call-template name="gentext">
  4170. <xsl:with-param name="key" select="'ListofTables'"/>
  4171. </xsl:call-template></fo:block>
  4172. </xsl:template>
  4173. <xsl:template name="list.of.tables.titlepage.verso">
  4174. </xsl:template>
  4175. <xsl:template name="list.of.tables.titlepage.separator">
  4176. </xsl:template>
  4177. <xsl:template name="list.of.tables.titlepage.before.recto">
  4178. </xsl:template>
  4179. <xsl:template name="list.of.tables.titlepage.before.verso">
  4180. </xsl:template>
  4181. <xsl:template name="list.of.tables.titlepage">
  4182. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4183. <xsl:variable name="recto.content">
  4184. <xsl:call-template name="list.of.tables.titlepage.before.recto"/>
  4185. <xsl:call-template name="list.of.tables.titlepage.recto"/>
  4186. </xsl:variable>
  4187. <xsl:variable name="recto.elements.count">
  4188. <xsl:choose>
  4189. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4190. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4191. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4192. <xsl:otherwise>1</xsl:otherwise>
  4193. </xsl:choose>
  4194. </xsl:variable>
  4195. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4196. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4197. </xsl:if>
  4198. <xsl:variable name="verso.content">
  4199. <xsl:call-template name="list.of.tables.titlepage.before.verso"/>
  4200. <xsl:call-template name="list.of.tables.titlepage.verso"/>
  4201. </xsl:variable>
  4202. <xsl:variable name="verso.elements.count">
  4203. <xsl:choose>
  4204. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4205. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4206. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4207. <xsl:otherwise>1</xsl:otherwise>
  4208. </xsl:choose>
  4209. </xsl:variable>
  4210. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4211. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4212. </xsl:if>
  4213. <xsl:call-template name="list.of.tables.titlepage.separator"/>
  4214. </fo:block>
  4215. </xsl:template>
  4216. <xsl:template match="*" mode="list.of.tables.titlepage.recto.mode">
  4217. <!-- if an element isn't found in this mode, -->
  4218. <!-- try the generic titlepage.mode -->
  4219. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4220. </xsl:template>
  4221. <xsl:template match="*" mode="list.of.tables.titlepage.verso.mode">
  4222. <!-- if an element isn't found in this mode, -->
  4223. <!-- try the generic titlepage.mode -->
  4224. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4225. </xsl:template>
  4226. <xsl:template name="list.of.figures.titlepage.recto">
  4227. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.figures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4228. <xsl:call-template name="gentext">
  4229. <xsl:with-param name="key" select="'ListofFigures'"/>
  4230. </xsl:call-template></fo:block>
  4231. </xsl:template>
  4232. <xsl:template name="list.of.figures.titlepage.verso">
  4233. </xsl:template>
  4234. <xsl:template name="list.of.figures.titlepage.separator">
  4235. </xsl:template>
  4236. <xsl:template name="list.of.figures.titlepage.before.recto">
  4237. </xsl:template>
  4238. <xsl:template name="list.of.figures.titlepage.before.verso">
  4239. </xsl:template>
  4240. <xsl:template name="list.of.figures.titlepage">
  4241. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4242. <xsl:variable name="recto.content">
  4243. <xsl:call-template name="list.of.figures.titlepage.before.recto"/>
  4244. <xsl:call-template name="list.of.figures.titlepage.recto"/>
  4245. </xsl:variable>
  4246. <xsl:variable name="recto.elements.count">
  4247. <xsl:choose>
  4248. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4249. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4250. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4251. <xsl:otherwise>1</xsl:otherwise>
  4252. </xsl:choose>
  4253. </xsl:variable>
  4254. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4255. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4256. </xsl:if>
  4257. <xsl:variable name="verso.content">
  4258. <xsl:call-template name="list.of.figures.titlepage.before.verso"/>
  4259. <xsl:call-template name="list.of.figures.titlepage.verso"/>
  4260. </xsl:variable>
  4261. <xsl:variable name="verso.elements.count">
  4262. <xsl:choose>
  4263. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4264. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4265. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4266. <xsl:otherwise>1</xsl:otherwise>
  4267. </xsl:choose>
  4268. </xsl:variable>
  4269. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4270. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4271. </xsl:if>
  4272. <xsl:call-template name="list.of.figures.titlepage.separator"/>
  4273. </fo:block>
  4274. </xsl:template>
  4275. <xsl:template match="*" mode="list.of.figures.titlepage.recto.mode">
  4276. <!-- if an element isn't found in this mode, -->
  4277. <!-- try the generic titlepage.mode -->
  4278. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4279. </xsl:template>
  4280. <xsl:template match="*" mode="list.of.figures.titlepage.verso.mode">
  4281. <!-- if an element isn't found in this mode, -->
  4282. <!-- try the generic titlepage.mode -->
  4283. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4284. </xsl:template>
  4285. <xsl:template name="list.of.examples.titlepage.recto">
  4286. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.examples.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4287. <xsl:call-template name="gentext">
  4288. <xsl:with-param name="key" select="'ListofExamples'"/>
  4289. </xsl:call-template></fo:block>
  4290. </xsl:template>
  4291. <xsl:template name="list.of.examples.titlepage.verso">
  4292. </xsl:template>
  4293. <xsl:template name="list.of.examples.titlepage.separator">
  4294. </xsl:template>
  4295. <xsl:template name="list.of.examples.titlepage.before.recto">
  4296. </xsl:template>
  4297. <xsl:template name="list.of.examples.titlepage.before.verso">
  4298. </xsl:template>
  4299. <xsl:template name="list.of.examples.titlepage">
  4300. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4301. <xsl:variable name="recto.content">
  4302. <xsl:call-template name="list.of.examples.titlepage.before.recto"/>
  4303. <xsl:call-template name="list.of.examples.titlepage.recto"/>
  4304. </xsl:variable>
  4305. <xsl:variable name="recto.elements.count">
  4306. <xsl:choose>
  4307. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4308. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4309. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4310. <xsl:otherwise>1</xsl:otherwise>
  4311. </xsl:choose>
  4312. </xsl:variable>
  4313. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4314. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4315. </xsl:if>
  4316. <xsl:variable name="verso.content">
  4317. <xsl:call-template name="list.of.examples.titlepage.before.verso"/>
  4318. <xsl:call-template name="list.of.examples.titlepage.verso"/>
  4319. </xsl:variable>
  4320. <xsl:variable name="verso.elements.count">
  4321. <xsl:choose>
  4322. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4323. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4324. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4325. <xsl:otherwise>1</xsl:otherwise>
  4326. </xsl:choose>
  4327. </xsl:variable>
  4328. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4329. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4330. </xsl:if>
  4331. <xsl:call-template name="list.of.examples.titlepage.separator"/>
  4332. </fo:block>
  4333. </xsl:template>
  4334. <xsl:template match="*" mode="list.of.examples.titlepage.recto.mode">
  4335. <!-- if an element isn't found in this mode, -->
  4336. <!-- try the generic titlepage.mode -->
  4337. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4338. </xsl:template>
  4339. <xsl:template match="*" mode="list.of.examples.titlepage.verso.mode">
  4340. <!-- if an element isn't found in this mode, -->
  4341. <!-- try the generic titlepage.mode -->
  4342. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4343. </xsl:template>
  4344. <xsl:template name="list.of.equations.titlepage.recto">
  4345. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.equations.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4346. <xsl:call-template name="gentext">
  4347. <xsl:with-param name="key" select="'ListofEquations'"/>
  4348. </xsl:call-template></fo:block>
  4349. </xsl:template>
  4350. <xsl:template name="list.of.equations.titlepage.verso">
  4351. </xsl:template>
  4352. <xsl:template name="list.of.equations.titlepage.separator">
  4353. </xsl:template>
  4354. <xsl:template name="list.of.equations.titlepage.before.recto">
  4355. </xsl:template>
  4356. <xsl:template name="list.of.equations.titlepage.before.verso">
  4357. </xsl:template>
  4358. <xsl:template name="list.of.equations.titlepage">
  4359. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4360. <xsl:variable name="recto.content">
  4361. <xsl:call-template name="list.of.equations.titlepage.before.recto"/>
  4362. <xsl:call-template name="list.of.equations.titlepage.recto"/>
  4363. </xsl:variable>
  4364. <xsl:variable name="recto.elements.count">
  4365. <xsl:choose>
  4366. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4367. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4368. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4369. <xsl:otherwise>1</xsl:otherwise>
  4370. </xsl:choose>
  4371. </xsl:variable>
  4372. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4373. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4374. </xsl:if>
  4375. <xsl:variable name="verso.content">
  4376. <xsl:call-template name="list.of.equations.titlepage.before.verso"/>
  4377. <xsl:call-template name="list.of.equations.titlepage.verso"/>
  4378. </xsl:variable>
  4379. <xsl:variable name="verso.elements.count">
  4380. <xsl:choose>
  4381. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4382. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4383. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4384. <xsl:otherwise>1</xsl:otherwise>
  4385. </xsl:choose>
  4386. </xsl:variable>
  4387. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4388. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4389. </xsl:if>
  4390. <xsl:call-template name="list.of.equations.titlepage.separator"/>
  4391. </fo:block>
  4392. </xsl:template>
  4393. <xsl:template match="*" mode="list.of.equations.titlepage.recto.mode">
  4394. <!-- if an element isn't found in this mode, -->
  4395. <!-- try the generic titlepage.mode -->
  4396. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4397. </xsl:template>
  4398. <xsl:template match="*" mode="list.of.equations.titlepage.verso.mode">
  4399. <!-- if an element isn't found in this mode, -->
  4400. <!-- try the generic titlepage.mode -->
  4401. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4402. </xsl:template>
  4403. <xsl:template name="list.of.procedures.titlepage.recto">
  4404. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.procedures.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4405. <xsl:call-template name="gentext">
  4406. <xsl:with-param name="key" select="'ListofProcedures'"/>
  4407. </xsl:call-template></fo:block>
  4408. </xsl:template>
  4409. <xsl:template name="list.of.procedures.titlepage.verso">
  4410. </xsl:template>
  4411. <xsl:template name="list.of.procedures.titlepage.separator">
  4412. </xsl:template>
  4413. <xsl:template name="list.of.procedures.titlepage.before.recto">
  4414. </xsl:template>
  4415. <xsl:template name="list.of.procedures.titlepage.before.verso">
  4416. </xsl:template>
  4417. <xsl:template name="list.of.procedures.titlepage">
  4418. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4419. <xsl:variable name="recto.content">
  4420. <xsl:call-template name="list.of.procedures.titlepage.before.recto"/>
  4421. <xsl:call-template name="list.of.procedures.titlepage.recto"/>
  4422. </xsl:variable>
  4423. <xsl:variable name="recto.elements.count">
  4424. <xsl:choose>
  4425. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4426. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4427. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4428. <xsl:otherwise>1</xsl:otherwise>
  4429. </xsl:choose>
  4430. </xsl:variable>
  4431. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4432. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4433. </xsl:if>
  4434. <xsl:variable name="verso.content">
  4435. <xsl:call-template name="list.of.procedures.titlepage.before.verso"/>
  4436. <xsl:call-template name="list.of.procedures.titlepage.verso"/>
  4437. </xsl:variable>
  4438. <xsl:variable name="verso.elements.count">
  4439. <xsl:choose>
  4440. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4441. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4442. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4443. <xsl:otherwise>1</xsl:otherwise>
  4444. </xsl:choose>
  4445. </xsl:variable>
  4446. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4447. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4448. </xsl:if>
  4449. <xsl:call-template name="list.of.procedures.titlepage.separator"/>
  4450. </fo:block>
  4451. </xsl:template>
  4452. <xsl:template match="*" mode="list.of.procedures.titlepage.recto.mode">
  4453. <!-- if an element isn't found in this mode, -->
  4454. <!-- try the generic titlepage.mode -->
  4455. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4456. </xsl:template>
  4457. <xsl:template match="*" mode="list.of.procedures.titlepage.verso.mode">
  4458. <!-- if an element isn't found in this mode, -->
  4459. <!-- try the generic titlepage.mode -->
  4460. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4461. </xsl:template>
  4462. <xsl:template name="list.of.unknowns.titlepage.recto">
  4463. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format" xsl:use-attribute-sets="list.of.unknowns.titlepage.recto.style" space-before.minimum="1em" space-before.optimum="1.5em" space-before.maximum="2em" space-after="0.5em" margin-left="{$title.margin.left}" start-indent="0pt" font-size="17.28pt" font-weight="bold" font-family="{$title.fontset}">
  4464. <xsl:call-template name="gentext">
  4465. <xsl:with-param name="key" select="'ListofUnknown'"/>
  4466. </xsl:call-template></fo:block>
  4467. </xsl:template>
  4468. <xsl:template name="list.of.unknowns.titlepage.verso">
  4469. </xsl:template>
  4470. <xsl:template name="list.of.unknowns.titlepage.separator">
  4471. </xsl:template>
  4472. <xsl:template name="list.of.unknowns.titlepage.before.recto">
  4473. </xsl:template>
  4474. <xsl:template name="list.of.unknowns.titlepage.before.verso">
  4475. </xsl:template>
  4476. <xsl:template name="list.of.unknowns.titlepage">
  4477. <fo:block xmlns:fo="http://www.w3.org/1999/XSL/Format">
  4478. <xsl:variable name="recto.content">
  4479. <xsl:call-template name="list.of.unknowns.titlepage.before.recto"/>
  4480. <xsl:call-template name="list.of.unknowns.titlepage.recto"/>
  4481. </xsl:variable>
  4482. <xsl:variable name="recto.elements.count">
  4483. <xsl:choose>
  4484. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4485. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4486. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
  4487. <xsl:otherwise>1</xsl:otherwise>
  4488. </xsl:choose>
  4489. </xsl:variable>
  4490. <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
  4491. <fo:block><xsl:copy-of select="$recto.content"/></fo:block>
  4492. </xsl:if>
  4493. <xsl:variable name="verso.content">
  4494. <xsl:call-template name="list.of.unknowns.titlepage.before.verso"/>
  4495. <xsl:call-template name="list.of.unknowns.titlepage.verso"/>
  4496. </xsl:variable>
  4497. <xsl:variable name="verso.elements.count">
  4498. <xsl:choose>
  4499. <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4500. <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
  4501. <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
  4502. <xsl:otherwise>1</xsl:otherwise>
  4503. </xsl:choose>
  4504. </xsl:variable>
  4505. <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
  4506. <fo:block><xsl:copy-of select="$verso.content"/></fo:block>
  4507. </xsl:if>
  4508. <xsl:call-template name="list.of.unknowns.titlepage.separator"/>
  4509. </fo:block>
  4510. </xsl:template>
  4511. <xsl:template match="*" mode="list.of.unknowns.titlepage.recto.mode">
  4512. <!-- if an element isn't found in this mode, -->
  4513. <!-- try the generic titlepage.mode -->
  4514. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4515. </xsl:template>
  4516. <xsl:template match="*" mode="list.of.unknowns.titlepage.verso.mode">
  4517. <!-- if an element isn't found in this mode, -->
  4518. <!-- try the generic titlepage.mode -->
  4519. <xsl:apply-templates select="." mode="titlepage.mode"/>
  4520. </xsl:template>
  4521. </xsl:stylesheet>